fix 清楚指令号、增加条码

This commit is contained in:
USER-20220102CG\noblelift
2023-06-01 16:34:38 +08:00
parent bbdfe376d6
commit c1e8d6fe11
2 changed files with 9 additions and 13 deletions

View File

@@ -277,14 +277,14 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
inst.setInstruction_status("1");
inst.setExecute_device_code(this.device_code);
instructionService.update(inst);
logServer.deviceExecuteLog(device_code, "", "", "入库输送线任务开始反馈执行中状态,反馈成功,指令号:" + task);
logServer.deviceExecuteLog(device_code, "", "", "入库输送线任务开始反馈执行中状态,反馈成功,指令号:" + task + ",载具号:"+ 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();
logServer.deviceExecuteLog(device_code, "", "", "入库输送线任务开始反馈完成状态,反馈成功,指令号:" + task);
logServer.deviceExecuteLog(device_code, "", "", "入库输送线任务开始反馈完成状态,反馈成功,指令号:" + task + ",载具号:"+ inst.getVehicle_code());
} else {

View File

@@ -231,7 +231,7 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
inst.setInstruction_status("1");
inst.setExecute_device_code(this.device_code);
instructionService.update(inst);
logServer.deviceExecuteLog(device_code, "", "", "入库输送线任务开始反馈执行中状态,反馈成功,指令号:" + task);
logServer.deviceExecuteLog(device_code, "", "", "入库输送线任务开始反馈执行中状态,反馈成功,指令号:" + task + ",载具号:"+ inst.getVehicle_code());
}
if (StrUtil.equals(inst.getInstruction_status(), "1")) {
if (!StrUtil.equals(inst.getExecute_code(), this.device_code)) {
@@ -340,10 +340,10 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
map.put("code", "to_target");
map.put("value", "0");
list.add(map);
// Map map2 = new HashMap();
// map2.put("code", "to_task");
// map2.put("value", "0");
// list.add(map2);
Map map2 = new HashMap();
map2.put("code", "to_task");
map2.put("value", "0");
list.add(map2);
Map map3 = new HashMap();
map3.put("code", "to_command");
map3.put("value", "0");
@@ -611,7 +611,7 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
} catch (Exception e) {
e.printStackTrace();
}
logServer.deviceExecuteLog(device_code, "", "", "入库输送线任务开始反馈完成状态,反馈成功,指令号:" + task);
logServer.deviceExecuteLog(device_code, "", "", "入库输送线任务开始反馈完成状态,反馈成功,指令号:" + task + ",载具号:"+ inst.getVehicle_code());
}
}
} else {
@@ -792,16 +792,12 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
list.add(map);
Map map2 = new HashMap();
map2.put("code", "to_task");
map2.put("value", "0");
map2.put("value", inst.getInstruction_code());
list.add(map2);
Map map3 = new HashMap();
map3.put("code", "to_command");
map3.put("value", "1");
list.add(map3);
Map map4 = new HashMap();
map2.put("code", "to_task");
map2.put("value", inst.getInstruction_code());
list.add(map4);
this.writing(list);
if (task != Integer.parseInt(inst.getInstruction_code())) {
this.writing(list);