更新
This commit is contained in:
@@ -128,7 +128,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
String device_code;
|
||||
|
||||
String vehicle_code;
|
||||
|
||||
String last_vehicle_code;
|
||||
|
||||
@Override
|
||||
public Device getDevice() {
|
||||
@@ -163,6 +163,9 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
inst_message = null;
|
||||
this.clearWrite();
|
||||
}
|
||||
if(move == 0 && last_move == 1 ){
|
||||
last_vehicle_code = vehicle_code;
|
||||
}
|
||||
if (move == 0 && last_move == 1 && "06".equals(this.device.getRegion())) {
|
||||
this.requiresShipDeviceUpdate = false;
|
||||
}
|
||||
@@ -188,6 +191,7 @@ 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();
|
||||
vehicle_code = inst.getVehicle_code();
|
||||
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);
|
||||
@@ -210,6 +214,8 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
}
|
||||
} else {
|
||||
// logServer.deviceExecuteLog(device_code, "", "", "输送线任务开始反馈任务状态,反馈失败,查询不到指令号:" + task);
|
||||
message = "输送线任务反馈状态,查询不到指令号:" + task +"指令已完成";
|
||||
inst_message = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,7 +243,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
} else {
|
||||
this.setIsonline(true);
|
||||
this.setIserror(false);
|
||||
message = "";
|
||||
// message = "";
|
||||
Instruction instruction = null;
|
||||
List toInstructions;
|
||||
|
||||
@@ -467,6 +473,9 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
jo.put("move", move);
|
||||
jo.put("carrier_direction", carrier_direction);
|
||||
jo.put("task", task);
|
||||
jo.put("last_task", last_task);
|
||||
// jo.put("barcode", barcode);
|
||||
// jo.put("last_task", last_task);
|
||||
jo.put("inst_message", this.inst_message);
|
||||
jo.put("isOnline", this.getIsonline());
|
||||
jo.put("error", this.getError());
|
||||
@@ -554,6 +563,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
this.writing(list);
|
||||
if (task != Integer.parseInt(inst.getInstruction_code())) {
|
||||
this.writing(list);
|
||||
message = "重新下发电气信号";
|
||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
||||
}
|
||||
message = "下发电气任务号成功";
|
||||
@@ -660,6 +670,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
this.writing(list);
|
||||
if (task != Integer.parseInt(inst.getInstruction_code())) {
|
||||
this.writing(list);
|
||||
message = "重新下发电气信号";
|
||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -184,7 +184,6 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
||||
|
||||
@Override
|
||||
public void execute(){
|
||||
String message = null;
|
||||
try {
|
||||
device_code = this.getDeviceCode();
|
||||
heartbeat = this.itemProtocol.getHeartbeat();
|
||||
@@ -204,7 +203,7 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
||||
}
|
||||
}
|
||||
if (move != last_move) {
|
||||
if (move == 0 && mode == 2) {
|
||||
if (move == 0) {
|
||||
message = null;
|
||||
inst_message = null;
|
||||
clearBarcode();
|
||||
|
||||
@@ -575,17 +575,17 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
|
||||
wo.update(json);
|
||||
|
||||
Iterator<Instruction> iterator = instructions.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
Instruction instruction = iterator.next();
|
||||
if (instruction.getInstruction_code().equals(dto.getInstruction_code())) {
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
if (StrUtil.equals(dto.getInstruction_status(), "0") || StrUtil.equals(dto.getInstruction_status(), "1")) {
|
||||
instructions.add(dto);
|
||||
}
|
||||
|
||||
// Iterator<Instruction> iterator = instructions.iterator();
|
||||
// while (iterator.hasNext()) {
|
||||
// Instruction instruction = iterator.next();
|
||||
// if (instruction.getInstruction_code().equals(dto.getInstruction_code())) {
|
||||
// iterator.remove();
|
||||
// }
|
||||
// }
|
||||
// if (StrUtil.equals(dto.getInstruction_status(), "0") || StrUtil.equals(dto.getInstruction_status(), "1")) {
|
||||
// instructions.add(dto);
|
||||
// }
|
||||
this.reload();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package org.nl.acs.task;
|
||||
|
||||
public class TaskInstructionLock {
|
||||
public TaskInstructionLock() {
|
||||
}
|
||||
}
|
||||
@@ -368,13 +368,13 @@ export default {
|
||||
} else if (val === 'number') {
|
||||
const obj = { name: '托盘数量', value: data[val] }
|
||||
this.arr.push(obj)
|
||||
} else if (val === 'instruction_message') {
|
||||
} else if (val === 'inst_message') {
|
||||
const obj = { name: '指令信息', value: data[val] }
|
||||
this.arr.push(obj)
|
||||
} else if (val === 'message') {
|
||||
const obj = { name: '备注信息', value: data[val] }
|
||||
this.arr.push(obj)
|
||||
} else if (val === 'last_instruction_message') {
|
||||
} else if (val === 'inst_message') {
|
||||
const obj = { name: '上次指令信息', value: data[val] }
|
||||
this.arr.push(obj)
|
||||
} else if (val === 'barcode') {
|
||||
|
||||
Reference in New Issue
Block a user