no message

This commit is contained in:
18188916393
2022-10-20 20:56:53 +08:00
parent bc632ec293
commit 200a203e4b

View File

@@ -108,7 +108,14 @@ public class ProduceTaskServiceImpl implements ProduceTaskService {
WQLObject taskTab = WQLObject.getWQLObject("pdm_base_produceTask");
JSONObject jsonObject = taskTab.query("is_delete = '0' and produce_status <> '02' and label_uuid = '" + label_uuid + "' and device_code='" + device_code + "' ").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonObject)) throw new BadRequestException("该批次有未加工完成的任务,无法新增");
//判断物料批次有没有库存
JSONObject jo = new JSONObject();
jo.put("label_uuid", label_uuid);
jo.put("area_type", "03");
JSONArray outStructArr = StructFindUtil.getOutStruct(jo);
if (ObjectUtil.isEmpty(outStructArr)) {
throw new BadRequestException("库存中没有可用的物料");
}
String currentUsername = SecurityUtils.getCurrentUsername();
String now = DateUtil.now();