代码更新

This commit is contained in:
2023-02-14 20:13:19 +08:00
parent 5b43235369
commit 430d6ce007

View File

@@ -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);