Commit 85e89a77 authored by 廖旭伟's avatar 廖旭伟

bug修改

parent 6f048eee
...@@ -187,10 +187,18 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap ...@@ -187,10 +187,18 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
// if(StringUtils.isEmpty(entity.getAuthority())){ // if(StringUtils.isEmpty(entity.getAuthority())){
// throw new AppException("制证机关不能为空"); // throw new AppException("制证机关不能为空");
// } // }
if(StringUtils.isEmpty(entity.getSocialCode())){ if(entity.getId()==null) {
entity.setSocialCode(DateUtils.getCurrDateTime("yyyyMMddHHmmss")+RandomUtil.randomNumbers(4)); if (StringUtils.isEmpty(entity.getSocialCode())) {
entity.setSocialCode(DateUtils.getCurrDateTime("yyyyMMddHHmmss") + RandomUtil.randomNumbers(4));
//throw new AppException("统一社会信用代码不能为空"); //throw new AppException("统一社会信用代码不能为空");
} }
ApplyLogEntity temp = this.selectOne(new ApplyLogQuery().socialCode(entity.getSocialCode()).recordStatus(YesNoEnum.NO.getValue()));
if (temp != null) {
throw new AppException("统一社会信用代码重复");
}
}else {
entity.setSocialCode(null);
}
// if(StringUtils.isEmpty(entity.getLicenseProject())){ // if(StringUtils.isEmpty(entity.getLicenseProject())){
// throw new AppException("许可项目不能为空"); // throw new AppException("许可项目不能为空");
// } // }
...@@ -203,10 +211,6 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap ...@@ -203,10 +211,6 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
if(entity.getCatalogId()==null){ if(entity.getCatalogId()==null){
throw new AppException("目录ID不能为空"); throw new AppException("目录ID不能为空");
} }
ApplyLogEntity temp = this.selectOne(new ApplyLogQuery().socialCode(entity.getSocialCode()).recordStatus(YesNoEnum.NO.getValue()));
if(temp!=null){
throw new AppException("统一社会信用代码重复");
}
super.validData(entity, context); super.validData(entity, context);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment