更新wms接口

This commit is contained in:
loujf
2022-08-04 10:25:25 +08:00
parent 1500f11571
commit f403b6c3d2
3 changed files with 7 additions and 11 deletions

View File

@@ -284,7 +284,6 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
JSONObject json = new JSONObject();
json.put("device_code",this.device_code);
json.put("type","4");
json.put("vehicle_code",barcode);
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
if (ObjectUtil.isNotEmpty(result)) {
JSONObject jsonObject = JSONObject.parseObject(result.body());

View File

@@ -89,7 +89,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");
@@ -104,9 +104,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)) {
@@ -158,7 +155,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);
@@ -194,7 +191,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("ext_task_uuid", ext_task_uuid);
json.put("message", e.getMessage());
errArr.add(json);
}

View File

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