大屏消除打印,根据状态判断报警规则
This commit is contained in:
parent
78054f3e6e
commit
7e2d095c41
@ -176,7 +176,7 @@ public class IPCData2SyncThread implements Runnable {
|
||||
|
||||
//报警处理
|
||||
List<IpcAlarmRules> 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);
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ public class IPCData3SyncThread implements Runnable {
|
||||
// fields.put("insertTime",format);
|
||||
//报警处理
|
||||
List<IpcAlarmRules> 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);
|
||||
}
|
||||
|
@ -239,7 +239,7 @@ public class IPCDataSyncTask implements ApplicationRunner {
|
||||
fields.put("driven_bottom_dis", (float) 0 + Math.random());
|
||||
//报警处理
|
||||
List<IpcAlarmRules> 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<IpcAlarmRules> 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);
|
||||
}
|
||||
|
@ -187,7 +187,7 @@ public class IpcDataProcess implements Runnable {
|
||||
fields.put("driven_bottom_dis", (float) 0 + Math.random());
|
||||
//报警处理
|
||||
List<IpcAlarmRules> 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<IpcAlarmRules> 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);
|
||||
}
|
||||
|
@ -64,11 +64,11 @@ public class IpcUtil {
|
||||
/**
|
||||
* 批量处理实时数据
|
||||
*/
|
||||
public List<IpcAlarmRecord> dealRealTimeData(Map<String, Object> map, Map<String, String> tags,int type, List<IpcAlarmRules> rulesList, int status) {
|
||||
public List<IpcAlarmRecord> dealRealTimeData(Map<String, Object> map, Map<String, String> tags,int type, List<IpcAlarmRules> rulesList) {
|
||||
|
||||
List<IpcAlarmRecord> 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());
|
||||
|
@ -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); //压力
|
||||
|
Loading…
Reference in New Issue
Block a user