This commit is contained in:
USER-20220102CG\noblelift
2023-02-01 18:29:12 +08:00
parent 3006aede1c
commit 2c13894b60
2 changed files with 7 additions and 8 deletions

View File

@@ -182,7 +182,12 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
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 (mode == 2) {
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);
}
if (mode == 2 || mode == 8) {
if (StrUtil.equals(inst.getInstruction_status(), "1")) {
if (StrUtil.equals(this.getDeviceCode(), inst.getNext_device_code())) {
vehicle_code = inst.getVehicle_code();
@@ -196,12 +201,6 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
}
}
} else {
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

@@ -679,7 +679,7 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
applyLabelingAndBindingRequest.setDevice_code(start_point_code);
applyLabelingAndBindingRequest.setType("1");
applyLabelingAndBindingRequest.setVehicle_code(vehicle_code);
applyLabelingAndBindingRequest.setWeight(String.valueOf(weight/10));
applyLabelingAndBindingRequest.setWeight(String.valueOf(weight/100));
ApplyLabelingAndBindingResponse applyLabelingAndBindingResponse = acsToWmsService.applyLabelingAndBindingRequest(applyLabelingAndBindingRequest);
if(applyLabelingAndBindingResponse.getstatus() == 200){