Browse Source

非ssx01交互不请求上位系统

master
pangshenghao 1 year ago
parent
commit
4c3e288cca
  1. 16
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java
  2. 8
      acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java

16
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"); 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(); JSONArray req = new JSONArray();
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("vehicle_code", inst.getVehicle_code()); map.put("vehicle_code", inst.getVehicle_code());
@ -229,7 +231,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
} }
Object reqWms = device.getExtraValue().get("reqWms"); 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(); JSONArray req = new JSONArray();
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("vehicle_code", inst.getVehicle_code()); map.put("vehicle_code", inst.getVehicle_code());
@ -286,7 +290,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
return; return;
} }
Object reqWms = device.getExtraValue().get("reqWms"); 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(); JSONArray req = new JSONArray();
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("vehicle_code", inst.getVehicle_code()); map.put("vehicle_code", inst.getVehicle_code());
@ -344,7 +350,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
return; return;
} }
Object reqWms = device.getExtraValue().get("reqWms"); 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(); JSONArray req = new JSONArray();
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("vehicle_code", inst.getVehicle_code()); map.put("vehicle_code", inst.getVehicle_code());

8
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 com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils; 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.AcsToWmsService;
import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl; import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
import org.nl.acs.instruction.service.InstructionService; 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.route.service.dto.RouteLineDto;
import org.nl.acs.task.service.TaskService; import org.nl.acs.task.service.TaskService;
import org.nl.acs.task.service.dto.TaskDto; 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.nl.modules.wql.util.SpringContextHolder;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@ -43,6 +46,7 @@ public class AutoCreateInst {
RouteLineService routeLineService = SpringContextHolder.getBean(RouteLineService.class); RouteLineService routeLineService = SpringContextHolder.getBean(RouteLineService.class);
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class); DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class); AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class);
ParamService paramService = SpringContextHolder.getBean(ParamServiceImpl.class);
List<TaskDto> list = taskserver.queryAll("task_status = '0'"); List<TaskDto> list = taskserver.queryAll("task_status = '0'");
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
@ -76,7 +80,9 @@ public class AutoCreateInst {
.getFitDeviceTypes() .getFitDeviceTypes()
.get(0) .get(0)
.name(); .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(); JSONArray req = new JSONArray();
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("vehicle_code", acsTask.getVehicle_code()); map.put("vehicle_code", acsTask.getVehicle_code());

Loading…
Cancel
Save