rev:申请开盖空指针处理
This commit is contained in:
@@ -160,6 +160,7 @@ public class UnBoxLableConveyorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
String last_vehicle_code;
|
||||
|
||||
String vehicle_code2;
|
||||
|
||||
@Override
|
||||
public Device getDevice() {
|
||||
return this.device;
|
||||
@@ -206,8 +207,8 @@ public class UnBoxLableConveyorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
if (mode == 15 && move == 1 && task > 0) {
|
||||
Instruction instruction = instructionService.findByCode(String.valueOf(task));
|
||||
//不允许开盖,完成出库任务,自动去扫码位
|
||||
if (StrUtil.isEmpty(instruction.getVehicle_code())){
|
||||
message = "任务托盘码为空";
|
||||
if (instruction == null || StrUtil.isEmpty(instruction.getVehicle_code())) {
|
||||
message = "指令信息不存在或者任务托盘码为空,无法开盖";
|
||||
}
|
||||
applyUnbox(instruction.getVehicle_code());
|
||||
|
||||
@@ -226,9 +227,6 @@ public class UnBoxLableConveyorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
last_mode = mode;
|
||||
last_move = move;
|
||||
last_carrier_direction = carrier_direction;
|
||||
|
||||
@@ -2109,8 +2109,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
@Override
|
||||
public Instruction findByStarCodeAndExcute(String start_code) {
|
||||
Optional<Instruction> optionalInstruction = instructions.stream()
|
||||
.filter(instruction -> StrUtil.equals(instruction.getStart_device_code(), start_code)
|
||||
&& StrUtil.equals(instruction.getInstruction_status(), InstructionStatusEnum.READY.getIndex()))
|
||||
.filter(instruction -> StrUtil.equals(instruction.getStart_device_code(), start_code))
|
||||
.findFirst();
|
||||
return optionalInstruction.orElse(null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user