|
@@ -2117,7 +2117,21 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
|
|
|
TrialSeleInspectionRecordBaseInfoDTO baseInfo = new TrialSeleInspectionRecordBaseInfoDTO();
|
|
|
BeanUtil.copyProperties(dto, baseInfo);
|
|
|
record.setBaseInfo(JSON.toJSONString(baseInfo));
|
|
|
+ boolean a=true;
|
|
|
+ boolean b=true;
|
|
|
if (record.getId() == null) {
|
|
|
+ if(StringUtils.isNotEmpty(record.getRecordNo())){
|
|
|
+ a= trialNumberRuleService.checkTrialNumberIsExist(record.getRecordNo(), 4);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotEmpty(record.getRecordNo())){
|
|
|
+ b= trialNumberRuleService.checkTrialNumberIsExist(record.getReportNo(), 5);
|
|
|
+ }
|
|
|
+ if(!a){
|
|
|
+ throw new ServiceException("记录编号已存在");
|
|
|
+ }
|
|
|
+ if(!b){
|
|
|
+ throw new ServiceException("报告编号已存在");
|
|
|
+ }
|
|
|
this.save(record);
|
|
|
} else {
|
|
|
this.updateById(record);
|