diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java index 3354d8c..005a242 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java @@ -811,44 +811,44 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { wo.update(json); removeByCodeFromCache(entity.getTask_code()); // 判断是否为WMS下发的任务,如果是反馈任务状态给WMS -// String hasWms = paramService.findByCode(AcsConfig.HASWMS).getValue(); -// if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) { -// TaskFeedbackDto feefbackdto = taskFeedbackService.findByCode(entity.getTask_code()); -// System.out.println(feefbackdto == null); -// JSONObject feed_jo = new JSONObject(); -// feed_jo.put("task_id", entity.getTask_id()); -// feed_jo.put("task_code", entity.getTask_code()); -// feed_jo.put("task_status", entity.getTask_status()); -// JSONArray ja = new JSONArray(); -// ja.add(feed_jo); -// -// try { -// JSONObject request1 = new JSONObject(); -// request1.put("REQCODE", entity.getExt_task_id()); -// request1.put("TASKCODE", entity.getTask_code()); -// request1.put("PODCODE", entity.getVehicle_code()); -// request1.put("TASKTYPE", entity.getTask_type()); -// request1.put("METHOD", "3"); -// request1.put("REQTIME", DateUtil.now()); -// log.info("atrAgvCallback 请求参数:" + request1.toString()); -// String str1 = new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request1.toJSONString()); -// log.info("atrAgvCallback 返回参数:" + str1); -// -// JSONObject request = new JSONObject(); -// request.put("REQCODE", entity.getExt_task_id()); -// request.put("TASKCODE", entity.getTask_code()); -// request.put("PODCODE", entity.getVehicle_code()); -// request.put("TASKTYPE", entity.getTask_type()); -// request.put("METHOD", "5"); -// request.put("REQTIME", DateUtil.now()); -// log.info("atrAgvCallback 请求参数:" + request.toString()); -// String str = new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request.toJSONString()); -// log.info("atrAgvCallback 返回参数:" + str); -// } catch (Exception e) { -// e.printStackTrace(); -// throw new BadRequestException(e.getMessage()); -// } -// } + String hasWms = paramService.findByCode(AcsConfig.HASWMS).getValue(); + if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) { + TaskFeedbackDto feefbackdto = taskFeedbackService.findByCode(entity.getTask_code()); + System.out.println(feefbackdto == null); + JSONObject feed_jo = new JSONObject(); + feed_jo.put("task_id", entity.getTask_id()); + feed_jo.put("task_code", entity.getTask_code()); + feed_jo.put("task_status", entity.getTask_status()); + JSONArray ja = new JSONArray(); + ja.add(feed_jo); + + try { + JSONObject request1 = new JSONObject(); + request1.put("REQCODE", entity.getExt_task_id()); + request1.put("TASKCODE", entity.getTask_code()); + request1.put("PODCODE", entity.getVehicle_code()); + request1.put("TASKTYPE", entity.getTask_type()); + request1.put("METHOD", "3"); + request1.put("REQTIME", DateUtil.now()); + log.info("atrAgvCallback 请求参数:" + request1.toString()); + String str1 = new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request1.toJSONString()); + log.info("atrAgvCallback 返回参数:" + str1); + + JSONObject request = new JSONObject(); + request.put("REQCODE", entity.getExt_task_id()); + request.put("TASKCODE", entity.getTask_code()); + request.put("PODCODE", entity.getVehicle_code()); + request.put("TASKTYPE", entity.getTask_type()); + request.put("METHOD", "5"); + request.put("REQTIME", DateUtil.now()); + log.info("atrAgvCallback 请求参数:" + request.toString()); + String str = new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request.toJSONString()); + log.info("atrAgvCallback 返回参数:" + str); + } catch (Exception e) { + e.printStackTrace(); + throw new BadRequestException(e.getMessage()); + } + } // 如果属于先知AGV,关闭运单序列 if (StrUtil.equals(paramService.findByCode(AcsConfig.AGVTYPE).getValue(), "3")) { try {