更新
This commit is contained in:
@@ -15,6 +15,8 @@ import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
|
||||
import org.nl.acs.history.ErrorUtil;
|
||||
import org.nl.acs.history.service.DeviceErrorLogService;
|
||||
import org.nl.acs.history.service.impl.DeviceErrorLogServiceImpl;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||
@@ -55,6 +57,8 @@ public class HongXiangStationDeviceDriver extends AbstractOpcDeviceDriver implem
|
||||
DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class);
|
||||
@Autowired
|
||||
AgvService agvService = SpringContextHolder.getBean(AgvService.class);
|
||||
@Autowired
|
||||
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||
|
||||
private Date instruction_require_time = new Date();
|
||||
private Date instruction_finished_time = new Date();
|
||||
|
||||
@@ -19,6 +19,9 @@ import org.nl.acs.ext.wms.data.ApplyLabelingAndBindingResponse;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
|
||||
import org.nl.acs.history.ErrorUtil;
|
||||
import org.nl.acs.history.service.DeviceErrorLogService;
|
||||
import org.nl.acs.history.service.dto.DeviceErrorLogDto;
|
||||
import org.nl.acs.history.service.impl.DeviceErrorLogServiceImpl;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
@@ -62,6 +65,8 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
|
||||
DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class);
|
||||
@Autowired
|
||||
AgvService agvService = SpringContextHolder.getBean(AgvService.class);
|
||||
@Autowired
|
||||
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||
|
||||
private Date instruction_require_time = new Date();
|
||||
private Date instruction_finished_time = new Date();
|
||||
@@ -170,6 +175,15 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
|
||||
thingToNothing();
|
||||
}
|
||||
}
|
||||
if (error != last_error) {
|
||||
if (error != 0) {
|
||||
DeviceErrorLogDto dto = new DeviceErrorLogDto();
|
||||
dto.setDevice_code(device_code);
|
||||
dto.setError_code(String.valueOf(error));
|
||||
dto.setError_info(ErrorUtil.getDictDetail("hx_error_type", String.valueOf(error)));
|
||||
deviceErrorLogService.create(dto);
|
||||
}
|
||||
}
|
||||
if (finish != last_finish) {
|
||||
if (finish == 1) {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "开始请求标记复位`此时请求标记值为requireSucess:" + requireSucess);
|
||||
|
||||
@@ -22,6 +22,9 @@ import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.history.ErrorUtil;
|
||||
import org.nl.acs.history.service.DeviceErrorLogService;
|
||||
import org.nl.acs.history.service.dto.DeviceErrorLogDto;
|
||||
import org.nl.acs.history.service.impl.DeviceErrorLogServiceImpl;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
@@ -61,7 +64,8 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
AcsToWmsService acsToWmsService = SpringContextHolder.getBean("acsToWmsServiceImpl");
|
||||
@Autowired
|
||||
DeviceAppService deviceAppService = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||
//工作模式
|
||||
int mode = 0;
|
||||
int last_mode = 0;
|
||||
@@ -162,6 +166,13 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号action:" + last_action + "->" + action);
|
||||
}
|
||||
if (error != last_error) {
|
||||
if (error != 0) {
|
||||
DeviceErrorLogDto dto = new DeviceErrorLogDto();
|
||||
dto.setDevice_code(device_code);
|
||||
dto.setError_code(String.valueOf(error));
|
||||
dto.setError_info(ErrorUtil.getDictDetail("hxhj_error_type", String.valueOf(error)));
|
||||
deviceErrorLogService.create(dto);
|
||||
}
|
||||
logServer.deviceItemValue(this.device_code, "error", String.valueOf(error));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + "->" + error);
|
||||
}
|
||||
|
||||
@@ -27,6 +27,9 @@ import org.nl.acs.ext.wms.data.ApplyLabelingAndBindingRequest;
|
||||
import org.nl.acs.ext.wms.data.ApplyLabelingAndBindingResponse;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.history.ErrorUtil;
|
||||
import org.nl.acs.history.service.DeviceErrorLogService;
|
||||
import org.nl.acs.history.service.dto.DeviceErrorLogDto;
|
||||
import org.nl.acs.history.service.impl.DeviceErrorLogServiceImpl;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
@@ -74,6 +77,8 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
|
||||
@Autowired
|
||||
NDCAgvService agvService = SpringContextHolder.getBean(NDCAgvService.class);
|
||||
@Autowired
|
||||
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||
//当前指令
|
||||
Instruction inst = null;
|
||||
|
||||
@@ -191,6 +196,13 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号carrier_direction:" + last_carrier_direction + "->" + carrier_direction);
|
||||
}
|
||||
if (error != last_error) {
|
||||
if (error != 0) {
|
||||
DeviceErrorLogDto dto = new DeviceErrorLogDto();
|
||||
dto.setDevice_code(device_code);
|
||||
dto.setError_code(String.valueOf(error));
|
||||
dto.setError_info(ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(error)));
|
||||
deviceErrorLogService.create(dto);
|
||||
}
|
||||
logServer.deviceItemValue(this.device_code, "error", String.valueOf(error));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + "->" + error);
|
||||
}
|
||||
|
||||
@@ -23,6 +23,9 @@ import org.nl.acs.ext.wms.data.ApplyLabelingAndBindingRequest;
|
||||
import org.nl.acs.ext.wms.data.ApplyLabelingAndBindingResponse;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.history.ErrorUtil;
|
||||
import org.nl.acs.history.service.DeviceErrorLogService;
|
||||
import org.nl.acs.history.service.dto.DeviceErrorLogDto;
|
||||
import org.nl.acs.history.service.impl.DeviceErrorLogServiceImpl;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
@@ -69,6 +72,8 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
|
||||
@Autowired
|
||||
NDCAgvService agvService = SpringContextHolder.getBean(NDCAgvService.class);
|
||||
@Autowired
|
||||
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||
//当前指令
|
||||
Instruction inst = null;
|
||||
|
||||
@@ -175,6 +180,13 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号carrier_direction:" + last_carrier_direction + "->" + carrier_direction);
|
||||
}
|
||||
if (error != last_error) {
|
||||
if (error != 0) {
|
||||
DeviceErrorLogDto dto = new DeviceErrorLogDto();
|
||||
dto.setDevice_code(device_code);
|
||||
dto.setError_code(String.valueOf(error));
|
||||
dto.setError_info(ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(error)));
|
||||
deviceErrorLogService.create(dto);
|
||||
}
|
||||
logServer.deviceItemValue(this.device_code, "error", String.valueOf(error));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + "->" + error);
|
||||
}
|
||||
|
||||
@@ -22,6 +22,9 @@ import org.nl.acs.ext.wms.data.ApplyLabelingAndBindingRequest;
|
||||
import org.nl.acs.ext.wms.data.ApplyLabelingAndBindingResponse;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.history.ErrorUtil;
|
||||
import org.nl.acs.history.service.DeviceErrorLogService;
|
||||
import org.nl.acs.history.service.dto.DeviceErrorLogDto;
|
||||
import org.nl.acs.history.service.impl.DeviceErrorLogServiceImpl;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
@@ -40,7 +43,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/** 西门子-输送机驱动-贴标 */
|
||||
/**
|
||||
* 西门子-输送机驱动-贴标
|
||||
*/
|
||||
@Slf4j
|
||||
@Data
|
||||
@RequiredArgsConstructor
|
||||
@@ -51,9 +56,12 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
@Autowired
|
||||
InstructionService instructionService = SpringContextHolder.getBean(InstructionService.class);
|
||||
|
||||
@Autowired DeviceService deviceservice = SpringContextHolder.getBean(DeviceService.class);
|
||||
@Autowired RouteLineService routelineserver = SpringContextHolder.getBean(RouteLineService.class);
|
||||
@Autowired TaskService taskserver = SpringContextHolder.getBean(TaskService.class);
|
||||
@Autowired
|
||||
DeviceService deviceservice = SpringContextHolder.getBean(DeviceService.class);
|
||||
@Autowired
|
||||
RouteLineService routelineserver = SpringContextHolder.getBean(RouteLineService.class);
|
||||
@Autowired
|
||||
TaskService taskserver = SpringContextHolder.getBean(TaskService.class);
|
||||
|
||||
@Autowired
|
||||
DeviceAppService deviceAppservice = SpringContextHolder.getBean(DeviceAppService.class);
|
||||
@@ -61,13 +69,18 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
@Autowired
|
||||
RouteLineService routeLineService = SpringContextHolder.getBean(RouteLineService.class);
|
||||
|
||||
@Autowired ParamService paramService = SpringContextHolder.getBean(ParamService.class);
|
||||
@Autowired AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsService.class);
|
||||
@Autowired
|
||||
ParamService paramService = SpringContextHolder.getBean(ParamService.class);
|
||||
@Autowired
|
||||
AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsService.class);
|
||||
|
||||
@Autowired
|
||||
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
|
||||
|
||||
@Autowired NDCAgvService agvService = SpringContextHolder.getBean(NDCAgvService.class);
|
||||
@Autowired
|
||||
NDCAgvService agvService = SpringContextHolder.getBean(NDCAgvService.class);
|
||||
@Autowired
|
||||
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||
// 当前指令
|
||||
Instruction inst = null;
|
||||
int heartbeat = 0;
|
||||
@@ -174,6 +187,13 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
"信号carrier_direction:" + last_carrier_direction + "->" + carrier_direction);
|
||||
}
|
||||
if (error != last_error) {
|
||||
if (error != 0) {
|
||||
DeviceErrorLogDto dto = new DeviceErrorLogDto();
|
||||
dto.setDevice_code(device_code);
|
||||
dto.setError_code(String.valueOf(error));
|
||||
dto.setError_info(ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(error)));
|
||||
deviceErrorLogService.create(dto);
|
||||
}
|
||||
logServer.deviceItemValue(this.device_code, "error", String.valueOf(error));
|
||||
logServer.deviceExecuteLog(
|
||||
this.device_code, "", "", "信号error:" + last_error + "->" + error);
|
||||
@@ -489,7 +509,9 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
this.control(itemMap);
|
||||
}
|
||||
|
||||
/** 请求指令 */
|
||||
/**
|
||||
* 请求指令
|
||||
*/
|
||||
public synchronized boolean instruction_require() {
|
||||
Date date = new Date();
|
||||
if (date.getTime() - this.instruction_require_time.getTime()
|
||||
|
||||
@@ -23,6 +23,9 @@ import org.nl.acs.ext.wms.data.ApplyLabelingAndBindingRequest;
|
||||
import org.nl.acs.ext.wms.data.ApplyLabelingAndBindingResponse;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.history.ErrorUtil;
|
||||
import org.nl.acs.history.service.DeviceErrorLogService;
|
||||
import org.nl.acs.history.service.dto.DeviceErrorLogDto;
|
||||
import org.nl.acs.history.service.impl.DeviceErrorLogServiceImpl;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
@@ -69,6 +72,8 @@ public class SiemensOneFloorAGVConveyorDeviceDriver extends AbstractOpcDeviceDri
|
||||
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
|
||||
@Autowired
|
||||
NDCAgvService agvService = SpringContextHolder.getBean(NDCAgvService.class);
|
||||
@Autowired
|
||||
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||
//当前指令
|
||||
Instruction inst = null;
|
||||
int heartbeat = 0;
|
||||
@@ -146,7 +151,15 @@ public class SiemensOneFloorAGVConveyorDeviceDriver extends AbstractOpcDeviceDri
|
||||
error = this.itemProtocol.getError();
|
||||
task = this.itemProtocol.getTask();
|
||||
to_command = this.itemProtocol.getTo_command();
|
||||
|
||||
if (error != last_error) {
|
||||
if (error != 0) {
|
||||
DeviceErrorLogDto dto = new DeviceErrorLogDto();
|
||||
dto.setDevice_code(device_code);
|
||||
dto.setError_code(String.valueOf(error));
|
||||
dto.setError_info(ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(error)));
|
||||
deviceErrorLogService.create(dto);
|
||||
}
|
||||
}
|
||||
} catch (Exception var17) {
|
||||
var17.printStackTrace();
|
||||
inst_message = var17.getMessage();
|
||||
@@ -174,7 +187,6 @@ public class SiemensOneFloorAGVConveyorDeviceDriver extends AbstractOpcDeviceDri
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void clearWrite() {
|
||||
|
||||
List list = new ArrayList();
|
||||
|
||||
@@ -19,6 +19,9 @@ import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.history.ErrorUtil;
|
||||
import org.nl.acs.history.service.DeviceErrorLogService;
|
||||
import org.nl.acs.history.service.dto.DeviceErrorLogDto;
|
||||
import org.nl.acs.history.service.impl.DeviceErrorLogServiceImpl;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
@@ -58,7 +61,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
DeviceAppService deviceAppservice = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
|
||||
|
||||
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
|
||||
|
||||
@Autowired
|
||||
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||
//分切行架机械手是否禁用 0否 1是
|
||||
private int is_disable = 0;
|
||||
|
||||
@@ -190,6 +194,13 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号type:" + last_type + "->" + type);
|
||||
}
|
||||
if (error != last_error) {
|
||||
if (error != 0) {
|
||||
DeviceErrorLogDto dto = new DeviceErrorLogDto();
|
||||
dto.setDevice_code(device_code);
|
||||
dto.setError_code(String.valueOf(error));
|
||||
dto.setError_info(ErrorUtil.getDictDetail("fqhj_error_type", String.valueOf(error)));
|
||||
deviceErrorLogService.create(dto);
|
||||
}
|
||||
logServer.deviceItemValue(this.device_code, "error", String.valueOf(error));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + "->" + error);
|
||||
}
|
||||
|
||||
@@ -22,6 +22,9 @@ import org.nl.acs.ext.wms.data.ApplyLabelingAndBindingRequest;
|
||||
import org.nl.acs.ext.wms.data.ApplyLabelingAndBindingResponse;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.history.ErrorUtil;
|
||||
import org.nl.acs.history.service.DeviceErrorLogService;
|
||||
import org.nl.acs.history.service.dto.DeviceErrorLogDto;
|
||||
import org.nl.acs.history.service.impl.DeviceErrorLogServiceImpl;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
@@ -67,7 +70,8 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
||||
|
||||
@Autowired
|
||||
AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsService.class);
|
||||
|
||||
@Autowired
|
||||
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||
@Autowired
|
||||
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
|
||||
String container;
|
||||
@@ -221,6 +225,13 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号move:" + last_move + "->" + move);
|
||||
}
|
||||
if (error != last_error) {
|
||||
if (error != 0) {
|
||||
DeviceErrorLogDto dto = new DeviceErrorLogDto();
|
||||
dto.setDevice_code(device_code);
|
||||
dto.setError_code(String.valueOf(error));
|
||||
dto.setError_info(ErrorUtil.getDictDetail("fqhj_error_type", String.valueOf(error)));
|
||||
deviceErrorLogService.create(dto);
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + "->" + error);
|
||||
}
|
||||
if (plcbarcode_length != last_plcbarcode_length) {
|
||||
|
||||
Reference in New Issue
Block a user