添加检验数据增加约束条件

This commit is contained in:
liuchengqian 2022-04-26 14:08:37 +08:00
parent 36c9e0d386
commit 642052ebd3

View File

@ -92,6 +92,9 @@ public class QcSourceServiceImpl implements QcSourceService {
entity.setVarietyNo(LocalStringUtils.formatEmptyValue(varietyNo)); entity.setVarietyNo(LocalStringUtils.formatEmptyValue(varietyNo));
entity.setCraftItemNo(LocalStringUtils.formatEmptyValue(craftItemNo)); entity.setCraftItemNo(LocalStringUtils.formatEmptyValue(craftItemNo));
entity.setQcItemNo(LocalStringUtils.formatEmptyValue(qcItemNo)); entity.setQcItemNo(LocalStringUtils.formatEmptyValue(qcItemNo));
if (TextUtils.isEmpty(qcValue)) {
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "添加失败,测量值(qcValue)字段不能为空!", locale);
}
entity.setQcValue(LocalStringUtils.formatEmptyValue(qcValue)); entity.setQcValue(LocalStringUtils.formatEmptyValue(qcValue));
qcSourceDao.save(entity); qcSourceDao.save(entity);
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功!", locale); return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功!", locale);