Browse Source

终点寻找起点路由生成指令改造

master
pangshenghao 1 year ago
parent
commit
f59370c023
  1. 7
      acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_inspect_site/StandardInspectSiteDeviceDriver.java
  2. 3
      acs/hd/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java
  3. 1
      acs/hd/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java

7
acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_inspect_site/StandardInspectSiteDeviceDriver.java

@ -493,15 +493,20 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
try {
if (taskList.size() != 0) {
for (TaskDto task : taskList) {
log.warn("当前取消任务code为{}",task.getTask_code());
System.out.println("当前取消任务code为"+task.getTask_code());
Instruction inst = instructionService.findByTaskCodeFromCache(task.getTask_code());
if (ObjectUtil.isNotEmpty(inst)) {
log.warn("当前取消指令id为{}",inst.getInstruction_id());
System.out.println("当前取消指令id为"+inst.getInstruction_id());
instructionService.cancel(inst.getInstruction_id());
}
taskserver.cancel(task.getTask_id());
}
}
} catch (Exception e) {
e.printStackTrace();
log.error("取消指令异常{}",e,e.getMessage());
System.out.println("取消指令异常"+e.getMessage());
}
writing(6);
return true;

3
acs/hd/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java

@ -876,10 +876,9 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
} else if (StrUtil.equals(acsConfigService.findConfigFromCache().get(AcsConfig.AGVTYPE).toString(), "2")) {
//NDC agv指令不当场取消指令,需要等agv上报
flag = true;
if (!StrUtil.isEmpty(entity.getAgv_jobno())) {
agvService.deleteAgvInstToNDC(entity);
} else {
flag = true;
}
} else if (StrUtil.equals(acsConfigService.findConfigFromCache().get(AcsConfig.AGVTYPE).toString(), "3")
&& !StrUtil.equals(entity.getSend_status(),"2")) {

1
acs/hd/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java

@ -640,6 +640,7 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
else if (phase == 0xFF) {
flag = true;
if (!ObjectUtil.isEmpty(inst)) {
log.info("当前删除instId为[]",inst.getInstruction_id());
instructionService.cancelNOSendAgv(inst.getInstruction_id());
}
data = AgvService.sendAgvOneModeInst(phase, index, 0);

Loading…
Cancel
Save