Browse Source

更新wms接口

master
汪菘 2 years ago
parent
commit
33a4ebda90
  1. 3
      acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java
  2. 9
      acs/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java
  3. 8
      acs/hd/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java

3
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(); JSONObject json = new JSONObject();
json.put("device_code",this.device_code); json.put("device_code",this.device_code);
json.put("type","4"); json.put("type","4");
json.put("weight",weight);
json.put("vehicle_code",barcode);
json.put("is_full","0");
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json); HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
if (result.getStatus() == 200) { if (result.getStatus() == 200) {
this.writing(this.mode); this.writing(this.mode);

9
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(); JSONArray errArr = new JSONArray();
for (int i = 0; i < tasks.size(); i++) { for (int i = 0; i < tasks.size(); i++) {
JSONObject task = tasks.getJSONObject(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 task_code = task.getString("task_code");
String start_point_code = task.getString("start_device_code"); String start_point_code = task.getString("start_device_code");
String next_point_code = task.getString("next_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)) { if (StrUtil.isEmpty(next_point_code)) {
throw new WDKException("终点不能为空"); 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); JSONObject start_device_json = WQLObject.getWQLObject("acs_storage_cell").query("parent_storage_code ='" + start_point_code + "'").uniqueResult(0);
if (!ObjectUtil.isEmpty(start_device_json)) { if (!ObjectUtil.isEmpty(start_device_json)) {
@ -156,7 +153,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
} }
JSONObject jo = new JSONObject(); JSONObject jo = new JSONObject();
jo.put("task_code", task_code); 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("start_point_code", start_point_code);
jo.put("next_point_code", next_point_code); jo.put("next_point_code", next_point_code);
jo.put("start_parent_code", start_point_code); jo.put("start_parent_code", start_point_code);
@ -192,7 +189,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
e.printStackTrace(); e.printStackTrace();
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("task_code", task_code); json.put("task_code", task_code);
json.put("task_id", task_id); json.put("task_id", ext_task_uuid);
json.put("message", e.getMessage()); json.put("message", e.getMessage());
errArr.add(json); errArr.add(json);
} }

8
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")) { if (!StrUtil.startWith(dto.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) {
TaskFeedbackDto feefbackdto = taskFeedbackService.findByCode(entity.getTask_code()); TaskFeedbackDto feefbackdto = taskFeedbackService.findByCode(entity.getTask_code());
JSONObject feed_jo = new JSONObject(); 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_code", dto.getTask_code());
feed_jo.put("task_status", dto.getTask_status()); feed_jo.put("task_status", dto.getTask_status());
JSONArray ja = new JSONArray(); JSONArray ja = new JSONArray();
@ -721,7 +721,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) { if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) {
TaskFeedbackDto feefbackdto = taskFeedbackService.findByCode(entity.getTask_code()); TaskFeedbackDto feefbackdto = taskFeedbackService.findByCode(entity.getTask_code());
JSONObject feed_jo = new JSONObject(); 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_code", entity.getTask_code());
feed_jo.put("task_status", entity.getTask_status()); feed_jo.put("task_status", entity.getTask_status());
JSONArray ja = new JSONArray(); JSONArray ja = new JSONArray();
@ -766,7 +766,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
} }
} else { } else {
int status = body.getStatus(); int status = body.getStatus();
JSONObject jo = (JSONObject) JSONObject.toJSON(body.body()); JSONObject jo = JSONObject.parseObject(body.body());
if (ObjectUtil.isEmpty(feefbackdto)) { if (ObjectUtil.isEmpty(feefbackdto)) {
feefbackdto = new TaskFeedbackDto(); feefbackdto = new TaskFeedbackDto();
feefbackdto.setTask_id(entity.getTask_id()); feefbackdto.setTask_id(entity.getTask_id());
@ -844,7 +844,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
String hasWms = acsConfigService.findConfigFromCache().get(AcsConfig.HASWMS); String hasWms = acsConfigService.findConfigFromCache().get(AcsConfig.HASWMS);
if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) { if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) {
JSONObject feed_jo = new JSONObject(); 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_code", entity.getTask_code());
feed_jo.put("task_status", entity.getTask_status()); feed_jo.put("task_status", entity.getTask_status());
JSONArray ja = new JSONArray(); JSONArray ja = new JSONArray();

Loading…
Cancel
Save