From 4c3e288ccab6190d81b47727e6967630ab54ab3b Mon Sep 17 00:00:00 2001 From: pangshenghao Date: Fri, 14 Jul 2023 13:39:58 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=9Essx01=E4=BA=A4=E4=BA=92=E4=B8=8D?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E4=B8=8A=E4=BD=8D=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../agv/ndcone/AgvNdcOneDeviceDriver.java | 16 ++++++++++++---- .../nl/modules/quartz/task/AutoCreateInst.java | 8 +++++++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java index d415712..8cf2789 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java @@ -168,7 +168,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic } Object reqWms = device.getExtraValue().get("reqWms"); - if (ObjectUtil.isNotEmpty(reqWms) && reqWms.toString().equals("true")&& !StrUtil.startWith(inst.getTask_code(), "-") && StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(),"1")) { + if (ObjectUtil.isNotEmpty(reqWms) && reqWms.toString().equals("true")&& !StrUtil.startWith(inst.getTask_code(), "-") && StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(),"1") + &&(StrUtil.equals("SSX01",inst.getStart_device_code())|| + StrUtil.equals("SSX01",inst.getNext_device_code()))) { JSONArray req = new JSONArray(); JSONObject map = new JSONObject(); map.put("vehicle_code", inst.getVehicle_code()); @@ -229,7 +231,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic } Object reqWms = device.getExtraValue().get("reqWms"); - if (ObjectUtil.isNotEmpty(reqWms) && reqWms.toString().equals("true") && !StrUtil.startWith(inst.getTask_code(), "-") && StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(),"1")) { + if (ObjectUtil.isNotEmpty(reqWms) && reqWms.toString().equals("true") && !StrUtil.startWith(inst.getTask_code(), "-") && StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(),"1") + &&(StrUtil.equals("SSX01",inst.getStart_device_code())|| + StrUtil.equals("SSX01",inst.getNext_device_code()))) { JSONArray req = new JSONArray(); JSONObject map = new JSONObject(); map.put("vehicle_code", inst.getVehicle_code()); @@ -286,7 +290,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic return; } Object reqWms = device.getExtraValue().get("reqWms"); - if (ObjectUtil.isNotEmpty(reqWms) && reqWms.toString().equals("true")&& !StrUtil.startWith(inst.getTask_code(), "-") && StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(),"1")) { + if (ObjectUtil.isNotEmpty(reqWms) && reqWms.toString().equals("true")&& !StrUtil.startWith(inst.getTask_code(), "-") && StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(),"1") + &&(StrUtil.equals("SSX01",inst.getStart_device_code())|| + StrUtil.equals("SSX01",inst.getNext_device_code()))) { JSONArray req = new JSONArray(); JSONObject map = new JSONObject(); map.put("vehicle_code", inst.getVehicle_code()); @@ -344,7 +350,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic return; } Object reqWms = device.getExtraValue().get("reqWms"); - if (ObjectUtil.isNotEmpty(reqWms) && reqWms.toString().equals("true") && !StrUtil.startWith(inst.getTask_code(), "-") && StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(),"1")) { + if (ObjectUtil.isNotEmpty(reqWms) && reqWms.toString().equals("true") && !StrUtil.startWith(inst.getTask_code(), "-") && StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(),"1") + &&(StrUtil.equals("SSX01",inst.getStart_device_code())|| + StrUtil.equals("SSX01",inst.getNext_device_code()))) { JSONArray req = new JSONArray(); JSONObject map = new JSONObject(); map.put("vehicle_code", inst.getVehicle_code()); diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java b/acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java index 34cb7c8..84be844 100644 --- a/acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java +++ b/acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java @@ -9,6 +9,7 @@ import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.ObjectUtils; +import org.nl.acs.AcsConfig; import org.nl.acs.ext.wms.service.AcsToWmsService; import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl; import org.nl.acs.instruction.service.InstructionService; @@ -19,6 +20,8 @@ import org.nl.acs.route.service.RouteLineService; import org.nl.acs.route.service.dto.RouteLineDto; import org.nl.acs.task.service.TaskService; import org.nl.acs.task.service.dto.TaskDto; +import org.nl.modules.system.service.ParamService; +import org.nl.modules.system.service.impl.ParamServiceImpl; import org.nl.modules.wql.util.SpringContextHolder; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -43,6 +46,7 @@ public class AutoCreateInst { RouteLineService routeLineService = SpringContextHolder.getBean(RouteLineService.class); DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class); AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class); + ParamService paramService = SpringContextHolder.getBean(ParamServiceImpl.class); List list = taskserver.queryAll("task_status = '0'"); for (int i = 0; i < list.size(); i++) { @@ -76,7 +80,9 @@ public class AutoCreateInst { .getFitDeviceTypes() .get(0) .name(); - if (StrUtil.equals("storage", start_device)) { + if (StrUtil.equals("SSX01",next_device_code) + && !StrUtil.startWith(taskcode, "-") + && StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(),"1")) { JSONArray req = new JSONArray(); JSONObject map = new JSONObject(); map.put("vehicle_code", acsTask.getVehicle_code());