|
|
@@ -1613,10 +1613,7 @@ public class CognizanceApiController extends CertifyApiController {
|
|
|
}
|
|
|
|
|
|
OrgIntellectualProperty p = orgIntellectualPropertyService.findByUidAndIntellectualPropertyNumber(TokenManager.getUserId(), orgIntellectualProperty.getIntellectualPropertyNumber());
|
|
|
- if (null != p){
|
|
|
- res.getError().add(buildError("", "当前知识产权编号已录入,无法重复提交!"));
|
|
|
- return res;
|
|
|
- }
|
|
|
+
|
|
|
if (!StringUtils.isBlank(authorizationDateFormattedDate)) {
|
|
|
try {
|
|
|
orgIntellectualProperty.setAuthorizationDate(
|
|
|
@@ -1628,6 +1625,10 @@ public class CognizanceApiController extends CertifyApiController {
|
|
|
BeanUtils.copyProperties(orgIntellectualProperty, oip);
|
|
|
|
|
|
if (StringUtils.isBlank(oip.getId())) {
|
|
|
+ if (null != p){
|
|
|
+ res.getError().add(buildError("", "当前知识产权编号已录入,无法重复提交!"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
oip.setId(UUID.randomUUID().toString());
|
|
|
oip.setUid(TokenManager.getUserId());
|
|
|
oip.setEvaluationCategory((oip.getCatagory() >= 2 && oip.getCatagory() <= 4) ? 1 : 0);
|
|
|
@@ -1635,6 +1636,10 @@ public class CognizanceApiController extends CertifyApiController {
|
|
|
oip.setType(IntellectualPropertyType.COMMON.getCode());
|
|
|
res.setData(orgIntellectualPropertyService.insert(oip));
|
|
|
} else {
|
|
|
+ if (null != p && !p.getId().equals(oip.getId())){
|
|
|
+ res.getError().add(buildError("", "当前知识产权编号已录入,无法重复提交!"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
oip.setEvaluationCategory(oip.getCatagory() <= 2 ? 1 : 0);
|
|
|
res.setData(orgIntellectualPropertyService.updateByPrimaryKeySelective(oip));
|
|
|
}
|