更新日志
This commit is contained in:
@@ -86,6 +86,8 @@ public class CargoLiftConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
|
||||
int last_mode = 0;
|
||||
int last_move = 0;
|
||||
int last_error = 0;
|
||||
int last_task = 0;
|
||||
int last_action = 0;
|
||||
|
||||
String device_code;
|
||||
Instruction inst = null;
|
||||
@@ -111,6 +113,9 @@ public class CargoLiftConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
|
||||
action = this.itemProtocol.getItem_action();
|
||||
|
||||
|
||||
if (mode != last_mode) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
}
|
||||
if (move != last_move) {
|
||||
this.setRequireSucess(false);
|
||||
if (move == 0) {
|
||||
@@ -118,6 +123,13 @@ public class CargoLiftConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
|
||||
}
|
||||
}
|
||||
if (error != last_error) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + "->" + error);
|
||||
}
|
||||
if (task != last_task) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task);
|
||||
}
|
||||
if (action != last_action) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号action:" + last_action + "->" + action);
|
||||
}
|
||||
|
||||
|
||||
@@ -183,6 +195,8 @@ public class CargoLiftConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
|
||||
last_mode = mode;
|
||||
last_move = move;
|
||||
last_error = error;
|
||||
last_task = task;
|
||||
last_action = action;
|
||||
}
|
||||
|
||||
public synchronized boolean finish_instruction() throws Exception {
|
||||
|
||||
@@ -81,6 +81,8 @@ public class EmptyVehicleStackingPositionDeviceDriver extends AbstractOpcDeviceD
|
||||
int last_mode = 0;
|
||||
int last_move = 0;
|
||||
int last_error = 0;
|
||||
int last_task = 0;
|
||||
int last_number = 0;
|
||||
|
||||
String device_code;
|
||||
|
||||
@@ -108,13 +110,19 @@ public class EmptyVehicleStackingPositionDeviceDriver extends AbstractOpcDeviceD
|
||||
|
||||
if (mode != last_mode) {
|
||||
this.setRequireSucess(false);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
}
|
||||
if (move != last_move) {
|
||||
if (move == 0) {
|
||||
thingToNothing();
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号move:" + last_move + "->" + move);
|
||||
}
|
||||
if (error != last_error) {
|
||||
if (task != last_task) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task);
|
||||
}
|
||||
if (number != last_number) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号number:" + last_number + "->" + number);
|
||||
}
|
||||
|
||||
|
||||
@@ -155,6 +163,8 @@ public class EmptyVehicleStackingPositionDeviceDriver extends AbstractOpcDeviceD
|
||||
last_mode = mode;
|
||||
last_move = move;
|
||||
last_error = error;
|
||||
last_task = error;
|
||||
last_number = error;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -82,6 +82,8 @@ public class HaoKaiAutoConveyorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
int last_mode = 0;
|
||||
int last_move = 0;
|
||||
int last_error = 0;
|
||||
int last_task = 0;
|
||||
int last_action = 0;
|
||||
|
||||
String device_code;
|
||||
|
||||
@@ -108,13 +110,23 @@ public class HaoKaiAutoConveyorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
|
||||
if (mode != last_mode) {
|
||||
this.setRequireSucess(false);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "请求标记:" + requireSucess);
|
||||
}
|
||||
if (move != last_move) {
|
||||
if (move == 0) {
|
||||
thingToNothing();
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号move:" + last_move + "->" + move);
|
||||
}
|
||||
if (error != last_error) {
|
||||
|
||||
}
|
||||
if (task != last_task) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task);
|
||||
}
|
||||
if (action != last_action) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号action:" + last_action + "->" + action);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -79,6 +79,9 @@ public class PaintConveyorDeviceDriver extends AbstractOpcDeviceDriver implement
|
||||
int last_mode = 0;
|
||||
int last_move = 0;
|
||||
int last_error = 0;
|
||||
int last_task = 0;
|
||||
int last_number = 0;
|
||||
int last_action = 0;
|
||||
|
||||
String device_code;
|
||||
|
||||
@@ -113,8 +116,20 @@ public class PaintConveyorDeviceDriver extends AbstractOpcDeviceDriver implement
|
||||
if (move == 0) {
|
||||
thingToNothing();
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号move:" + last_move + "->" + move);
|
||||
|
||||
}
|
||||
if (task != last_task) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task);
|
||||
}
|
||||
if (number != last_number) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号number:" + last_number + "->" + number);
|
||||
}
|
||||
if (error != last_error) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + "->" + error);
|
||||
}
|
||||
if (action != last_action) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号action:" + last_action + "->" + action);
|
||||
}
|
||||
|
||||
|
||||
@@ -229,6 +244,9 @@ public class PaintConveyorDeviceDriver extends AbstractOpcDeviceDriver implement
|
||||
last_mode = mode;
|
||||
last_move = move;
|
||||
last_error = error;
|
||||
last_action = action;
|
||||
last_number = number;
|
||||
last_task = task;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||
import org.nl.acs.opc.Device;
|
||||
import org.nl.acs.opc.DeviceAppService;
|
||||
@@ -62,6 +63,8 @@ public class StandardCoveyorControlWithPlcScannerDeviceDriver extends AbstractOp
|
||||
@Autowired
|
||||
AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsService.class);
|
||||
;
|
||||
@Autowired
|
||||
DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class);
|
||||
|
||||
String barcode = null;
|
||||
String formatcode = null;
|
||||
@@ -173,17 +176,22 @@ public class StandardCoveyorControlWithPlcScannerDeviceDriver extends AbstractOp
|
||||
if (error != last_error) {
|
||||
}
|
||||
if (mode == 2 && move != 0 && task > 0) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "开始反馈执行中状态.......指令号:" + task);
|
||||
//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(), "0") && StrUtil.equals(this.getDeviceCode(), inst.getStart_device_code())) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "开始反馈执行中状态.......指令号:" + task);
|
||||
inst.setInstruction_status("1");
|
||||
instructionService.update(inst);
|
||||
}
|
||||
if (StrUtil.equals(inst.getInstruction_status(), "1") && StrUtil.equals(this.getDeviceCode(), inst.getNext_device_code())) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "开始反馈完成状态.......指令号:" + task);
|
||||
finish_instruction();
|
||||
}
|
||||
}else {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "开始反馈执行中状态.......根据指令号查询到指令为空,指令号:" + task);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||
import org.nl.acs.opc.Device;
|
||||
import org.nl.acs.opc.DeviceAppService;
|
||||
@@ -59,7 +60,8 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
||||
RouteLineService routeLineService = SpringContextHolder.getBean(RouteLineService.class);
|
||||
@Autowired
|
||||
ParamService paramService = SpringContextHolder.getBean(ParamService.class);
|
||||
|
||||
@Autowired
|
||||
DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class);
|
||||
@Autowired
|
||||
AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsService.class);
|
||||
|
||||
@@ -92,6 +94,7 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
||||
int last_move = 0;
|
||||
int last_error = 0;
|
||||
int last_task = 0;
|
||||
int last_action = 0;
|
||||
String last_container;
|
||||
String inst_message;
|
||||
String device_code;
|
||||
@@ -178,31 +181,47 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
||||
|
||||
if (mode != last_mode) {
|
||||
this.setRequireSucess(false);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
}
|
||||
if (move != last_move) {
|
||||
if (move == 0 && mode == 2) {
|
||||
thingToNothing();
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号move:" + last_move + "->" + move);
|
||||
}
|
||||
if (error != last_error) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + "->" + error);
|
||||
}
|
||||
if (task != last_task) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task);
|
||||
}
|
||||
if (action != last_action) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号action:" + last_action + "->" + action);
|
||||
}
|
||||
|
||||
if (mode == 2 && move != 0 && task > 0) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "开始反馈任务状态.......指令号:" + task);
|
||||
//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())) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "开始反馈完成状态.......指令号:" + task);
|
||||
finish_instruction();
|
||||
}
|
||||
if (StrUtil.equals(inst.getInstruction_status(), "0") && StrUtil.equals(this.getDeviceCode(), inst.getStart_device_code())) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "开始反馈执行中状态.......指令号:" + task);
|
||||
inst.setInstruction_status("1");
|
||||
instructionService.update(inst);
|
||||
}
|
||||
} else {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "开始反馈任务中状态.......根据指令号查询到指令为空,指令号:" + task);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception var17) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "读取信号出现异常:" + var17.getMessage());
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "读取信号出现异常:栈信息" + var17.getStackTrace());
|
||||
return;
|
||||
}
|
||||
if (!this.itemProtocol.getIsonline()) {
|
||||
@@ -255,6 +274,7 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
||||
last_error = error;
|
||||
last_move = move;
|
||||
last_task = task;
|
||||
last_action = action;
|
||||
}
|
||||
|
||||
public boolean exe_error() {
|
||||
|
||||
Reference in New Issue
Block a user