From e3e6cbb5610c12870306b17fafdc7d5d1e73d178 Mon Sep 17 00:00:00 2001 From: 18188916393 <2562295436@qq.com> Date: Wed, 7 Sep 2022 10:31:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E6=8C=81=E4=BF=AE=E6=94=B9=E7=AA=91?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E9=80=81=E6=96=99=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SendMaterialServiceImpl.java | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/pda/sendMaterial/service/impl/SendMaterialServiceImpl.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/pda/sendMaterial/service/impl/SendMaterialServiceImpl.java index a55362c..f377e95 100644 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/pda/sendMaterial/service/impl/SendMaterialServiceImpl.java +++ b/wms/hd/nladmin-system/src/main/java/org/nl/wms/pda/sendMaterial/service/impl/SendMaterialServiceImpl.java @@ -59,11 +59,11 @@ public class SendMaterialServiceImpl implements SendMaterialService { @Override @Transactional public Map bussConfirm(@RequestBody Map param) { - String start_point_code = (String) param.get("point_code"); + String device_code = (String) param.get("point_code"); String vehicle_code = (String) param.get("vehicle_code"); String qty = (String) param.get("qty"); String is_full = (String) param.get("is_full"); - if (StrUtil.isEmpty(start_point_code)) { + if (StrUtil.isEmpty(device_code)) { throw new PdaRequestException("点位不能为空!"); } if (StrUtil.isEmpty(vehicle_code)) { @@ -79,14 +79,24 @@ public class SendMaterialServiceImpl implements SendMaterialService { JSONObject jsonObject = new JSONObject(); jsonObject.put("pcsn", "pcsn"); jsonObject.put("create_mode", "03"); - JSONObject produceInfoByCode = this.getProduceInfoByCode(start_point_code); - jsonObject.put("cust_id", produceInfoByCode.getString("cust_id")); - jsonObject.put("material_id", produceInfoByCode.getString("material_id")); - jsonObject.put("stewing_time", produceInfoByCode.getString("stewing_time")); - jsonObject.put("producetask_id", produceInfoByCode.getString("producetask_id")); - jsonObject.put("start_point_code", start_point_code); - jsonObject.put("vehicle_code", vehicle_code); - jsonObject.put("qty", qty); + if (!StrUtil.equals(device_code, "CYBZW")) { + JSONObject produceInfoByCode = this.getProduceInfoByCode(device_code); + jsonObject.put("material_id", produceInfoByCode.getString("material_id")); + produceInfoByCode = this.getProduceInfoByCode(device_code); + //批次 物料,客户要从排产单里面去取 + jsonObject.put("material_id", produceInfoByCode.getString("material_id")); + jsonObject.put("cust_id", produceInfoByCode.getString("cust_id")); + jsonObject.put("stewing_time", produceInfoByCode.getString("stewing_time")); + jsonObject.put("producetask_id", produceInfoByCode.getString("producetask_id")); + } else { + JSONObject groupObj = WQLObject.getWQLObject("st_buss_vehiclegroup").query("vehicle_code='" + vehicle_code + "'", "create_time desc").uniqueResult(0); + jsonObject.put("create_mode", "01"); + jsonObject.put("material_id", groupObj.getString("material_uuid")); + jsonObject.put("cust_id", groupObj.getString("cust_id")); + jsonObject.put("stewing_time", "0"); + jsonObject.put("vehicle_code", vehicle_code); + jsonObject.put("producetask_id", groupObj.getString("producetask_id")); + } jsonObject.put("is_full", is_full); sendMaterialTask.createTask((JSONObject) JSON.toJSON(jsonObject)); JSONObject returnjo = new JSONObject();