This commit is contained in:
USER-20220102CG\noblelift
2023-01-29 21:53:37 +08:00
parent f59e144d8d
commit eb0663648b
2 changed files with 16 additions and 4 deletions

View File

@@ -180,13 +180,23 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
//inst_message
inst = instructionService.findByCodeFromCache(String.valueOf(task));
if (inst != null) {
inst_message = "指令号:" + inst.getInstruction_code() + " " + inst.getStart_point_code() + "->" + inst.getNext_point_code() + " 载具号:" + inst.getVehicle_code();
if (StrUtil.equals(inst.getInstruction_status(), "1") && StrUtil.equals(this.getDeviceCode(), inst.getNext_device_code())) {
vehicle_code = inst.getVehicle_code();
finish_instruction();
inst_message = "当前指令号:" + inst.getInstruction_code() + " " + inst.getStart_point_code() + "->" + inst.getNext_point_code() + " 载具号:" + inst.getVehicle_code();
if (StrUtil.equals(inst.getInstruction_status(), "1")) {
if(StrUtil.equals(this.getDeviceCode(), inst.getNext_device_code())){
vehicle_code = inst.getVehicle_code();
inst.setExecute_device_code(this.device_code);
finish_instruction();
} else {
if(!StrUtil.equals(inst.getExecute_code(),this.device_code)){
inst.setExecute_device_code(this.device_code);
instructionService.update(inst);
}
}
}
if (StrUtil.equals(inst.getInstruction_status(), "0") && StrUtil.equals(this.getDeviceCode(), inst.getStart_device_code())) {
inst.setInstruction_status("1");
inst.setExecute_device_code(this.device_code);
instructionService.update(inst);
}
}

View File

@@ -218,10 +218,12 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
if (inst != null) {
inst_message = "指令号:" + inst.getInstruction_code() + " " + inst.getStart_point_code() + "->" + inst.getNext_point_code() + " 载具号:" + inst.getVehicle_code();
if (StrUtil.equals(inst.getInstruction_status(), "1") && StrUtil.equals(this.getDeviceCode(), inst.getNext_device_code())) {
inst.setExecute_device_code(this.device_code);
finish_instruction();
}
if (StrUtil.equals(inst.getInstruction_status(), "0") && StrUtil.equals(this.getDeviceCode(), inst.getStart_device_code())) {
inst.setInstruction_status("1");
inst.setExecute_device_code(this.device_code);
instructionService.update(inst);
}
}