fix:去除堆垛机出库任务限制

This commit is contained in:
miguannan
2026-08-12 15:41:50 +07:00
parent 45a64a66b3
commit 1565e56f74
2 changed files with 38 additions and 4 deletions

View File

@@ -794,6 +794,40 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
}
List<String> keys = Arrays.asList(ItemProtocol.TO_TARGET.getKey(), ItemProtocol.TO_TASK.getKey(), ItemProtocol.TO_COMMAND.getKey());
List<Object> values = Arrays.asList(getTargetAddress(next_device), Integer.parseInt(inst.getInstruction_code()), 1);
TaskDto taskDto = taskService.findByBarcodeFromCache(queryBarcode);
InteractionJsonDTO interactionJsonDTO;
if (ObjectUtil.isNotEmpty(taskDto)){
interactionJsonDTO = JSON.parseObject(taskDto.getInteraction_json(), InteractionJsonDTO.class);
if (ObjectUtil.isNotEmpty(interactionJsonDTO))
{
String containerType = interactionJsonDTO.getContainerType();
if (StrUtil.isNotBlank(containerType)) {
keys.add(ItemProtocol.TO_CONTAINER_TYPE.getKey());
values.add(Integer.parseInt(containerType));
}
String heightLevel = interactionJsonDTO.getHeightLevel();
if (StrUtil.isNotBlank(heightLevel)) {
keys.add(ItemProtocol.TO_HEIGHT_LEVEL.getKey());
values.add(Integer.parseInt(heightLevel));
}
String type = interactionJsonDTO.getType();
if (StrUtil.isNotBlank(type)) {
keys.add(ItemProtocol.TO_BACK_UP_1.getKey());
values.add(Integer.parseInt(type));
}
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getIsUncap()))
{
keys.add(ItemProtocol.TO_BACK_UP_2.getKey());
values.add(Integer.parseInt(interactionJsonDTO.getIsUncap()));
}
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getMaterialBarcode()))
{
keys.add(ItemProtocol.MATERIAL_BARCODE.getKey());
values.add(interactionJsonDTO.getMaterialBarcode());
}
}
}
this.writing(keys, values);
this.requireSuccess = true;
return;

View File

@@ -217,11 +217,11 @@ public class CreateDDJInst {
Instruction instdto = new Instruction();
if (CollUtil.isEmpty(byDeviceCodes)) {
//判断有没有DDJ对接位出入库的指令,只判断终点
List<Instruction> byCodeAndExcute = instructionService.findByNextCode(next_device_code);
/* List<Instruction> byCodeAndExcute = instructionService.findByNextCode(next_device_code);
if (CollUtil.isNotEmpty(byCodeAndExcute)){
// ((StandardStackerDeviceDriver) deviceByCode.getDeviceDriver()).setNotCreateInstMessage("有DDJ对接位为终点的指令");
continue;
}
}*/
instdto.setInstruction_type(task_type);
instdto.setInstruction_id(IdUtil.simpleUUID());
instdto.setRoute_plan_code(route_plan_code);
@@ -319,11 +319,11 @@ public class CreateDDJInst {
if (StrUtil.isNotEmpty(count)) {
if (max <= Integer.parseInt(count)) {
//判断有没有DDJ对接位出入库的指令,只判断终点
List<Instruction> byCodeAndExcute = instructionService.findByNextCode(next_device_code);
/* List<Instruction> byCodeAndExcute = instructionService.findByNextCode(next_device_code);
if (CollUtil.isNotEmpty(byCodeAndExcute)){
// ((StandardStackerDeviceDriver) deviceByCode.getDeviceDriver()).setNotCreateInstMessage("有DDJ对接位为终点的指令");
continue;
}
}*/
instdto.setInstruction_type(task_type);
instdto.setInstruction_id(IdUtil.simpleUUID());
instdto.setRoute_plan_code(route_plan_code);