|
|
@@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import com.goafanti.common.constant.AFTConstants;
|
|
|
+import com.goafanti.common.dao.ContractMapper;
|
|
|
import com.goafanti.common.dao.NoticeMapper;
|
|
|
import com.goafanti.common.dao.OrgIntellectualPropertyMapper;
|
|
|
import com.goafanti.common.dao.OrganizationIdentityMapper;
|
|
|
@@ -23,6 +24,7 @@ import com.goafanti.common.dao.PatentInfoMapper;
|
|
|
import com.goafanti.common.dao.PatentLogMapper;
|
|
|
import com.goafanti.common.dao.PatentRegistrationMapper;
|
|
|
import com.goafanti.common.dao.UserMapper;
|
|
|
+import com.goafanti.common.enums.ContractBusinessStatus;
|
|
|
import com.goafanti.common.enums.DeleteStatus;
|
|
|
import com.goafanti.common.enums.IntellectualPropertyType;
|
|
|
import com.goafanti.common.enums.NoticeReadStatus;
|
|
|
@@ -71,6 +73,8 @@ public class PatentInfoServiceImpl extends BaseMybatisDao<PatentInfoMapper> impl
|
|
|
private NoticeMapper noticeMapper;
|
|
|
@Autowired
|
|
|
private OrganizationIdentityMapper organizationIdentityMapper;
|
|
|
+ @Autowired
|
|
|
+ private ContractMapper contractMapper;
|
|
|
|
|
|
@Override
|
|
|
public PatentInfo insert(PatentInfo patentInfo) {
|
|
|
@@ -547,12 +551,15 @@ public class PatentInfoServiceImpl extends BaseMybatisDao<PatentInfoMapper> impl
|
|
|
List<PatentRegistration> pr = new ArrayList<>();
|
|
|
List<PatentCost> pc = new ArrayList<>();
|
|
|
List<PatentLog> pl = new ArrayList<>();
|
|
|
+ contract.setPatentStatus(ContractBusinessStatus.CREATE.getCode());
|
|
|
+ contractMapper.updateByPrimaryKeySelective(contract);
|
|
|
+
|
|
|
for (int i = 0; i < contract.getPatentNum(); i++) {
|
|
|
PatentInfo p = new PatentInfo();
|
|
|
PatentLog l = new PatentLog();
|
|
|
PatentRegistration r = new PatentRegistration();
|
|
|
PatentCost c = new PatentCost();
|
|
|
-
|
|
|
+
|
|
|
p.setId(UUID.randomUUID().toString());
|
|
|
p.setUid(contract.getUid());
|
|
|
p.setContractId(contract.getId());
|
|
|
@@ -563,17 +570,17 @@ public class PatentInfoServiceImpl extends BaseMybatisDao<PatentInfoMapper> impl
|
|
|
Calendar now = Calendar.getInstance();
|
|
|
now.set(Calendar.MILLISECOND, 0);
|
|
|
p.setCreateTime(now.getTime());
|
|
|
-
|
|
|
+
|
|
|
l.setId(UUID.randomUUID().toString());
|
|
|
l.setPid(p.getId());
|
|
|
l.setPrincipal(TokenManager.getAdminId());
|
|
|
l.setOperator(TokenManager.getAdminId());
|
|
|
l.setRecordTime(now.getTime());
|
|
|
l.setState(PatentInfoStatus.CREATE.getCode());
|
|
|
-
|
|
|
+
|
|
|
r.setId(UUID.randomUUID().toString());
|
|
|
r.setPid(p.getId());
|
|
|
-
|
|
|
+
|
|
|
c.setId(UUID.randomUUID().toString());
|
|
|
c.setPid(p.getId());
|
|
|
c.setAnnualFeeState(PatentAnnualFeeStatus.UNPAID.getCode());
|