From b7c969a35e219b3bc6f8889abbce410def4f62d5 Mon Sep 17 00:00:00 2001 From: 18188916393 <2562295436@qq.com> Date: Thu, 1 Sep 2022 10:00:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BF=AE=E6=94=B9=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/org/nl/wms/common/StructFindUtil.java | 6 +----- .../main/java/org/nl/wms/common/wql/QSTRUCT_RULE.wql | 1 + .../wms/ext/acs/service/impl/AcsToWmsServiceImpl.java | 11 ++++++++--- .../org/nl/wms/sch/manage/buss/CallMaterialTask.java | 6 +++--- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/common/StructFindUtil.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/common/StructFindUtil.java index b8771fa..8958fe4 100644 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/common/StructFindUtil.java +++ b/wms/hd/nladmin-system/src/main/java/org/nl/wms/common/StructFindUtil.java @@ -41,10 +41,6 @@ public class StructFindUtil { String is_full = jsonObject.getString("is_full"); String workprocedure_id = jsonObject.getString("workprocedure_id"); String vehicle_type = jsonObject.getString("vehicle_type"); - - if (StrUtil.isEmpty(material_id)) { - throw new BadRequestException("物料不能为空!"); - } if (StrUtil.isEmpty(area_type)) { throw new BadRequestException("区域不能为空!"); } @@ -109,7 +105,7 @@ public class StructFindUtil { JSONObject result = new JSONObject(); //如果是堆叠位5 需要更新 设备状态 if (StrUtil.equals(point_code, "KGTDDW05")) { - JSONArray pointarr = WQL.getWO("ACSTOMES_001").addParam("area_type", AreaEnum.KGTDDQ).addParam("flag", "2").process().getResultJSONArray(0); + JSONArray pointarr = WQL.getWO("ACSTOMES_001").addParam("area_type", AreaEnum.KGTDDQ.getCode()).addParam("flag", "2").process().getResultJSONArray(0); PointUpdateUtil.updatePoint(pointarr); result = WQL.getWO("QSTRUCT_RULE").addParam("flag", "6") .addParam("area_type", area_type) diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/common/wql/QSTRUCT_RULE.wql b/wms/hd/nladmin-system/src/main/java/org/nl/wms/common/wql/QSTRUCT_RULE.wql index a8ef5dc..089633c 100644 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/common/wql/QSTRUCT_RULE.wql +++ b/wms/hd/nladmin-system/src/main/java/org/nl/wms/common/wql/QSTRUCT_RULE.wql @@ -114,6 +114,7 @@ IF 输入.flag = "3" ivt.qty_unit_id, ivt.pcsn, ivt.qty_unit_id, + ivt.material_id, ruledis.out_seq_no FROM st_ivt_structivt ivt diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java index c86dc0d..b4601bf 100644 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java +++ b/wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java @@ -75,10 +75,15 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { //叫料出库 jsonObject.put("next_point_code", device_code); jsonObject.put("create_mode", "01"); - produceInfoByCode = this.getProduceInfoByCode(device_code); + //批次 物料,客户要从排产单里面去取 jsonObject.put("pcsn", "pcsn"); - jsonObject.put("material_id", produceInfoByCode.getString("material_id")); + if (!StrUtil.equals(device_code,"RYW")){ + produceInfoByCode = this.getProduceInfoByCode(device_code); + jsonObject.put("material_id", produceInfoByCode.getString("material_id")); + + } + jsonObject.put("cust_id", "1516368197694132224"); callMaterialTask.createTask((JSONObject) JSON.toJSON(jsonObject)); break; @@ -150,7 +155,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { JSONObject produceInfoByCode = new JSONObject(); String device_code = (String) jsonObject.get("device_code"); String vehicle_code = (String) jsonObject.get("vehicle_code"); - String qty = (String) jsonObject.get("qty"); + String qty = String.valueOf(jsonObject.get("qty")) ; produceInfoByCode = this.getProduceInfoByCode(device_code); String material_id = (String) produceInfoByCode.get("material_id"); String cust_id = (String) produceInfoByCode.get("cust_id"); diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/CallMaterialTask.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/CallMaterialTask.java index b655488..dba2ff4 100644 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/CallMaterialTask.java +++ b/wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/CallMaterialTask.java @@ -176,9 +176,6 @@ public class CallMaterialTask extends AbstractAcsTask { if (StrUtil.isEmpty(next_point_code)) { throw new BadRequestException("终点不能为空!"); } - if (StrUtil.isEmpty(material_id)) { - throw new BadRequestException("物料标识不能为空!"); - } if (StrUtil.isEmpty(create_mode)) { throw new BadRequestException("创建方式不能为空!"); } @@ -296,6 +293,9 @@ public class CallMaterialTask extends AbstractAcsTask { iosObj.put("bill_type", bill_type); iosObj.put("workprocedure_id", workprocedure_id); iosObj.put("ivt_workprocedure_id", ivt_workprocedure_id); + if (StrUtil.isEmpty(material_id)) { + material_id = outStructObj.getString("material_id"); + } iosObj.put("material_id", material_id); iosObj.put("vehicle_code", outStructObj.getString("vehicle_code")); iosObj.put("qty", qty);