rev 反馈报警过滤

This commit is contained in:
USER-20220102CG\noblelift
2023-09-08 10:38:59 +08:00
parent bced0538ac
commit e9d04cf9f3

View File

@@ -199,7 +199,7 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
"信号carrier_direction" + last_carrier_direction + "->" + carrier_direction);
}
if (error != last_error) {
if(error != 0 && error != 110 && error != 70 ){
if(error != 0){
DeviceErrorLogDto dto = new DeviceErrorLogDto();
dto.setDevice_code(device_code);
dto.setError_code(String.valueOf(error));
@@ -208,14 +208,16 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
deviceErrorLogService.create(dto);
}
JSONObject param = new JSONObject();
param.put("device_code", this.device_code);
param.put("error", error);
param.put("error_msg", error == 0 ? "" : ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(error)));
param.put("device_name", this.getDevice().getDevice_name());
param.put("device_type", "1");
param.put("product_area", paramService.findByCode("productArea").getValue());
acsToWmsService.sendDeviceStatus(param);
if(error != 0 && error != 110 && error != 70 ) {
JSONObject param = new JSONObject();
param.put("device_code", this.device_code);
param.put("error", error);
param.put("error_msg", error == 0 ? "" : ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(error)));
param.put("device_name", this.getDevice().getDevice_name());
param.put("device_type", "1");
param.put("product_area", paramService.findByCode("productArea").getValue());
acsToWmsService.sendDeviceStatus(param);
}
logServer.deviceItemValue(this.device_code, "error", String.valueOf(error));
logServer.deviceExecuteLog(