|
|
@ -1031,7 +1031,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper, |
|
|
|
instdto.setPriority(acsTask.getPriority()); |
|
|
|
instdto.setInstruction_status(InstructionStatusEnum.READY.getIndex()); |
|
|
|
instdto.setExecute_device_code(dto.getNext_device_code()); |
|
|
|
if (StrUtil.equals(instdto.getStart_device_code(),"3204")){ |
|
|
|
if (StrUtil.equals(instdto.getStart_device_code(), "3204")) { |
|
|
|
instdto.setInstruction_type(InstTypeEnum.CTU_IN_TASK.getCode()); |
|
|
|
instdto.setAgv_system_type(AgvSystemTypeEnum.HK_SYSTEM_TYPE.getCode()); |
|
|
|
} |
|
|
@ -1599,10 +1599,10 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper, |
|
|
|
if (inst == null) { |
|
|
|
throw new BadRequestException("指令不存在"); |
|
|
|
} |
|
|
|
if (!StrUtil.equals(inst.getSend_status(),"2")){ |
|
|
|
if (!StrUtil.equals(inst.getSend_status(), "2")) { |
|
|
|
throw new BadRequestException("该指令已成功执行,重新下发失败!"); |
|
|
|
} |
|
|
|
if (StrUtil.equals(inst.getAgv_system_type(),AgvSystemTypeEnum.XG_SYSTEM_TYPE.getCode())){ |
|
|
|
if (StrUtil.equals(inst.getAgv_system_type(), AgvSystemTypeEnum.XG_SYSTEM_TYPE.getCode())) { |
|
|
|
UnifiedResponse<JSONObject> resp = xiangGongAgvService.sendOrderSequencesToXZ(inst); |
|
|
|
if (!resp.isSuccess()) { |
|
|
|
inst.setRemark(resp.getMessage()); |
|
|
@ -1610,7 +1610,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper, |
|
|
|
} else { |
|
|
|
inst.setSend_status("1"); |
|
|
|
} |
|
|
|
} else if (StrUtil.equals(inst.getAgv_system_type(),AgvSystemTypeEnum.HK_SYSTEM_TYPE.getCode())){ |
|
|
|
} else if (StrUtil.equals(inst.getAgv_system_type(), AgvSystemTypeEnum.HK_SYSTEM_TYPE.getCode())) { |
|
|
|
List<Map<String, String>> positionCodePath = new ArrayList<>(); |
|
|
|
if (StrUtil.equals(InstTypeEnum.CTU_IN_TASK.getCode(), inst.getInstruction_type())) { |
|
|
|
StorageCell storageCell = storageCellService.getOne(new LambdaQueryWrapper<StorageCell>().eq(StorageCell::getStorage_code, inst.getNext_point_code())); |
|
|
@ -2406,4 +2406,13 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper, |
|
|
|
.orElse(null); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<Instruction> findInstsByNextDeviceCode(String deviceCode) { |
|
|
|
return Optional.ofNullable(this.instructions) |
|
|
|
.orElse(new CopyOnWriteArrayList<>()) |
|
|
|
.stream() |
|
|
|
.filter(inst -> inst.getNext_device_code().equals(deviceCode)) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|