代码更新

This commit is contained in:
lyd
2022-11-11 18:52:22 +08:00
parent 6be71f7fcd
commit af0ef390cd
2 changed files with 4 additions and 1 deletions

View File

@@ -49,6 +49,9 @@ public class MaterialLabelDto implements Serializable {
/** 批次 */
private String pcsn;
// 颜色
private String color;
/** 物料标识 */
private String material_uuid;

View File

@@ -141,7 +141,7 @@ class MaterialLabelServiceImpl implements MaterialLabelService {
//物料标签主表【md_base_materialLabelMst】
WQLObject labelMstTab = WQLObject.getWQLObject("md_base_materialLabelMst");
JSONObject labelObj = labelMstTab.query("formula = '" + dto.getFormula() + "' and pcsn = '" + dto.getPcsn() + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(labelObj) && StrUtil.equals(labelObj.optString("label_uuid"), dto.getLabel_uuid()))
if (ObjectUtil.isNotEmpty(labelObj) && !StrUtil.equals(labelObj.optString("label_uuid"), dto.getLabel_uuid()))
throw new BadRequestException("配方为【" + dto.getFormula() + "】,批次为【" + dto.getPcsn() + "】的标签已经存在!");