|
|
@@ -23,6 +23,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.DeleteStatus;
|
|
|
import com.goafanti.common.enums.IntellectualPropertyType;
|
|
|
import com.goafanti.common.enums.NoticeReadStatus;
|
|
|
import com.goafanti.common.enums.NoticeStatus;
|
|
|
@@ -315,49 +316,19 @@ public class PatentInfoServiceImpl extends BaseMybatisDao<PatentInfoMapper> impl
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public PatentInfo savePatentInfo(PatentInfo patentInfo, String aid) {
|
|
|
- patentInfo.setId(UUID.randomUUID().toString());
|
|
|
- patentInfo.setDeletedSign(0);
|
|
|
- patentInfo.setConfirmState(0);
|
|
|
- patentInfo.setPatentState(PatentInfoStatus.CREATE.getCode());
|
|
|
- if (TokenManager.getToken() instanceof Admin) {
|
|
|
- patentInfo.setFounder(TokenManager.getAdminId());
|
|
|
- }
|
|
|
- Calendar now = Calendar.getInstance();
|
|
|
- now.set(Calendar.MILLISECOND, 0);
|
|
|
- patentInfo.setRecordTime(now.getTime());
|
|
|
- if (TokenManager.getToken() instanceof Admin) {
|
|
|
- patentInfo.setPrincipal(TokenManager.getAdminId());
|
|
|
- } else {
|
|
|
- patentInfo.setPrincipal(aid);
|
|
|
- }
|
|
|
- patentInfoMapper.insert(patentInfo);
|
|
|
-
|
|
|
- PatentRegistration patentRegistration = new PatentRegistration();
|
|
|
- patentRegistration.setId(UUID.randomUUID().toString());
|
|
|
- patentRegistration.setPid(patentInfo.getId());
|
|
|
- patentRegistrationMapper.insert(patentRegistration);
|
|
|
-
|
|
|
- PatentCost patentCost = new PatentCost();
|
|
|
- patentCost.setId(UUID.randomUUID().toString());
|
|
|
- patentCost.setPid(patentInfo.getId());
|
|
|
- patentCost.setAnnualFeeState(0);
|
|
|
- patentCost.setPaymentState(0);
|
|
|
- patentCostMapper.insert(patentCost);
|
|
|
+ public PatentInfo savePatentInfo(PatentInfo patentInfo, String salesman) {
|
|
|
+ patentInfo.setFounder(salesman);
|
|
|
+ patentInfo.setPatentState(PatentInfoStatus.DELIVERD.getCode());
|
|
|
+ patentInfo.setPrincipal(TokenManager.getAdminId());
|
|
|
+ patentInfo = disposePatentInfoSave(patentInfo);
|
|
|
|
|
|
PatentLog log = new PatentLog();
|
|
|
log.setId(UUID.randomUUID().toString());
|
|
|
log.setPid(patentInfo.getId());
|
|
|
log.setRecordTime(patentInfo.getRecordTime());
|
|
|
log.setState(PatentInfoStatus.CREATE.getCode());
|
|
|
- if (TokenManager.getToken() instanceof Admin) {
|
|
|
- log.setPrincipal(TokenManager.getAdminId());
|
|
|
- } else {
|
|
|
- log.setPrincipal(aid);
|
|
|
- }
|
|
|
- if (TokenManager.getToken() instanceof Admin) {
|
|
|
- log.setOperator(TokenManager.getAdminId());
|
|
|
- }
|
|
|
+ log.setPrincipal(salesman);
|
|
|
+ log.setOperator(salesman);
|
|
|
log.setComment(patentInfo.getPatentDes());
|
|
|
patentLogMapper.insert(log);
|
|
|
|
|
|
@@ -367,6 +338,18 @@ public class PatentInfoServiceImpl extends BaseMybatisDao<PatentInfoMapper> impl
|
|
|
organizationIdentityMapper.updateByPrimaryKeySelective(oi);
|
|
|
}
|
|
|
createNotice(patentInfo, log);
|
|
|
+
|
|
|
+ PatentLog l = new PatentLog();
|
|
|
+ l.setId(UUID.randomUUID().toString());
|
|
|
+ l.setPid(patentInfo.getId());
|
|
|
+ Calendar now = Calendar.getInstance();
|
|
|
+ now.set(Calendar.MILLISECOND, 0);
|
|
|
+ l.setRecordTime(now.getTime());
|
|
|
+ l.setState(PatentInfoStatus.DELIVERD.getCode());
|
|
|
+ l.setPrincipal(TokenManager.getAdminId());
|
|
|
+ l.setOperator(salesman);
|
|
|
+ patentLogMapper.insert(l);
|
|
|
+ createNotice(patentInfo, l);
|
|
|
return patentInfo;
|
|
|
}
|
|
|
|
|
|
@@ -501,6 +484,56 @@ public class PatentInfoServiceImpl extends BaseMybatisDao<PatentInfoMapper> impl
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+ // 专利年费到期
|
|
|
+ @Override
|
|
|
+ public List<PatentExpireBO> selectExpireRecord() {
|
|
|
+ return patentInfoMapper.selectExpireRecord();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public PatentInfo insertPatentInfo(PatentInfo patentInfo, String aid) {
|
|
|
+ patentInfo.setPatentState(PatentInfoStatus.CREATE.getCode());
|
|
|
+ patentInfo.setPrincipal(aid);
|
|
|
+ PatentInfo p = disposePatentInfoSave(patentInfo);
|
|
|
+
|
|
|
+ PatentLog log = new PatentLog();
|
|
|
+ log.setId(UUID.randomUUID().toString());
|
|
|
+ log.setPid(patentInfo.getId());
|
|
|
+ log.setRecordTime(patentInfo.getRecordTime());
|
|
|
+ log.setState(PatentInfoStatus.CREATE.getCode());
|
|
|
+ log.setPrincipal(aid);
|
|
|
+ log.setComment(patentInfo.getPatentDes());
|
|
|
+ patentLogMapper.insert(log);
|
|
|
+
|
|
|
+ createNotice(patentInfo, log);
|
|
|
+ return p;
|
|
|
+ }
|
|
|
+
|
|
|
+ private PatentInfo disposePatentInfoSave(PatentInfo patentInfo) {
|
|
|
+ patentInfo.setId(UUID.randomUUID().toString());
|
|
|
+ patentInfo.setDeletedSign(DeleteStatus.UNDELETE.getCode());
|
|
|
+ patentInfo.setConfirmState(0);
|
|
|
+
|
|
|
+ Calendar now = Calendar.getInstance();
|
|
|
+ now.set(Calendar.MILLISECOND, 0);
|
|
|
+ patentInfo.setRecordTime(now.getTime());
|
|
|
+
|
|
|
+ patentInfoMapper.insert(patentInfo);
|
|
|
+
|
|
|
+ PatentRegistration patentRegistration = new PatentRegistration();
|
|
|
+ patentRegistration.setId(UUID.randomUUID().toString());
|
|
|
+ patentRegistration.setPid(patentInfo.getId());
|
|
|
+ patentRegistrationMapper.insert(patentRegistration);
|
|
|
+
|
|
|
+ PatentCost patentCost = new PatentCost();
|
|
|
+ patentCost.setId(UUID.randomUUID().toString());
|
|
|
+ patentCost.setPid(patentInfo.getId());
|
|
|
+ patentCost.setAnnualFeeState(0);
|
|
|
+ patentCost.setPaymentState(0);
|
|
|
+ patentCostMapper.insert(patentCost);
|
|
|
+ return patentInfo;
|
|
|
+ }
|
|
|
+
|
|
|
private void createNotice(PatentInfo p, PatentLog l) {
|
|
|
PatentInfo info = patentInfoMapper.selectByPrimaryKey(p.getId());
|
|
|
|
|
|
@@ -525,12 +558,4 @@ public class PatentInfoServiceImpl extends BaseMybatisDao<PatentInfoMapper> impl
|
|
|
noticeMapper.insert(n);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- //专利年费到期
|
|
|
- @Override
|
|
|
- public List<PatentExpireBO> selectExpireRecord() {
|
|
|
- return patentInfoMapper.selectExpireRecord();
|
|
|
- }
|
|
|
-
|
|
|
}
|