代码更新

This commit is contained in:
lyd
2022-11-11 16:29:37 +08:00
parent f83a40b654
commit d34bad7abc
2 changed files with 28 additions and 9 deletions

View File

@@ -193,7 +193,10 @@ class MaterialLabelServiceImpl implements MaterialLabelService {
} else {
order_seq = NumberUtil.add(jsonMst.optString("dtl_count"), "1").toString();
}
// 物料明细表
WQLObject dtlTab = WQLObject.getWQLObject("md_base_materialLabelDtl");
JSONObject materialLabelDtlObj = dtlTab.query("label_code = '" + label_code + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(materialLabelDtlObj)) throw new BadRequestException("条形码已存在!");
JSONObject jsonDtl = new JSONObject();
jsonDtl.put("label_uuid", jsonMst.optString("label_uuid"));
jsonDtl.put("labeldtl_uuid", IdUtil.simpleUUID());
@@ -204,7 +207,6 @@ class MaterialLabelServiceImpl implements MaterialLabelService {
jsonDtl.put("print_by", SecurityUtils.getCurrentUsername());
jsonDtl.put("print_time", now);
//新增物料明细表
WQLObject dtlTab = WQLObject.getWQLObject("md_base_materialLabelDtl");
dtlTab.insert(jsonDtl);
//物料主表明细数回显
WQLObject mstTab = WQLObject.getWQLObject("md_base_materialLabelMst");