|
@ -702,16 +702,15 @@ 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_id()); |
|
|
feed_jo.put("Taskcode", dto.getTask_code()); |
|
|
feed_jo.put("task_code", dto.getTask_code()); |
|
|
feed_jo.put("Taskstatus", dto.getTask_status()); |
|
|
feed_jo.put("task_status", dto.getTask_status()); |
|
|
|
|
|
JSONArray ja = new JSONArray(); |
|
|
JSONArray ja = new JSONArray(); |
|
|
ja.add(feed_jo); |
|
|
ja.add(feed_jo); |
|
|
String message = null; |
|
|
String message = null; |
|
|
HttpResponse body = null; |
|
|
HttpResponse body = null; |
|
|
boolean flag = false; |
|
|
boolean flag = false; |
|
|
try { |
|
|
try { |
|
|
body = acstowmsService.feedbackTaskStatusToWms(ja); |
|
|
// body = acstowmsService.feedbackTaskStatusToWms(ja);
|
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
flag = true; |
|
|
flag = true; |
|
|
message = e.getMessage(); |
|
|
message = e.getMessage(); |
|
@ -719,71 +718,71 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { |
|
|
} finally { |
|
|
} finally { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
if (flag) { |
|
|
// if (flag) {
|
|
|
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());
|
|
|
feefbackdto.setTask_code(entity.getTask_code()); |
|
|
// feefbackdto.setTask_code(entity.getTask_code());
|
|
|
feefbackdto.setTask_status(entity.getTask_status()); |
|
|
// feefbackdto.setTask_status(entity.getTask_status());
|
|
|
feefbackdto.setVehicle_type(entity.getVehicle_type()); |
|
|
// feefbackdto.setVehicle_type(entity.getVehicle_type());
|
|
|
feefbackdto.setVehicle_code(entity.getVehicle_code()); |
|
|
// feefbackdto.setVehicle_code(entity.getVehicle_code());
|
|
|
feefbackdto.setStart_device_code(entity.getStart_device_code()); |
|
|
// feefbackdto.setStart_device_code(entity.getStart_device_code());
|
|
|
feefbackdto.setStart_point_code(entity.getStart_point_code()); |
|
|
// feefbackdto.setStart_point_code(entity.getStart_point_code());
|
|
|
feefbackdto.setNext_device_code(entity.getNext_device_code()); |
|
|
// feefbackdto.setNext_device_code(entity.getNext_device_code());
|
|
|
feefbackdto.setNext_point_code(entity.getNext_point_code()); |
|
|
// feefbackdto.setNext_point_code(entity.getNext_point_code());
|
|
|
feefbackdto.setError_code("400"); |
|
|
// feefbackdto.setError_code("400");
|
|
|
feefbackdto.setIs_finished("0"); |
|
|
// feefbackdto.setIs_finished("0");
|
|
|
feefbackdto.setRemark(message); |
|
|
// feefbackdto.setRemark(message);
|
|
|
taskFeedbackService.create(feefbackdto); |
|
|
// taskFeedbackService.create(feefbackdto);
|
|
|
} else { |
|
|
// } else {
|
|
|
feefbackdto.setTask_status(entity.getTask_status()); |
|
|
// feefbackdto.setTask_status(entity.getTask_status());
|
|
|
feefbackdto.setStart_device_code(entity.getStart_device_code()); |
|
|
// feefbackdto.setStart_device_code(entity.getStart_device_code());
|
|
|
feefbackdto.setStart_point_code(entity.getStart_point_code()); |
|
|
// feefbackdto.setStart_point_code(entity.getStart_point_code());
|
|
|
feefbackdto.setNext_device_code(entity.getNext_device_code()); |
|
|
// feefbackdto.setNext_device_code(entity.getNext_device_code());
|
|
|
feefbackdto.setNext_point_code(entity.getNext_point_code()); |
|
|
// feefbackdto.setNext_point_code(entity.getNext_point_code());
|
|
|
feefbackdto.setError_code("400"); |
|
|
// feefbackdto.setError_code("400");
|
|
|
feefbackdto.setRemark(message); |
|
|
// feefbackdto.setRemark(message);
|
|
|
taskFeedbackService.update(feefbackdto); |
|
|
// taskFeedbackService.update(feefbackdto);
|
|
|
} |
|
|
// }
|
|
|
} else { |
|
|
// } else {
|
|
|
int status = body.getStatus(); |
|
|
// int status = body.getStatus();
|
|
|
JSONObject jo = JSONObject.parseObject(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());
|
|
|
feefbackdto.setTask_code(entity.getTask_code()); |
|
|
// feefbackdto.setTask_code(entity.getTask_code());
|
|
|
feefbackdto.setTask_status(entity.getTask_status()); |
|
|
// feefbackdto.setTask_status(entity.getTask_status());
|
|
|
feefbackdto.setVehicle_type(entity.getVehicle_type()); |
|
|
// feefbackdto.setVehicle_type(entity.getVehicle_type());
|
|
|
feefbackdto.setVehicle_code(entity.getVehicle_code()); |
|
|
// feefbackdto.setVehicle_code(entity.getVehicle_code());
|
|
|
feefbackdto.setError_code(String.valueOf(body.getStatus())); |
|
|
// feefbackdto.setError_code(String.valueOf(body.getStatus()));
|
|
|
feefbackdto.setStart_device_code(entity.getStart_device_code()); |
|
|
// feefbackdto.setStart_device_code(entity.getStart_device_code());
|
|
|
feefbackdto.setStart_point_code(entity.getNext_point_code()); |
|
|
// feefbackdto.setStart_point_code(entity.getNext_point_code());
|
|
|
feefbackdto.setNext_device_code(entity.getNext_device_code()); |
|
|
// feefbackdto.setNext_device_code(entity.getNext_device_code());
|
|
|
feefbackdto.setNext_point_code(entity.getNext_point_code()); |
|
|
// feefbackdto.setNext_point_code(entity.getNext_point_code());
|
|
|
if (status == 200) { |
|
|
// if (status == 200) {
|
|
|
if (StrUtil.equals(entity.getTask_status(), "2")) { |
|
|
// if (StrUtil.equals(entity.getTask_status(), "2")) {
|
|
|
feefbackdto.setIs_finished("1"); |
|
|
// feefbackdto.setIs_finished("1");
|
|
|
} else { |
|
|
// } else {
|
|
|
feefbackdto.setIs_finished("0"); |
|
|
// feefbackdto.setIs_finished("0");
|
|
|
} |
|
|
// }
|
|
|
} else { |
|
|
// } else {
|
|
|
feefbackdto.setIs_finished("0"); |
|
|
// feefbackdto.setIs_finished("0");
|
|
|
feefbackdto.setRemark(jo.getString("message")); |
|
|
// feefbackdto.setRemark(jo.getString("message"));
|
|
|
} |
|
|
// }
|
|
|
taskFeedbackService.create(feefbackdto); |
|
|
// taskFeedbackService.create(feefbackdto);
|
|
|
} else { |
|
|
// } else {
|
|
|
feefbackdto.setTask_status(entity.getTask_status()); |
|
|
// feefbackdto.setTask_status(entity.getTask_status());
|
|
|
if (status == 200) { |
|
|
// if (status == 200) {
|
|
|
} else { |
|
|
// } else {
|
|
|
if (StrUtil.equals(entity.getTask_status(), "2")) { |
|
|
// if (StrUtil.equals(entity.getTask_status(), "2")) {
|
|
|
feefbackdto.setIs_finished("1"); |
|
|
// feefbackdto.setIs_finished("1");
|
|
|
} else { |
|
|
// } else {
|
|
|
feefbackdto.setIs_finished("0"); |
|
|
// feefbackdto.setIs_finished("0");
|
|
|
} |
|
|
// }
|
|
|
} |
|
|
// }
|
|
|
taskFeedbackService.update(feefbackdto); |
|
|
// taskFeedbackService.update(feefbackdto);
|
|
|
} |
|
|
// }
|
|
|
} |
|
|
// }
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
@ -819,9 +818,8 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { |
|
|
TaskFeedbackDto feefbackdto = taskFeedbackService.findByCode(entity.getTask_code()); |
|
|
TaskFeedbackDto feefbackdto = taskFeedbackService.findByCode(entity.getTask_code()); |
|
|
System.out.println(feefbackdto == null); |
|
|
System.out.println(feefbackdto == null); |
|
|
JSONObject feed_jo = new JSONObject(); |
|
|
JSONObject feed_jo = new JSONObject(); |
|
|
feed_jo.put("task_id", entity.getTask_id()); |
|
|
feed_jo.put("Taskcode", entity.getTask_code()); |
|
|
feed_jo.put("task_code", entity.getTask_code()); |
|
|
feed_jo.put("Taskstatus", entity.getTask_status()); |
|
|
feed_jo.put("task_status", entity.getTask_status()); |
|
|
|
|
|
JSONArray ja = new JSONArray(); |
|
|
JSONArray ja = new JSONArray(); |
|
|
ja.add(feed_jo); |
|
|
ja.add(feed_jo); |
|
|
String message = null; |
|
|
String message = null; |
|
@ -953,9 +951,8 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { |
|
|
String hasWms = paramService.findByCode(AcsConfig.HASWMS).getValue(); |
|
|
String hasWms = paramService.findByCode(AcsConfig.HASWMS).getValue(); |
|
|
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.getTask_id()); |
|
|
feed_jo.put("Taskcode", entity.getTask_code()); |
|
|
feed_jo.put("task_code", entity.getTask_code()); |
|
|
feed_jo.put("Taskstatus", entity.getTask_status()); |
|
|
feed_jo.put("task_status", entity.getTask_status()); |
|
|
|
|
|
JSONArray ja = new JSONArray(); |
|
|
JSONArray ja = new JSONArray(); |
|
|
ja.add(feed_jo); |
|
|
ja.add(feed_jo); |
|
|
acstowmsService.feedbackTaskStatusToWms(ja); |
|
|
acstowmsService.feedbackTaskStatusToWms(ja); |
|
|