|
@ -66,7 +66,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu |
|
|
@Autowired |
|
|
@Autowired |
|
|
DeviceAppService deviceAppService; |
|
|
DeviceAppService deviceAppService; |
|
|
@Autowired |
|
|
@Autowired |
|
|
NDCAgvService ndcAgvService; |
|
|
XianGongAgvService agvService; |
|
|
@Autowired |
|
|
@Autowired |
|
|
ParamService paramService; |
|
|
ParamService paramService; |
|
|
@Autowired |
|
|
@Autowired |
|
@ -455,12 +455,13 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu |
|
|
if (StrUtil.equals(paramService.findByCode(AcsConfig.AGVTYPE).getValue(), "2")) { |
|
|
if (StrUtil.equals(paramService.findByCode(AcsConfig.AGVTYPE).getValue(), "2")) { |
|
|
|
|
|
|
|
|
if (StrUtil.equals("1", dto.getInstruction_type())) { |
|
|
if (StrUtil.equals("1", dto.getInstruction_type())) { |
|
|
ndcAgvService.sendAgvTwoInstToNDC(dto, dto2); |
|
|
agvService.sendOrderSequencesToXZ(dto); |
|
|
|
|
|
agvService.sendOrderSequencesToXZ(dto2); |
|
|
dto.setSend_status("1"); |
|
|
dto.setSend_status("1"); |
|
|
dto2.setSend_status("1"); |
|
|
dto2.setSend_status("1"); |
|
|
} else if (StrUtil.equals("2", dto.getInstruction_type())) { |
|
|
} else if (StrUtil.equals("2", dto.getInstruction_type())) { |
|
|
dto.setSend_status("1"); |
|
|
dto.setSend_status("1"); |
|
|
ndcAgvService.sendAgvTwoInstToNDC(dto, null); |
|
|
agvService.sendOrderSequencesToXZ(dto); |
|
|
} else if (StrUtil.equals("3", dto.getInstruction_type())) { |
|
|
} else if (StrUtil.equals("3", dto.getInstruction_type())) { |
|
|
|
|
|
|
|
|
} else if (StrUtil.equals("4", dto.getInstruction_type())) { |
|
|
} else if (StrUtil.equals("4", dto.getInstruction_type())) { |
|
@ -469,13 +470,13 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu |
|
|
|
|
|
|
|
|
} else if (StrUtil.equals("6", dto.getInstruction_type())) { |
|
|
} else if (StrUtil.equals("6", dto.getInstruction_type())) { |
|
|
dto.setSend_status("1"); |
|
|
dto.setSend_status("1"); |
|
|
ndcAgvService.sendAgvOneInstToNDC(dto); |
|
|
agvService.sendOrderSequencesToXZ(dto); |
|
|
} else if (StrUtil.equals("7", dto.getInstruction_type())) { |
|
|
} else if (StrUtil.equals("7", dto.getInstruction_type())) { |
|
|
ndcAgvService.sendAgvOneInstToNDC(dto); |
|
|
agvService.sendOrderSequencesToXZ(dto); |
|
|
dto.setSend_status("1"); |
|
|
dto.setSend_status("1"); |
|
|
} else if (StrUtil.equals("8", dto.getInstruction_type())) { |
|
|
} else if (StrUtil.equals("8", dto.getInstruction_type())) { |
|
|
dto.setSend_status("1"); |
|
|
dto.setSend_status("1"); |
|
|
ndcAgvService.sendAgvOneInstToNDC(dto); |
|
|
agvService.sendOrderSequencesToXZ(dto); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
@ -861,14 +862,14 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu |
|
|
// != 0 为agv任务 1=magic 2=NDC 3=XZ,4=ZHEDA
|
|
|
// != 0 为agv任务 1=magic 2=NDC 3=XZ,4=ZHEDA
|
|
|
if (StrUtil.equals(paramService.findByCode(AcsConfig.AGVTYPE).getValue(), "1") |
|
|
if (StrUtil.equals(paramService.findByCode(AcsConfig.AGVTYPE).getValue(), "1") |
|
|
&& !StrUtil.equals(entity.getSend_status(), "2")) { |
|
|
&& !StrUtil.equals(entity.getSend_status(), "2")) { |
|
|
MagicAgvService magicAgvService = SpringContextHolder.getBean(MagicAgvService.class); |
|
|
XianGongAgvService agvService = SpringContextHolder.getBean(XianGongAgvService.class); |
|
|
magicAgvService.deleteAgvInst(entity.getInstruction_code()); |
|
|
agvService.deleteXZAgvInst(entity.getInstruction_code()); |
|
|
flag = true; |
|
|
flag = true; |
|
|
|
|
|
|
|
|
} else if (StrUtil.equals(paramService.findByCode(AcsConfig.AGVTYPE).getValue(), "2")) { |
|
|
} else if (StrUtil.equals(paramService.findByCode(AcsConfig.AGVTYPE).getValue(), "2")) { |
|
|
//NDC agv指令不当场取消指令,需要等agv上报
|
|
|
//NDC agv指令不当场取消指令,需要等agv上报
|
|
|
if (!StrUtil.isEmpty(entity.getAgv_jobno())) { |
|
|
if (!StrUtil.isEmpty(entity.getAgv_jobno())) { |
|
|
ndcAgvService.deleteAgvInstToNDC(entity); |
|
|
agvService.deleteXZAgvInst(entity.getInstruction_code()); |
|
|
} else { |
|
|
} else { |
|
|
flag = true; |
|
|
flag = true; |
|
|
} |
|
|
} |
|
|