|
@ -69,12 +69,9 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { |
|
|
|
|
|
|
|
|
public void autoRun() throws IOException { |
|
|
public void autoRun() throws IOException { |
|
|
System.out.println("NDCAgv链接开始"); |
|
|
System.out.println("NDCAgv链接开始"); |
|
|
ParamService ParamService = SpringContextHolder.getBean(ParamServiceImpl.class); |
|
|
|
|
|
InstructionService instructionService = SpringContextHolder.getBean(InstructionServiceImpl.class); |
|
|
InstructionService instructionService = SpringContextHolder.getBean(InstructionServiceImpl.class); |
|
|
AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class); |
|
|
|
|
|
NDCAgvService NDCAgvService = SpringContextHolder.getBean(NDCAgvService.class); |
|
|
NDCAgvService NDCAgvService = SpringContextHolder.getBean(NDCAgvService.class); |
|
|
DeviceAppService deviceAppService = SpringContextHolder.getBean(DeviceAppService.class); |
|
|
DeviceAppService deviceAppService = SpringContextHolder.getBean(DeviceAppService.class); |
|
|
DeviceService deviceService = SpringContextHolder.getBean(DeviceService.class); |
|
|
|
|
|
DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class); |
|
|
DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class); |
|
|
ip = paramService.findByCode(AcsConfig.AGVURL).getValue(); |
|
|
ip = paramService.findByCode(AcsConfig.AGVURL).getValue(); |
|
|
port = Integer.parseInt(paramService.findByCode(AcsConfig.AGVPORT).getValue()); |
|
|
port = Integer.parseInt(paramService.findByCode(AcsConfig.AGVPORT).getValue()); |
|
@ -163,10 +160,10 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { |
|
|
if (!ObjectUtil.isEmpty(inst)) { |
|
|
if (!ObjectUtil.isEmpty(inst)) { |
|
|
instructionService.finish(inst.getInstruction_id()); |
|
|
instructionService.finish(inst.getInstruction_id()); |
|
|
} else { |
|
|
} else { |
|
|
log.warn("指令号:{},未反馈wms任务完成,因为agv上报指令号查询指令为空!",inst.getInstruction_code()); |
|
|
log.warn("指令号:{},未反馈wms任务完成,因为agv上报指令号查询指令为空!", inst.getInstruction_code()); |
|
|
} |
|
|
} |
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
log.info("指令号:{},已反馈agv任务完成!",inst.getInstruction_code()); |
|
|
log.info("指令号:{},已反馈agv任务完成!", inst.getInstruction_code()); |
|
|
} |
|
|
} |
|
|
//请求删除任务
|
|
|
//请求删除任务
|
|
|
//(需要WCS反馈)
|
|
|
//(需要WCS反馈)
|
|
@ -178,9 +175,7 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { |
|
|
else if (phase == 0xFF) { |
|
|
else if (phase == 0xFF) { |
|
|
|
|
|
|
|
|
if (!ObjectUtil.isEmpty(inst)) { |
|
|
if (!ObjectUtil.isEmpty(inst)) { |
|
|
if (!ObjectUtil.isEmpty(inst)) { |
|
|
instructionService.cancelNOSendAgv(inst.getInstruction_id()); |
|
|
instructionService.cancelNOSendAgv(inst.getInstruction_id()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
|
|
|
|
|