From c52eb4a4a842804e9c3b24bec1f87ea514734198 Mon Sep 17 00:00:00 2001 From: "USER-20220102CG\\noblelift" <546428999@qq.com> Date: Wed, 3 Aug 2022 10:52:20 +0800 Subject: [PATCH] 1 --- .../lnsh_station/LnshStationDeviceDriver.java | 3 +-- .../acs/order/service/wql/QPRODUCESHIFTORDER.wql | 1 + .../service/impl/TaskFeedbackServiceImpl.java | 9 +++++++-- .../nl/modules/quartz/task/AutoCreateInst.java | 16 ---------------- 4 files changed, 9 insertions(+), 20 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 a9815a5..23cec67 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 @@ -273,9 +273,8 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json); if (result.getStatus() == 200) { this.writing(this.mode); + requireSucess = true; } - - requireSucess = true; return true; } } diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/order/service/wql/QPRODUCESHIFTORDER.wql b/acs/hd/nladmin-system/src/main/java/org/nl/acs/order/service/wql/QPRODUCESHIFTORDER.wql index 533bf3d..bcc7f25 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/order/service/wql/QPRODUCESHIFTORDER.wql +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/order/service/wql/QPRODUCESHIFTORDER.wql @@ -72,6 +72,7 @@ WHERE prod.is_deleted = '0' and prod.order_status != '2' + and prod.order_status != '3' OPTION 输入.order_code <> "" prod.order_code like 输入.order_code ENDOPTION diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskFeedbackServiceImpl.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskFeedbackServiceImpl.java index a916c1c..39b751c 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskFeedbackServiceImpl.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskFeedbackServiceImpl.java @@ -4,7 +4,9 @@ package org.nl.acs.task.service.impl; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.ObjectUtil; import cn.hutool.http.HttpResponse; +import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import lombok.RequiredArgsConstructor; @@ -75,6 +77,9 @@ public class TaskFeedbackServiceImpl implements TaskFeedbackService { public TaskFeedbackDto findByCode(String code) { WQLObject wo = WQLObject.getWQLObject("acs_task_feedback"); JSONObject json = wo.query("task_code ='" + code + "' and is_finished='0' ").uniqueResult(0); + if(ObjectUtil.isEmpty(json)){ + return null; + } final TaskFeedbackDto obj = json.toJavaObject(TaskFeedbackDto.class); return obj; } @@ -166,7 +171,7 @@ public class TaskFeedbackServiceImpl implements TaskFeedbackService { feed_jo.put("task_code", entity.getTask_code()); feed_jo.put("task_status", entity.getTask_status()); JSONArray ja = new JSONArray(); - + ja.add(feed_jo); HttpResponse body = null; String error_message = null; try { @@ -176,7 +181,7 @@ public class TaskFeedbackServiceImpl implements TaskFeedbackService { e.printStackTrace(); } int status = body.getStatus(); - JSONObject jo = (JSONObject) JSONObject.toJSON(body.body()); + JSONObject jo = (JSONObject) JSON.parse(body.body()); dto.setTask_status(entity.getTask_status()); if (status == 200) { diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java b/acs/hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java index a9b5422..263a13a 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java @@ -83,22 +83,6 @@ public class AutoCreateInst { } } - //特殊任务 起点终点处理 -// if (StrUtil.equals("2", acsTask.getTask_type())) { -// next_device_code = acsTask.getNext_device_code(); -// if (StrUtil.equals(appService.findDeviceTypeByCode(next_device_code), "storage")) { -// next_point_code = next_device_code + "-" + acsTask.getTo_y() + "-" + acsTask.getTo_z(); -// } else { -// next_point_code = next_device_code; -// } -// if(taskserver.querySameTaskByType("2")>0){ -// acsTask.setRemark("该任务类型任务暂不允许生成指令"); -// log.debug("该任务类型任务暂不允许生成指令"); -// taskserver.updateByCodeFromCache(acsTask); -// continue; -// } -// } - /** * 开始平均分解校验 */