提交
This commit is contained in:
@@ -182,7 +182,12 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
inst = instructionService.findByCodeFromCache(String.valueOf(task));
|
inst = instructionService.findByCodeFromCache(String.valueOf(task));
|
||||||
if (inst != null) {
|
if (inst != null) {
|
||||||
inst_message = "当前指令号:" + inst.getInstruction_code() + " " + inst.getStart_point_code() + "->" + inst.getNext_point_code() + " 载具号:" + inst.getVehicle_code();
|
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(inst.getInstruction_status(), "1")) {
|
||||||
if (StrUtil.equals(this.getDeviceCode(), inst.getNext_device_code())) {
|
if (StrUtil.equals(this.getDeviceCode(), inst.getNext_device_code())) {
|
||||||
vehicle_code = inst.getVehicle_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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -679,7 +679,7 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
applyLabelingAndBindingRequest.setDevice_code(start_point_code);
|
applyLabelingAndBindingRequest.setDevice_code(start_point_code);
|
||||||
applyLabelingAndBindingRequest.setType("1");
|
applyLabelingAndBindingRequest.setType("1");
|
||||||
applyLabelingAndBindingRequest.setVehicle_code(vehicle_code);
|
applyLabelingAndBindingRequest.setVehicle_code(vehicle_code);
|
||||||
applyLabelingAndBindingRequest.setWeight(String.valueOf(weight/10));
|
applyLabelingAndBindingRequest.setWeight(String.valueOf(weight/100));
|
||||||
ApplyLabelingAndBindingResponse applyLabelingAndBindingResponse = acsToWmsService.applyLabelingAndBindingRequest(applyLabelingAndBindingRequest);
|
ApplyLabelingAndBindingResponse applyLabelingAndBindingResponse = acsToWmsService.applyLabelingAndBindingRequest(applyLabelingAndBindingRequest);
|
||||||
|
|
||||||
if(applyLabelingAndBindingResponse.getstatus() == 200){
|
if(applyLabelingAndBindingResponse.getstatus() == 200){
|
||||||
|
|||||||
Reference in New Issue
Block a user