From 7e2d095c4152bdbc66621cdc860fdaebb4e1d918 Mon Sep 17 00:00:00 2001 From: zhangjunwen Date: Tue, 16 Apr 2024 16:20:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=B6=88=E9=99=A4=E6=89=93?= =?UTF-8?q?=E5=8D=B0=EF=BC=8C=E6=A0=B9=E6=8D=AE=E7=8A=B6=E6=80=81=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E6=8A=A5=E8=AD=A6=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/inspur/datasyn/modbus/IPCData2SyncThread.java | 2 +- .../java/com/inspur/datasyn/modbus/IPCData3SyncThread.java | 2 +- .../java/com/inspur/datasyn/modbus/IPCDataSyncTask.java | 4 ++-- .../main/java/com/inspur/datasyn/modbus/IpcDataProcess.java | 4 ++-- .../src/main/java/com/inspur/industrial/utils/IpcUtil.java | 6 +++--- zfipc-ui/src/views/zf/cydg/yxjk.vue | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/zfipc-server/zfipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCData2SyncThread.java b/zfipc-server/zfipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCData2SyncThread.java index 755ccdb..fbe9837 100644 --- a/zfipc-server/zfipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCData2SyncThread.java +++ b/zfipc-server/zfipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCData2SyncThread.java @@ -176,7 +176,7 @@ public class IPCData2SyncThread implements Runnable { //报警处理 List rulesList = alarmRulesService.selectIpcAlarmRulesByEquipId(EQUIP_ID); - alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields,tags, Constant.RUNNING,rulesList,1)); + alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields,tags, Constant.RUNNING,rulesList)); if (!alarmRecordList.isEmpty()){//运行需放开 // alarmRecordService.batchInsertIpcAlarmRecord(alarmRecordList); } diff --git a/zfipc-server/zfipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCData3SyncThread.java b/zfipc-server/zfipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCData3SyncThread.java index a9ff811..7c6d81f 100644 --- a/zfipc-server/zfipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCData3SyncThread.java +++ b/zfipc-server/zfipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCData3SyncThread.java @@ -152,7 +152,7 @@ public class IPCData3SyncThread implements Runnable { // fields.put("insertTime",format); //报警处理 List rulesList = alarmRulesService.selectIpcAlarmRulesByEquipId(EQUIP_ID); - alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields,tags, Constant.RUNNING,rulesList, 1)); + alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields,tags, Constant.RUNNING,rulesList)); if (!alarmRecordList.isEmpty()){//运行需放开 // alarmRecordService.batchInsertIpcAlarmRecord(alarmRecordList); } diff --git a/zfipc-server/zfipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCDataSyncTask.java b/zfipc-server/zfipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCDataSyncTask.java index bfc4808..b0253d2 100644 --- a/zfipc-server/zfipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCDataSyncTask.java +++ b/zfipc-server/zfipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCDataSyncTask.java @@ -239,7 +239,7 @@ public class IPCDataSyncTask implements ApplicationRunner { fields.put("driven_bottom_dis", (float) 0 + Math.random()); //报警处理 List rulesList = alarmRulesService.selectIpcAlarmRulesByEquipId(equipId); - alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields, tags, Constant.RUNNING, rulesList, 1)); + alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields, tags, Constant.RUNNING, rulesList)); i.insert(measurement, tags, fields); if (!alarmRecordList.isEmpty()) {//运行需放开 @@ -334,7 +334,7 @@ public class IPCDataSyncTask implements ApplicationRunner { //报警处理 List rulesList = alarmRulesService.selectIpcAlarmRulesByEquipId(equipId); - alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields, tags, Constant.RUNNING, rulesList, 1)); + alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields, tags, Constant.RUNNING, rulesList)); if (!alarmRecordList.isEmpty()) {//运行需放开 // alarmRecordService.batchInsertIpcAlarmRecord(alarmRecordList); } diff --git a/zfipc-server/zfipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IpcDataProcess.java b/zfipc-server/zfipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IpcDataProcess.java index 849b7b3..4dc778e 100644 --- a/zfipc-server/zfipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IpcDataProcess.java +++ b/zfipc-server/zfipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IpcDataProcess.java @@ -187,7 +187,7 @@ public class IpcDataProcess implements Runnable { fields.put("driven_bottom_dis", (float) 0 + Math.random()); //报警处理 List rulesList = alarmRulesService.selectIpcAlarmRulesConfigListByCache(equipId); - alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields, tags, Constant.RUNNING, rulesList, 1));//TODO 根据运行状态确定规则 + alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields, tags, Constant.RUNNING, rulesList));//TODO 根据运行状态确定规则 i.insert(measurement, tags, fields); if (!alarmRecordList.isEmpty()) {//运行需放开 @@ -282,7 +282,7 @@ public class IpcDataProcess implements Runnable { //报警处理 List rulesList = alarmRulesService.selectIpcAlarmRulesConfigListByCache(equipId); - alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields, tags, Constant.RUNNING, rulesList, 1));//TODO 根据运行状态确定规则 + alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields, tags, Constant.RUNNING, rulesList));//TODO 根据运行状态确定规则 if (!alarmRecordList.isEmpty()) {//运行需放开 // alarmRecordService.batchInsertIpcAlarmRecord(alarmRecordList); } diff --git a/zfipc-server/zfipc-system/src/main/java/com/inspur/industrial/utils/IpcUtil.java b/zfipc-server/zfipc-system/src/main/java/com/inspur/industrial/utils/IpcUtil.java index 3bd6f85..9dccc25 100644 --- a/zfipc-server/zfipc-system/src/main/java/com/inspur/industrial/utils/IpcUtil.java +++ b/zfipc-server/zfipc-system/src/main/java/com/inspur/industrial/utils/IpcUtil.java @@ -64,11 +64,11 @@ public class IpcUtil { /** * 批量处理实时数据 */ - public List dealRealTimeData(Map map, Map tags,int type, List rulesList, int status) { + public List dealRealTimeData(Map map, Map tags,int type, List rulesList) { List returnList = new ArrayList<>(); for (IpcAlarmRules rule : rulesList) { - // 判断是否当前参数类型 0:待 + // 判断是否当前参数类型 0:开机 if (type == rule.getType()) { if (judgeAlarm(map.get(rule.getAlarmNameKey()), rule.getAlertLowerBound(), rule.getAlertUpperBound(), rule.getReferenceCon())) { // 报警数据 @@ -82,7 +82,7 @@ public class IpcUtil { double value = (double) map.get(name); ipcAlarmRecord.setAlarmValue(BigDecimal.valueOf(value)); ipcAlarmRecord.setNameKey(name); - ipcAlarmRecord.setContent(status == 2 || status == 3 ? "(开机监测)" + rule.getReferenceName() : rule.getReferenceName()); + ipcAlarmRecord.setContent(type == 0 ? "(开机监测)" + rule.getReferenceName() : rule.getReferenceName()); ipcAlarmRecord.setStatus(0); ipcAlarmRecord.setOperator(1L); ipcAlarmRecord.setAlarmLevel(rule.getAlarmLevel()); diff --git a/zfipc-ui/src/views/zf/cydg/yxjk.vue b/zfipc-ui/src/views/zf/cydg/yxjk.vue index c420489..82161cd 100644 --- a/zfipc-ui/src/views/zf/cydg/yxjk.vue +++ b/zfipc-ui/src/views/zf/cydg/yxjk.vue @@ -1339,7 +1339,7 @@ export default { }, async queryDataInit() { const { data } = await listBottomCylData(); - console.log("数据:", data); + // console.log("数据:", data); this.showdata = data; this.XDATA = data.timelist; this.xtyl = parseFloat(data.sysprs).toFixed(2); //压力 @@ -1402,7 +1402,7 @@ export default { }, async queryData() { const { data } = await listBottomCylData(); - console.log("数据:", data); + // console.log("数据:", data); this.showdata = data; this.XDATA = data.timelist; this.xtyl = parseFloat(data.sysprs).toFixed(2); //压力