From 33a4ebda90a8cfb9c0f9621a102485f907748636 Mon Sep 17 00:00:00 2001 From: "USER-20220102CG\\noblelift" <546428999@qq.com> Date: Thu, 4 Aug 2022 09:01:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0wms=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lnsh/lnsh_station/LnshStationDeviceDriver.java | 3 --- .../nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java | 9 +++------ .../org/nl/acs/task/service/impl/TaskServiceImpl.java | 8 ++++---- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java index 23cec67..a77e93b 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java @@ -267,9 +267,6 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements JSONObject json = new JSONObject(); json.put("device_code",this.device_code); json.put("type","4"); - json.put("weight",weight); - json.put("vehicle_code",barcode); - json.put("is_full","0"); HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json); if (result.getStatus() == 200) { this.writing(this.mode); diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java index ab9a47f..f52f9c6 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java @@ -87,7 +87,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { JSONArray errArr = new JSONArray(); for (int i = 0; i < tasks.size(); i++) { JSONObject task = tasks.getJSONObject(i); - String task_id = task.getString("task_id"); + String ext_task_uuid = task.getString("ext_task_uuid"); String task_code = task.getString("task_code"); String start_point_code = task.getString("start_device_code"); String next_point_code = task.getString("next_device_code"); @@ -102,9 +102,6 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { if (StrUtil.isEmpty(next_point_code)) { throw new WDKException("终点不能为空"); } - if (StrUtil.isEmpty(task_id)) { - throw new WDKException("外部系统标识不能为空"); - } JSONObject start_device_json = WQLObject.getWQLObject("acs_storage_cell").query("parent_storage_code ='" + start_point_code + "'").uniqueResult(0); if (!ObjectUtil.isEmpty(start_device_json)) { @@ -156,7 +153,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { } JSONObject jo = new JSONObject(); jo.put("task_code", task_code); - jo.put("task_id", task_id); + jo.put("ext_task_uuid", ext_task_uuid); jo.put("start_point_code", start_point_code); jo.put("next_point_code", next_point_code); jo.put("start_parent_code", start_point_code); @@ -192,7 +189,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { e.printStackTrace(); JSONObject json = new JSONObject(); json.put("task_code", task_code); - json.put("task_id", task_id); + json.put("task_id", ext_task_uuid); json.put("message", e.getMessage()); errArr.add(json); } diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java index 3c87261..e4e5af3 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java @@ -605,7 +605,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { if (!StrUtil.startWith(dto.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) { TaskFeedbackDto feefbackdto = taskFeedbackService.findByCode(entity.getTask_code()); JSONObject feed_jo = new JSONObject(); - feed_jo.put("task_id", entity.getExt_task_uuid()); + feed_jo.put("ext_task_uuid", entity.getExt_task_uuid()); feed_jo.put("task_code", dto.getTask_code()); feed_jo.put("task_status", dto.getTask_status()); JSONArray ja = new JSONArray(); @@ -721,7 +721,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) { TaskFeedbackDto feefbackdto = taskFeedbackService.findByCode(entity.getTask_code()); JSONObject feed_jo = new JSONObject(); - feed_jo.put("task_id", entity.getExt_task_uuid()); + feed_jo.put("ext_task_uuid", entity.getExt_task_uuid()); feed_jo.put("task_code", entity.getTask_code()); feed_jo.put("task_status", entity.getTask_status()); JSONArray ja = new JSONArray(); @@ -766,7 +766,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { } } else { int status = body.getStatus(); - JSONObject jo = (JSONObject) JSONObject.toJSON(body.body()); + JSONObject jo = JSONObject.parseObject(body.body()); if (ObjectUtil.isEmpty(feefbackdto)) { feefbackdto = new TaskFeedbackDto(); feefbackdto.setTask_id(entity.getTask_id()); @@ -844,7 +844,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { String hasWms = acsConfigService.findConfigFromCache().get(AcsConfig.HASWMS); if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) { JSONObject feed_jo = new JSONObject(); - feed_jo.put("task_id", entity.getExt_task_uuid()); + feed_jo.put("ext_task_uuid", entity.getExt_task_uuid()); feed_jo.put("task_code", entity.getTask_code()); feed_jo.put("task_status", entity.getTask_status()); JSONArray ja = new JSONArray();