From 430d6ce0078137f3ec3e94f976797f83436c18fa Mon Sep 17 00:00:00 2001 From: liuxy Date: Tue, 14 Feb 2023 20:13:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ProductInstorServiceImpl.java | 36 ++++++++++++++++--- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/ProductInstorServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/ProductInstorServiceImpl.java index 55d6459b3..a3c1372b0 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/ProductInstorServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/ProductInstorServiceImpl.java @@ -288,18 +288,44 @@ public class ProductInstorServiceImpl implements ProductInstorService { throw new BadRequestException("未查询到该木箱对应的包装关系!"); } - String box_length = sub_jo.getString("box_length"); - String box_width = sub_jo.getString("box_width"); - String box_high = sub_jo.getString("box_high"); + String to_length = sub_jo.getString("box_length"); // 长 + String to_weight = sub_jo.getString("box_width"); // 宽 + String to_height = sub_jo.getString("box_high"); // 高 + String to_strap_times = "2"; // 捆扎次数 + String to_command = "4"; // 指令 JSONArray array = new JSONArray(); JSONObject jsonLength = new JSONObject(); jsonLength.put("device_code", point_code); - jsonLength.put("code", ""); - jsonLength.put("value", box_length); + jsonLength.put("code", "to_length"); + jsonLength.put("value", to_length); array.add(jsonLength); + JSONObject jsonWeight= new JSONObject(); + jsonWeight.put("device_code", point_code); + jsonWeight.put("code", "to_weight"); + jsonWeight.put("value", to_weight); + array.add(jsonWeight); + + JSONObject jsonHeight= new JSONObject(); + jsonHeight.put("device_code", point_code); + jsonHeight.put("code", "to_height"); + jsonHeight.put("value", to_height); + array.add(jsonHeight); + + JSONObject jsonStrap= new JSONObject(); + jsonStrap.put("device_code", point_code); + jsonStrap.put("code", "to_strap_times"); + jsonStrap.put("value", to_strap_times); + array.add(jsonStrap); + + JSONObject jsonCommand= new JSONObject(); + jsonCommand.put("device_code", point_code); + jsonCommand.put("code", "to_command"); + jsonCommand.put("value", to_command); + array.add(jsonCommand); + // 调用接口返回数据 WmsToAcsServiceImpl wmsToAcsServiceImpl = SpringContextHolder.getBean(WmsToAcsServiceImpl.class); wmsToAcsServiceImpl.action(array);