diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/st/core/service/impl/DumpinvServiceImpl.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/st/core/service/impl/DumpinvServiceImpl.java index 8c3307c..c4908ce 100644 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/st/core/service/impl/DumpinvServiceImpl.java +++ b/wms/hd/nladmin-system/src/main/java/org/nl/wms/st/core/service/impl/DumpinvServiceImpl.java @@ -82,11 +82,22 @@ public class DumpinvServiceImpl implements DumpinvService { HashMap map = new HashMap<>(); map.put("flag", "1"); map.put("label_uuid", label_uuid); + JSONObject materialObj = WQLObject.getWQLObject("md_base_materiallabelmst").query("label_uuid='" + label_uuid + "'").uniqueResult(0); + if (ObjectUtil.isEmpty(materialObj)){ + throw new BadRequestException("未找到该物料批次的信息!"); + } + String material_code = materialObj.getString("material_code"); + JSONArray turnInArr = new JSONArray(); + if (StrUtil.equals(material_code,"1")){ + turnInArr = pointTab.query("area_type = '03' and point_status ='00' and lock_type='00' and is_active='1' and is_delete='0' and point_name like'%一层%'").getResultJSONArray(0); + }else { + turnInArr = pointTab.query("area_type = '03' and point_status ='00' and lock_type='00' and is_active='1' and is_delete='0' and point_name not like'%一层%'").getResultJSONArray(0); + + } JSONArray turnOutArr = WQL.getWO("QST_DUMP01").addParamMap(map).process().getResultJSONArray(0); if (ObjectUtil.isNotEmpty(turnOutArr)) turnout_num = turnOutArr.size(); - JSONArray turnInArr = pointTab.query("area_type = '03' and point_status ='00' and lock_type='00' and is_active='1' and is_delete='0'").getResultJSONArray(0); if (ObjectUtil.isNotEmpty(turnInArr)) turnin_num = turnInArr.size(); JSONObject result = new JSONObject();