|
|
@ -14,6 +14,8 @@ import org.nl.acs.instruction.service.impl.InstructionServiceImpl; |
|
|
|
import org.nl.acs.log.service.DeviceExecuteLogService; |
|
|
|
import org.nl.acs.opc.Device; |
|
|
|
import org.nl.acs.opc.DeviceAppService; |
|
|
|
import org.nl.acs.task.service.TaskService; |
|
|
|
import org.nl.acs.task.service.impl.TaskServiceImpl; |
|
|
|
import org.nl.modules.system.service.ParamService; |
|
|
|
import org.nl.modules.system.service.impl.ParamServiceImpl; |
|
|
|
import org.nl.modules.wql.util.SpringContextHolder; |
|
|
@ -76,6 +78,7 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { |
|
|
|
DeviceAppService deviceAppService = SpringContextHolder.getBean(DeviceAppService.class); |
|
|
|
DeviceService deviceService = SpringContextHolder.getBean(DeviceService.class); |
|
|
|
DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class); |
|
|
|
TaskService taskService = SpringContextHolder.getBean(TaskServiceImpl.class); |
|
|
|
ip = paramService.findByCode(AcsConfig.AGVURL).getValue(); |
|
|
|
port = Integer.parseInt(paramService.findByCode(AcsConfig.AGVPORT).getValue()); |
|
|
|
|
|
|
@ -131,9 +134,9 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { |
|
|
|
} |
|
|
|
if (ikey != 0) { |
|
|
|
inst = instructionService.findByCodeFromCache(String.valueOf(ikey)); |
|
|
|
if (ObjectUtil.isEmpty(inst)) { |
|
|
|
inst = instructionService.findByCode(String.valueOf(ikey)); |
|
|
|
} |
|
|
|
// if (ObjectUtil.isEmpty(inst)) {
|
|
|
|
// inst = instructionService.findByCode(String.valueOf(ikey));
|
|
|
|
// }
|
|
|
|
} |
|
|
|
if (!ObjectUtil.isEmpty(link_inst)) { |
|
|
|
link_flag = true; |
|
|
@ -177,11 +180,11 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { |
|
|
|
//(需要WCS反馈)
|
|
|
|
else if (phase == 0xFF) { |
|
|
|
|
|
|
|
if (!ObjectUtil.isEmpty(inst)) { |
|
|
|
if (!ObjectUtil.isEmpty(inst)) { |
|
|
|
instructionService.cancelNOSendAgv(inst.getInstruction_id()); |
|
|
|
taskService.cancel(inst.getTask_id()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
|
|
|
|
} else { |
|
|
|