微调
This commit is contained in:
@@ -736,6 +736,8 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
long count = newDevList.stream().filter(dev -> dev.getName().equals(pqDev.getName()) && dev.getCreateId().equals(pqDev.getCreateId())).count();
|
||||
if (count == 0) {
|
||||
newDevList.add(pqDev);
|
||||
} else {
|
||||
throw new BusinessException(DetectionResponseEnum.NAME_OR_CREATEID_REPEAT);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1077,9 +1079,11 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
param.setDevType(pqDev.getDevType());
|
||||
this.checkRepeat(param, false);
|
||||
|
||||
long count = newDevList.stream().filter(dev -> dev.getName().equals(pqDev.getName()) && dev.getCreateId().equals(pqDev.getCreateId())).count();
|
||||
long count = newDevList.stream().filter(dev -> dev.getName().equals(pqDev.getName()) || dev.getCreateId().equals(pqDev.getCreateId())).count();
|
||||
if (count == 0) {
|
||||
newDevList.add(pqDev);
|
||||
} else {
|
||||
throw new BusinessException(DetectionResponseEnum.NAME_OR_CREATEID_REPEAT);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -61,7 +61,8 @@ public enum DetectionResponseEnum {
|
||||
ERROR_SYSTEM_NOT_EXIST("A02069", "该误差体系不存在,请先添加该误差体系"),
|
||||
DATA_RULE_NOT_EXIST("A02070", "该数据处理原则不存在,请先在\"数据处理原则\"字典中添加"),
|
||||
REPORT_TEMPLATE_NOT_EXIST("A02071", "该报告模板不存在,请先添加该报告模板"),
|
||||
LACK_REPORT_TEMPLATE_ID("A02072","当关联报告模板为\"是\"时,报告模板不能为空" );
|
||||
LACK_REPORT_TEMPLATE_ID("A02072","当关联报告模板为\"是\"时,报告模板不能为空" ),
|
||||
NAME_OR_CREATEID_REPEAT("A02073","名称或装置编号重复" );
|
||||
|
||||
private final String code;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user