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 fbe9837..755ccdb 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)); + alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields,tags, Constant.RUNNING,rulesList,1)); 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 7c6d81f..a9ff811 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)); + alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields,tags, Constant.RUNNING,rulesList, 1)); 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 80c5774..bfc4808 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 @@ -139,12 +139,14 @@ public class IPCDataSyncTask implements ApplicationRunner { String bottomCylId = equipList.stream().filter(equip -> equip.getEquipName().equals("超压底缸")).collect(Collectors.toList()).get(0).getId(); String topScollerId = equipList.stream().filter(equip -> equip.getEquipName().equals("可控中高辊顶辊")).collect(Collectors.toList()).get(0).getId(); String bottomScollerId = equipList.stream().filter(equip -> equip.getEquipName().equals("可控中高辊底辊")).collect(Collectors.toList()).get(0).getId(); + //TODO 需要统一处理系统状态,停机运维、待机、试运行、正常生产--丢掉停机运维数据 + bottomCylinderDataProcess(null, bottomCylId, i, ipcUtil, alarmRulesService, alarmRecordService); scollerDataProcess(null, topScollerId, topScollerMeasurement, i, ipcUtil, alarmRulesService, alarmRecordService); scollerDataProcess(null, bottomScollerId, bottomScollerMeasurement, i, ipcUtil, alarmRulesService, alarmRecordService); - //TODO 需要统一处理系统状态,停机运维、待机、试运行、正常生产 + //TODO 状态切换时候需要存储状态切换时间 @@ -165,11 +167,10 @@ public class IPCDataSyncTask implements ApplicationRunner { String measurement = "zfipc_industrial_monitor_data1"; List alarmRecordList = new ArrayList<>(); - + //TODO 获取状态 Map tags = new TreeMap(); tags.put("equ_id", equipId); Map fields = new TreeMap(); - // 系统电流 fields.put("sys_cur", (float) 0 + Math.random()); // 系统流量 @@ -238,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)); + alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields, tags, Constant.RUNNING, rulesList, 1)); i.insert(measurement, tags, fields); if (!alarmRecordList.isEmpty()) {//运行需放开 @@ -333,7 +334,7 @@ public class IPCDataSyncTask implements ApplicationRunner { //报警处理 List rulesList = alarmRulesService.selectIpcAlarmRulesByEquipId(equipId); - alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields, tags, Constant.RUNNING, rulesList)); + alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields, tags, Constant.RUNNING, rulesList, 1)); if (!alarmRecordList.isEmpty()) {//运行需放开 // alarmRecordService.batchInsertIpcAlarmRecord(alarmRecordList); } diff --git a/zfipc-server/zfipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCDataSyncThread.java b/zfipc-server/zfipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCDataSyncThread.java index abbbabc..f241e65 100644 --- a/zfipc-server/zfipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCDataSyncThread.java +++ b/zfipc-server/zfipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCDataSyncThread.java @@ -186,7 +186,7 @@ public class IPCDataSyncThread implements Runnable { //报警处理 List rulesList = alarmRulesService.selectIpcAlarmRulesByEquipId(EQUIP_ID); - alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields,tags, Constant.RUNNING,rulesList)); + //alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields,tags, Constant.RUNNING,rulesList)); i.insert(measurement,tags,fields); if (!alarmRecordList.isEmpty()){//运行需放开 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 46e4bff..849b7b3 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));//TODO 根据运行状态确定规则 + alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields, tags, Constant.RUNNING, rulesList, 1));//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));//TODO 根据运行状态确定规则 + alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields, tags, Constant.RUNNING, rulesList, 1));//TODO 根据运行状态确定规则 if (!alarmRecordList.isEmpty()) {//运行需放开 // alarmRecordService.batchInsertIpcAlarmRecord(alarmRecordList); } @@ -296,11 +296,8 @@ public class IpcDataProcess implements Runnable { */ private IpcAlarmRules getLevelAlarmRule(String equipId,Integer type) { IIpcAlarmRulesService ipcAlarmRulesService = SpringUtils.getBean(IIpcAlarmRulesService.class); - IpcAlarmRules query = new IpcAlarmRules(); - query.setEquipId(equipId); - query.setAlarmNameKey("sys_level"); - query.setType(type);//运行中 - return ipcAlarmRulesService.selectIpcAlarmRulesList(query).get(0) == null ? null : ipcAlarmRulesService.selectIpcAlarmRulesList(query).get(0); + List list = ipcAlarmRulesService.selectIpcAlarmRulesConfigListByCache(equipId); + return list == null || list.size() == 0 ? null : list.stream().filter(item -> item.getAlarmNameKey().equals("sys_level")).collect(Collectors.toList()).get(0); } /** diff --git a/zfipc-server/zfipc-system/src/main/java/com/inspur/industrial/service/impl/DataQueryService.java b/zfipc-server/zfipc-system/src/main/java/com/inspur/industrial/service/impl/DataQueryService.java index fb944fa..05f2d30 100644 --- a/zfipc-server/zfipc-system/src/main/java/com/inspur/industrial/service/impl/DataQueryService.java +++ b/zfipc-server/zfipc-system/src/main/java/com/inspur/industrial/service/impl/DataQueryService.java @@ -43,41 +43,40 @@ public class DataQueryService implements IDataQueryService { return null; } Map resMap = new HashMap<>(); - resMap.put("sysstatus", list.get(0).get("status") == null ? 0 : list.get(0).get("status") );//系统状态 - resMap.put("sysflw", list.get(0).get("sys_flw") == null ? 0 : list.get(0).get("sys_flw"));//系统流量 - resMap.put("sysprs", list.get(0).get("sys_press") == null ? 0 : list.get(0).get("sys_press"));//系统压力 - resMap.put("syslevel", list.get(0).get("sys_level") == null ? 0 : list.get(0).get("sys_level"));//系统液位 + resMap.put("sysstatus", list.get(0).get("status") == null ? 0.0 : list.get(0).get("status") );//系统状态 + resMap.put("sysflw", list.get(0).get("sys_flw") == null ? 0.0 : list.get(0).get("sys_flw"));//系统流量 + resMap.put("sysprs", list.get(0).get("sys_press") == null ? 0.0 : list.get(0).get("sys_press"));//系统压力 + resMap.put("syslevel", list.get(0).get("sys_level") == null ? 0.0 : list.get(0).get("sys_level"));//系统液位 resMap.put("syslevelinit", Float.parseFloat(sysConfigService.selectConfigByKey("sys.liquidlevel.init") == null ? "0" : sysConfigService.selectConfigByKey("sys.liquidlevel.init")));//液位初始值 - resMap.put("levelmax", list.get(0).get("level_max") == null ? 0 : list.get(0).get("level_max")); - resMap.put("levelmin", list.get(0).get("level_min") == null ? 0 : list.get(0).get("level_min")); + resMap.put("levelmax", list.get(0).get("level_max") == null ? 0.0 : list.get(0).get("level_max")); + resMap.put("levelmin", list.get(0).get("level_min") == null ? 0.0 : list.get(0).get("level_min")); - resMap.put("systemp",list.get(0).get("sys_temp") == null ? 0 : list.get(0).get("sys_temp"));//系统温度 - resMap.put("syshumid",list.get(0).get("oil_water") == null ? 0 : list.get(0).get("oil_water"));//系统湿度 - resMap.put("sysvisc",list.get(0).get("visc") == null ? 0 : list.get(0).get("visc"));//系统粘度 + resMap.put("systemp",list.get(0).get("sys_temp") == null ? 0.0 : list.get(0).get("sys_temp"));//系统温度 + resMap.put("syshumid",list.get(0).get("oil_water") == null ? 0.0 : list.get(0).get("oil_water"));//系统湿度 + resMap.put("sysvisc",list.get(0).get("visc") == null ? 0.0 : list.get(0).get("visc"));//系统粘度 //系统颗粒度 - resMap.put("sysgran4",list.get(0).get("gran4") == null ? 0 : list.get(0).get("gran4")); - resMap.put("sysgran6",list.get(0).get("gran6") == null ? 0 : list.get(0).get("gran6")); - resMap.put("sysgran14",list.get(0).get("gran14") == null ? 0 : list.get(0).get("gran14")); - resMap.put("sysgran21",list.get(0).get("gran21") == null ? 0 : list.get(0).get("gran21")); + resMap.put("sysgran4",list.get(0).get("gran4") == null ? 0.0 : list.get(0).get("gran4")); + resMap.put("sysgran6",list.get(0).get("gran6") == null ? 0.0 : list.get(0).get("gran6")); + resMap.put("sysgran14",list.get(0).get("gran14") == null ? 0.0 : list.get(0).get("gran14")); + resMap.put("sysgran21",list.get(0).get("gran21") == null ? 0.0: list.get(0).get("gran21")); // Map oprsoftflw = (Map) new HashMap<>().put("oprsoftflw",list.get(0).get("opr_soft_flw") );//操作侧软辊流量 // Map oprhotflw = (Map) new HashMap<>().put("oprhotflw",list.get(0).get("opr_hot_flw") );//操作侧热辊流量 // Map drivensoftflw = (Map) new HashMap<>().put("drivensoftflw",list.get(0).get("driven_soft_flw") );//传动侧软辊流量 // Map drivenhotflw = (Map) new HashMap<>().put("drivenhotflw",list.get(0).get("driven_hot_flw") );//传动侧软辊流量 - resMap.put("oprservo",list.get(0).get("opr_servo") == null ? 0 : list.get(0).get("opr_servo"));//操作侧底缸比例换向阀 - resMap.put("drivenservo",list.get(0).get("driven_servo") == null ? 0 : list.get(0).get("driven_servo"));//操作侧底缸比例换向阀 + resMap.put("oprservo",list.get(0).get("opr_servo") == null ? 0.0 : list.get(0).get("opr_servo"));//操作侧底缸比例换向阀 + resMap.put("drivenservo",list.get(0).get("driven_servo") == null ? 0.0 : list.get(0).get("driven_servo"));//操作侧底缸比例换向阀 //功率= √3IUcosΦ/1000 - resMap.put("syspower",list.get(0).get("sys_cur") == null ? 0 : Math.sqrt(3)*Float.parseFloat(list.get(0).get("sys_cur").toString())*380*0.86/1000); + resMap.put("syspower",list.get(0).get("sys_cur") == null ? 0.0 : Math.sqrt(3)*Float.parseFloat(list.get(0).get("sys_cur").toString())*380*0.86/1000); //系统效率 = 系统压力*系统流量/系统功率 - double power = (double)resMap.get("syspower") == 0 ? 0 : (double)resMap.get("syspower"); - double sysflw = (double)resMap.get("sysflw") == 0 ? 0 : (double)resMap.get("sysflw"); - double pressure = (double)resMap.get("sysprs") == 0 ? 0 : (double)resMap.get("sysprs"); - - resMap.put("syseff",power == 0 ? 0 : pressure * sysflw/power*100); + double power = (double)resMap.get("syspower") == 0 ? 0.0 : (double)resMap.get("syspower"); + double sysflw = (double)resMap.get("sysflw") == 0 ? 0.0 : (double)resMap.get("sysflw"); + double pressure = (double)resMap.get("sysprs") == 0 ? 0.0 : (double)resMap.get("sysprs"); + resMap.put("syseff",power == 0 ? 0.0 : pressure * sysflw/power*100); List syscur = new ArrayList<>();//系统电流 @@ -113,34 +112,34 @@ public class DataQueryService implements IDataQueryService { for (int i = list.size() - 1; i >= 0; i--) { Map data = list.get(i); - syscur.add(data.get("sys_cur") == null ? 0 : data.get("sys_cur")); + syscur.add(data.get("sys_cur") == null ? 0.0 : data.get("sys_cur")); - oprsoftflw.add(data.get("opr_soft_flw") == null ? 0 : data.get("opr_soft_flw")); - oprhotflw.add(data.get("opr_hot_flw") == null ? 0 : data.get("opr_hot_flw")); - drivensoftflw.add(data.get("driven_soft_flw") == null ? 0 : data.get("driven_soft_flw")); - drivenhotflw.add(data.get("driven_hot_flw") == null ? 0 : data.get("driven_hot_flw")); + oprsoftflw.add(data.get("opr_soft_flw") == null ? 0.0 : data.get("opr_soft_flw")); + oprhotflw.add(data.get("opr_hot_flw") == null ? 0.0 : data.get("opr_hot_flw")); + drivensoftflw.add(data.get("driven_soft_flw") == null ? 0.0 : data.get("driven_soft_flw")); + drivenhotflw.add(data.get("driven_hot_flw") == null ? 0.0 : data.get("driven_hot_flw")); - oprbottompress.add(data.get("opr_bottom_press") == null ? 0 : data.get("opr_bottom_press")); - drivenbottompress.add(data.get("driven_bottom_press") == null ? 0 : data.get("driven_bottom_press")); - oprbottomsetpress.add(data.get("opr_bottom_set_press") == null ? 0 : data.get("opr_bottom_set_press")); - drivenbottomsetpress.add(data.get("driven_bottom_set_press") == null ? 0 : data.get("driven_bottom_set_press")); + oprbottompress.add(data.get("opr_bottom_press") == null ? 0.0 : data.get("opr_bottom_press")); + drivenbottompress.add(data.get("driven_bottom_press") == null ? 0.0 : data.get("driven_bottom_press")); + oprbottomsetpress.add(data.get("opr_bottom_set_press") == null ? 0.0 : data.get("opr_bottom_set_press")); + drivenbottomsetpress.add(data.get("driven_bottom_set_press") == null ? 0.0 : data.get("driven_bottom_set_press")); - oprsoftrealpress.add(data.get("opr_soft_real_press") == null ? 0 : data.get("opr_soft_real_press")); - oprsoftbondpress.add(data.get("opr_soft_bond_press") == null ? 0 : data.get("opr_soft_bond_press")); - oprsoftactpress.add(data.get("opr_soft_act_press") == null ? 0 : data.get("opr_soft_act_press")); - oprhotrealpress.add(data.get("opr_hot_real_press") == null ? 0 : data.get("opr_hot_real_press")); - oprhotbondpress.add(data.get("opr_hot_bond_press") == null ? 0 : data.get("opr_hot_bond_press")); - oprhotactpress.add(data.get("opr_hot_act_press") == null ? 0 : data.get("opr_hot_act_press")); + oprsoftrealpress.add(data.get("opr_soft_real_press") == null ? 0.0 : data.get("opr_soft_real_press")); + oprsoftbondpress.add(data.get("opr_soft_bond_press") == null ? 0.0 : data.get("opr_soft_bond_press")); + oprsoftactpress.add(data.get("opr_soft_act_press") == null ? 0.0 : data.get("opr_soft_act_press")); + oprhotrealpress.add(data.get("opr_hot_real_press") == null ? 0.0 : data.get("opr_hot_real_press")); + oprhotbondpress.add(data.get("opr_hot_bond_press") == null ? 0.0 : data.get("opr_hot_bond_press")); + oprhotactpress.add(data.get("opr_hot_act_press") == null ? 0.0 : data.get("opr_hot_act_press")); - drivensoftrealpress.add(data.get("driven_soft_real_press") == null ? 0 : data.get("driven_soft_real_press")); - drivensoftbondpress.add(data.get("driven_soft_bond_press") == null ? 0 : data.get("driven_soft_bond_press")); - drivensoftactpress.add(data.get("driven_soft_act_press") == null ? 0 : data.get("driven_soft_act_press")); - drivenhotrealpress.add(data.get("driven_hot_real_press") == null ? 0 : data.get("driven_hot_real_press")); - drivenhotbondpress.add(data.get("driven_hot_bond_press") == null ? 0 : data.get("driven_hot_bond_press")); - drivenhotactpress.add(data.get("driven_hot_act_press") == null ? 0 : data.get("driven_hot_act_press")); + drivensoftrealpress.add(data.get("driven_soft_real_press") == null ? 0.0 : data.get("driven_soft_real_press")); + drivensoftbondpress.add(data.get("driven_soft_bond_press") == null ? 0.0 : data.get("driven_soft_bond_press")); + drivensoftactpress.add(data.get("driven_soft_act_press") == null ? 0.0 : data.get("driven_soft_act_press")); + drivenhotrealpress.add(data.get("driven_hot_real_press") == null ? 0.0 : data.get("driven_hot_real_press")); + drivenhotbondpress.add(data.get("driven_hot_bond_press") == null ? 0.0 : data.get("driven_hot_bond_press")); + drivenhotactpress.add(data.get("driven_hot_act_press") == null ? 0.0 : data.get("driven_hot_act_press")); - oprbottomdis.add(data.get("opr_bottom_dis") == null ? 0 : data.get("opr_bottom_dis")); - drivenbottomdis.add(data.get("driven_bottom_dis") == null ? 0 : data.get("driven_bottom_dis")); + oprbottomdis.add(data.get("opr_bottom_dis") == null ? 0.0 : data.get("opr_bottom_dis")); + drivenbottomdis.add(data.get("driven_bottom_dis") == null ? 0.0 : data.get("driven_bottom_dis")); LocalDateTime time = InfluxdbTimeUtil.utcToCst(data.get("time").toString()); timelist.add( time.getMinute() < 10 ? "0" + time.getMinute() : time.getMinute() + ":" + (time.getSecond() < 10 ? "0" + time.getSecond() : time.getSecond())); @@ -268,49 +267,49 @@ public class DataQueryService implements IDataQueryService { BottomCylData ipcData = new BottomCylData(); ipcData.setTime(InfluxdbTimeUtil.utcToCst(data.get("time").toString()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); ipcData.setStatus(data.get("status") == null ? "0" : (String) data.get("status")); - ipcData.setSysCur(data.get("sys_cur") == null ? 0 : (double) data.get("sys_cur")); - ipcData.setSysLevel(data.get("sys_level") == null ? 0 : (double) data.get("sys_level")); - ipcData.setSysTemp(data.get("sys_temp") == null ? 0 : (double) data.get("sys_temp")); - ipcData.setSysPress(data.get("sys_press") == null ? 0 : (double) data.get("sys_press")); - ipcData.setSysFlow(data.get("sys_flw") == null ? 0 : (double) data.get("sys_flw")); - ipcData.setHumi(data.get("oil_water") == null ? 0 : (double) data.get("oil_water")); - ipcData.setVisc(data.get("visc") == null ? 0 : (double) data.get("visc")); + ipcData.setSysCur(data.get("sys_cur") == null ? 0.0 : (double) data.get("sys_cur")); + ipcData.setSysLevel(data.get("sys_level") == null ? 0.0 : (double) data.get("sys_level")); + ipcData.setSysTemp(data.get("sys_temp") == null ? 0.0 : (double) data.get("sys_temp")); + ipcData.setSysPress(data.get("sys_press") == null ? 0.0 : (double) data.get("sys_press")); + ipcData.setSysFlow(data.get("sys_flw") == null ? 0.0 : (double) data.get("sys_flw")); + ipcData.setHumi(data.get("oil_water") == null ? 0.0 : (double) data.get("oil_water")); + ipcData.setVisc(data.get("visc") == null ? 0.0 : (double) data.get("visc")); - ipcData.setGran4(data.get("gran4") == null ? 0 : (double) data.get("gran4")); - ipcData.setGran6(data.get("gran6") == null ? 0 : (double) data.get("gran6")); - ipcData.setGran14(data.get("gran14") == null ? 0 : (double) data.get("gran14")); - ipcData.setGran21(data.get("gran21") == null ? 0 : (double) data.get("gran21")); + ipcData.setGran4(data.get("gran4") == null ? 0.0 : (double) data.get("gran4")); + ipcData.setGran6(data.get("gran6") == null ? 0.0 : (double) data.get("gran6")); + ipcData.setGran14(data.get("gran14") == null ? 0.0 : (double) data.get("gran14")); + ipcData.setGran21(data.get("gran21") == null ? 0.0 : (double) data.get("gran21")); - ipcData.setOpServoPress(data.get("opr_servo") == null ? 0 : (double) data.get("opr_servo")); - ipcData.setTranServoPress(data.get("driven_servo") == null ? 0 : (double) data.get("driven_servo")); + ipcData.setOpServoPress(data.get("opr_servo") == null ? 0.0 : (double) data.get("opr_servo")); + ipcData.setTranServoPress(data.get("driven_servo") == null ? 0.0 : (double) data.get("driven_servo")); - ipcData.setOpSoftFlow(data.get("opr_soft_flw") == null ? 0 : (double) data.get("opr_soft_flw")); - ipcData.setOpHotFlow(data.get("opr_hot_flw") == null ? 0 : (double) data.get("opr_hot_flw")); + ipcData.setOpSoftFlow(data.get("opr_soft_flw") == null ? 0.0 : (double) data.get("opr_soft_flw")); + ipcData.setOpHotFlow(data.get("opr_hot_flw") == null ? 0.0 : (double) data.get("opr_hot_flw")); - ipcData.setTranSoftFlow(data.get("driven_soft_flw") == null ? 0 : (double) data.get("driven_soft_flw")); - ipcData.setTranHotFlow(data.get("driven_hot_flw") == null ? 0 : (double) data.get("driven_hot_flw")); + ipcData.setTranSoftFlow(data.get("driven_soft_flw") == null ? 0.0 : (double) data.get("driven_soft_flw")); + ipcData.setTranHotFlow(data.get("driven_hot_flw") == null ? 0.0 : (double) data.get("driven_hot_flw")); - ipcData.setOpBottomPress(data.get("opr_bottom_press") == null ? 0 : (double) data.get("opr_bottom_press")); - ipcData.setTranBottomPress(data.get("driven_bottom_press") == null ? 0 : (double) data.get("driven_bottom_press")); + ipcData.setOpBottomPress(data.get("opr_bottom_press") == null ? 0.0 : (double) data.get("opr_bottom_press")); + ipcData.setTranBottomPress(data.get("driven_bottom_press") == null ? 0.0 : (double) data.get("driven_bottom_press")); - ipcData.setOpSoftPress(data.get("opr_soft_real_press") == null ? 0 : (double) data.get("opr_soft_real_press")); - ipcData.setOpSoftHoldPress(data.get("opr_soft_bond_press") == null ? 0 : (double) data.get("opr_soft_bond_press")); - ipcData.setOpSoftPushPress(data.get("opr_soft_act_press") == null ? 0 : (double) data.get("opr_soft_act_press")); + ipcData.setOpSoftPress(data.get("opr_soft_real_press") == null ? 0.0 : (double) data.get("opr_soft_real_press")); + ipcData.setOpSoftHoldPress(data.get("opr_soft_bond_press") == null ? 0.0 : (double) data.get("opr_soft_bond_press")); + ipcData.setOpSoftPushPress(data.get("opr_soft_act_press") == null ? 0.0 : (double) data.get("opr_soft_act_press")); - ipcData.setOpHotPress(data.get("opr_hot_real_press") == null ? 0 : (double) data.get("opr_hot_real_press")); - ipcData.setOpHotHoldPress(data.get("opr_hot_bond_press") == null ? 0 : (double) data.get("opr_hot_bond_press")); - ipcData.setOpHotPushPress(data.get("opr_hot_act_press") == null ? 0 : (double) data.get("opr_hot_act_press")); + ipcData.setOpHotPress(data.get("opr_hot_real_press") == null ? 0.0 : (double) data.get("opr_hot_real_press")); + ipcData.setOpHotHoldPress(data.get("opr_hot_bond_press") == null ? 0.0 : (double) data.get("opr_hot_bond_press")); + ipcData.setOpHotPushPress(data.get("opr_hot_act_press") == null ? 0.0 : (double) data.get("opr_hot_act_press")); - ipcData.setTranSoftPress(data.get("driven_soft_real_press") == null ? 0 : (double) data.get("driven_soft_real_press")); - ipcData.setTranSoftHoldPress(data.get("driven_soft_bond_press") == null ? 0 : (double) data.get("driven_soft_bond_press")); - ipcData.setTranSoftPushPress(data.get("driven_soft_act_press") == null ? 0 : (double) data.get("driven_soft_act_press")); + ipcData.setTranSoftPress(data.get("driven_soft_real_press") == null ? 0.0 : (double) data.get("driven_soft_real_press")); + ipcData.setTranSoftHoldPress(data.get("driven_soft_bond_press") == null ? 0.0 : (double) data.get("driven_soft_bond_press")); + ipcData.setTranSoftPushPress(data.get("driven_soft_act_press") == null ? 0.0 : (double) data.get("driven_soft_act_press")); - ipcData.setTranHotPress(data.get("driven_hot_real_press") == null ? 0 : (double) data.get("driven_hot_real_press")); - ipcData.setTranHotHoldPress(data.get("driven_hot_bond_press") == null ? 0 : (double) data.get("driven_hot_bond_press")); - ipcData.setTranHotPushPress(data.get("driven_hot_act_press") == null ? 0 : (double) data.get("driven_hot_act_press")); + ipcData.setTranHotPress(data.get("driven_hot_real_press") == null ? 0.0 : (double) data.get("driven_hot_real_press")); + ipcData.setTranHotHoldPress(data.get("driven_hot_bond_press") == null ? 0.0 : (double) data.get("driven_hot_bond_press")); + ipcData.setTranHotPushPress(data.get("driven_hot_act_press") == null ? 0.0 : (double) data.get("driven_hot_act_press")); - ipcData.setOpBottomDis(data.get("opr_bottom_dis") == null ? 0 : (double) data.get("opr_bottom_dis")); - ipcData.setTranBottomDis(data.get("driven_bottom_dis") == null ? 0 : (double) data.get("driven_bottom_dis")); + ipcData.setOpBottomDis(data.get("opr_bottom_dis") == null ? 0.0 : (double) data.get("opr_bottom_dis")); + ipcData.setTranBottomDis(data.get("driven_bottom_dis") == null ? 0.0 : (double) data.get("driven_bottom_dis")); resList.add(ipcData); }); @@ -411,33 +410,33 @@ public class DataQueryService implements IDataQueryService { private Map queryScollerData(List> list) { Map resMap = new HashMap<>(); - resMap.put("sysflw", list.get(0).get("sys_flw") == null ? 0 : (double) list.get(0).get("sys_flw"));//系统流量 - resMap.put("sysprs", list.get(0).get("sys_press") == null ? 0 : (double) list.get(0).get("sys_press"));//系统压力 - resMap.put("syslevel", list.get(0).get("sys_level") == null ? 0 : (double) list.get(0).get("sys_level"));//系统液位 + resMap.put("sysflw", list.get(0).get("sys_flw") == null ? 0.0 : (double) list.get(0).get("sys_flw"));//系统流量 + resMap.put("sysprs", list.get(0).get("sys_press") == null ? 0.0 : (double) list.get(0).get("sys_press"));//系统压力 + resMap.put("syslevel", list.get(0).get("sys_level") == null ? 0.0 : (double) list.get(0).get("sys_level"));//系统液位 resMap.put("syslevelinit", Integer.parseInt(sysConfigService.selectConfigByKey("sys.liquidlevel.init") == null ? "0" : sysConfigService.selectConfigByKey("sys.liquidlevel.init")));//液位初始值 //TODO 获取系统液位高值和低值 - resMap.put("levelmax", list.get(0).get("level_max") == null ? 0 : (double) list.get(0).get("level_max")); - resMap.put("levelmin", list.get(0).get("level_min") == null ? 0 : (double) list.get(0).get("level_min")); + resMap.put("levelmax", list.get(0).get("level_max") == null ? 0.0 : (double) list.get(0).get("level_max")); + resMap.put("levelmin", list.get(0).get("level_min") == null ? 0.0 : (double) list.get(0).get("level_min")); - resMap.put("systemp",list.get(0).get("sys_temp") == null ? 0 : (double) list.get(0).get("sys_temp"));//系统温度 - resMap.put("syshumid",list.get(0).get("oil_water") == null ? 0 : (double) list.get(0).get("oil_water"));//系统湿度 - resMap.put("sysvisc",list.get(0).get("visc") == null ? 0 : (double) list.get(0).get("visc"));//系统粘度 + resMap.put("systemp",list.get(0).get("sys_temp") == null ? 0.0 : (double) list.get(0).get("sys_temp"));//系统温度 + resMap.put("syshumid",list.get(0).get("oil_water") == null ? 0.0 : (double) list.get(0).get("oil_water"));//系统湿度 + resMap.put("sysvisc",list.get(0).get("visc") == null ? 0.0 : (double) list.get(0).get("visc"));//系统粘度 //系统颗粒度 - resMap.put("sysgran4",list.get(0).get("gran4") == null ? 0 : (double) list.get(0).get("gran4")); - resMap.put("sysgran6",list.get(0).get("gran6") == null ? 0 : (double) list.get(0).get("gran6")); - resMap.put("sysgran14",list.get(0).get("gran14") == null ? 0 : (double) list.get(0).get("gran14")); - resMap.put("sysgran21",list.get(0).get("gran21") == null ? 0 : (double) list.get(0).get("gran21")); + resMap.put("sysgran4",list.get(0).get("gran4") == null ? 0.0 : (double) list.get(0).get("gran4")); + resMap.put("sysgran6",list.get(0).get("gran6") == null ? 0.0 : (double) list.get(0).get("gran6")); + resMap.put("sysgran14",list.get(0).get("gran14") == null ? 0.0 : (double) list.get(0).get("gran14")); + resMap.put("sysgran21",list.get(0).get("gran21") == null ? 0.0 : (double) list.get(0).get("gran21")); - resMap.put("linespeed",list.get(0).get("line_speed") == null ? 0 : (double) list.get(0).get("line_speed"));//车速 + resMap.put("linespeed",list.get(0).get("line_speed") == null ? 0.0 : (double) list.get(0).get("line_speed"));//车速 //功率= √3IUcosΦ/1000 - resMap.put("syspower",list.get(0).get("sys_cur") == null ? 0 : Math.sqrt(3)*Float.parseFloat(list.get(0).get("sys_cur").toString())*380*0.86/1000); + resMap.put("syspower",list.get(0).get("sys_cur") == null ? 0.0 : Math.sqrt(3)*Float.parseFloat(list.get(0).get("sys_cur").toString())*380*0.86/1000); //系统效率 = 系统压力*系统流量/系统功率 double power = (double) resMap.get("syspower"); double sysflw = (double)resMap.get("sysflw"); double pressure = (double)resMap.get("sysprs"); - resMap.put("syseff",power == 0 ? 0 : pressure * sysflw/power); + resMap.put("syseff",power == 0 ? 0.0 : pressure * sysflw/power); List syscur = new ArrayList<>();//系统电流 @@ -470,31 +469,31 @@ public class DataQueryService implements IDataQueryService { for (int i = list.size() - 1; i >= 0; i--) { Map data = list.get(i); - syscur.add(data.get("sys_cur") == null ? 0 : data.get("sys_cur")); + syscur.add(data.get("sys_cur") == null ? 0.0 : data.get("sys_cur")); - flw1.add(data.get("flw1") == null ? 0 : data.get("flw1")); - flw2.add(data.get("flw2") == null ? 0 : data.get("flw2")); - flw3.add(data.get("flw3") == null ? 0 : data.get("flw3")); - flw4.add(data.get("flw4") == null ? 0 : data.get("flw4")); - flw5.add(data.get("flw5") == null ? 0 : data.get("flw5")); - flw6.add(data.get("flw6") == null ? 0 : data.get("flw6")); - flw7.add(data.get("flw7") == null ? 0 : data.get("flw7")); - flw8.add(data.get("flw8") == null ? 0 : data.get("flw8")); - flw9.add(data.get("flw9") == null ? 0 : data.get("flw9")); - flw10.add(data.get("flw10") == null ? 0 : data.get("flw10")); - flw11.add(data.get("flw11") == null ? 0 : data.get("flw11")); + flw1.add(data.get("flw1") == null ? 0.0 : data.get("flw1")); + flw2.add(data.get("flw2") == null ? 0.0 : data.get("flw2")); + flw3.add(data.get("flw3") == null ? 0.0 : data.get("flw3")); + flw4.add(data.get("flw4") == null ? 0.0 : data.get("flw4")); + flw5.add(data.get("flw5") == null ? 0.0 : data.get("flw5")); + flw6.add(data.get("flw6") == null ? 0.0 : data.get("flw6")); + flw7.add(data.get("flw7") == null ? 0.0 : data.get("flw7")); + flw8.add(data.get("flw8") == null ? 0.0 : data.get("flw8")); + flw9.add(data.get("flw9") == null ? 0.0 : data.get("flw9")); + flw10.add(data.get("flw10") == null ? 0.0 : data.get("flw10")); + flw11.add(data.get("flw11") == null ? 0.0 : data.get("flw11")); - prs1.add(data.get("press1") == null ? 0 : data.get("press1")); - prs2.add(data.get("press2") == null ? 0 : data.get("press2")); - prs3.add(data.get("press3") == null ? 0 : data.get("press3")); - prs4.add(data.get("press4") == null ? 0 : data.get("press4")); - prs5.add(data.get("press5") == null ? 0 : data.get("press5")); - prs6.add(data.get("press6") == null ? 0 : data.get("press6")); - prs7.add(data.get("press7") == null ? 0 : data.get("press7")); - prs8.add(data.get("press8") == null ? 0 : data.get("press8")); - prs9.add(data.get("press9") == null ? 0 : data.get("press9")); - prs10.add(data.get("press10") == null ? 0 : data.get("press10")); - prs11.add(data.get("press11") == null ? 0 : data.get("press11")); + prs1.add(data.get("press1") == null ? 0.0 : data.get("press1")); + prs2.add(data.get("press2") == null ? 0.0 : data.get("press2")); + prs3.add(data.get("press3") == null ? 0.0 : data.get("press3")); + prs4.add(data.get("press4") == null ? 0.0 : data.get("press4")); + prs5.add(data.get("press5") == null ? 0.0 : data.get("press5")); + prs6.add(data.get("press6") == null ? 0.0 : data.get("press6")); + prs7.add(data.get("press7") == null ? 0.0 : data.get("press7")); + prs8.add(data.get("press8") == null ? 0.0 : data.get("press8")); + prs9.add(data.get("press9") == null ? 0.0: data.get("press9")); + prs10.add(data.get("press10") == null ? 0.0 : data.get("press10")); + prs11.add(data.get("press11") == null ? 0.0 : data.get("press11")); LocalDateTime time = InfluxdbTimeUtil.utcToCst(data.get("time").toString()); timelist.add( time.getMinute() < 10 ? "0" + time.getMinute() : time.getMinute() + ":" + (time.getSecond() < 10 ? "0" + time.getSecond() : time.getSecond())); @@ -540,44 +539,44 @@ public class DataQueryService implements IDataQueryService { ScollerData ipcData = new ScollerData(); ipcData.setTime(InfluxdbTimeUtil.utcToCst(data.get("time").toString()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); ipcData.setStatus(data.get("status") == null ? "0" : (String) data.get("status")); - ipcData.setSysCur(data.get("sys_cur") == null ? 0 : (double) data.get("sys_cur")); - ipcData.setSysLevel(data.get("sys_level") == null ? 0 : (double) data.get("sys_level")); - ipcData.setSysTemp(data.get("sys_temp") == null ? 0 : (double) data.get("sys_temp")); - ipcData.setSysPress(data.get("sys_press") == null ? 0 : (double) data.get("sys_press")); - ipcData.setSysFlow(data.get("sys_flw") == null ? 0 : (double) data.get("sys_flw")); - ipcData.setHumi(data.get("oil_water") == null ? 0 : (double) data.get("oil_water")); - ipcData.setVisc(data.get("visc") == null ? 0 : (double) data.get("visc")); + ipcData.setSysCur(data.get("sys_cur") == null ? 0.0 : (double) data.get("sys_cur")); + ipcData.setSysLevel(data.get("sys_level") == null ? 0.0 : (double) data.get("sys_level")); + ipcData.setSysTemp(data.get("sys_temp") == null ? 0.0 : (double) data.get("sys_temp")); + ipcData.setSysPress(data.get("sys_press") == null ? 0.0 : (double) data.get("sys_press")); + ipcData.setSysFlow(data.get("sys_flw") == null ? 0.0 : (double) data.get("sys_flw")); + ipcData.setHumi(data.get("oil_water") == null ? 0.0 : (double) data.get("oil_water")); + ipcData.setVisc(data.get("visc") == null ? 0.0 : (double) data.get("visc")); - ipcData.setGran4(data.get("gran4") == null ? 0 : (double) data.get("gran4")); - ipcData.setGran6(data.get("gran6") == null ? 0 : (double) data.get("gran6")); - ipcData.setGran14(data.get("gran14") == null ? 0 : (double) data.get("gran14")); - ipcData.setGran21(data.get("gran21") == null ? 0 : (double) data.get("gran21")); + ipcData.setGran4(data.get("gran4") == null ? 0.0 : (double) data.get("gran4")); + ipcData.setGran6(data.get("gran6") == null ? 0.0 : (double) data.get("gran6")); + ipcData.setGran14(data.get("gran14") == null ? 0.0 : (double) data.get("gran14")); + ipcData.setGran21(data.get("gran21") == null ? 0.0 : (double) data.get("gran21")); - ipcData.setSpeed(data.get("line_speed") == null ? 0 : (double) data.get("line_speed")); + ipcData.setSpeed(data.get("line_speed") == null ? 0.0 : (double) data.get("line_speed")); - ipcData.setPress1(data.get("press1") == null ? 0 : (double) data.get("press1")); - ipcData.setPress2(data.get("press2") == null ? 0 : (double) data.get("press2")); - ipcData.setPress3(data.get("press3") == null ? 0 : (double) data.get("press3")); - ipcData.setPress4(data.get("press4") == null ? 0 : (double) data.get("press4")); - ipcData.setPress5(data.get("press5") == null ? 0 : (double) data.get("press5")); - ipcData.setPress6(data.get("press6") == null ? 0 : (double) data.get("press6")); - ipcData.setPress7(data.get("press7") == null ? 0 : (double) data.get("press7")); - ipcData.setPress8(data.get("press8") == null ? 0 : (double) data.get("press8")); - ipcData.setPress9(data.get("press9") == null ? 0 : (double) data.get("press9")); - ipcData.setPress10(data.get("press10") == null ? 0 : (double) data.get("press10")); - ipcData.setPress11(data.get("press11") == null ? 0 : (double) data.get("press11")); + ipcData.setPress1(data.get("press1") == null ? 0.0 : (double) data.get("press1")); + ipcData.setPress2(data.get("press2") == null ? 0.0 : (double) data.get("press2")); + ipcData.setPress3(data.get("press3") == null ? 0.0 : (double) data.get("press3")); + ipcData.setPress4(data.get("press4") == null ? 0.0 : (double) data.get("press4")); + ipcData.setPress5(data.get("press5") == null ? 0.0 : (double) data.get("press5")); + ipcData.setPress6(data.get("press6") == null ? 0.0 : (double) data.get("press6")); + ipcData.setPress7(data.get("press7") == null ? 0.0 : (double) data.get("press7")); + ipcData.setPress8(data.get("press8") == null ? 0.0: (double) data.get("press8")); + ipcData.setPress9(data.get("press9") == null ? 0.0 : (double) data.get("press9")); + ipcData.setPress10(data.get("press10") == null ? 0.0 : (double) data.get("press10")); + ipcData.setPress11(data.get("press11") == null ? 0.0 : (double) data.get("press11")); - ipcData.setFlow1(data.get("flw1") == null ? 0 : (double) data.get("flw1")); - ipcData.setFlow2(data.get("flw2") == null ? 0 : (double) data.get("flw2")); - ipcData.setFlow3(data.get("flw3") == null ? 0 : (double) data.get("flw3")); - ipcData.setFlow4(data.get("flw4") == null ? 0 : (double) data.get("flw4")); - ipcData.setFlow5(data.get("flw5") == null ? 0 : (double) data.get("flw5")); - ipcData.setFlow6(data.get("flw6") == null ? 0 : (double) data.get("flw6")); - ipcData.setFlow7(data.get("flw7") == null ? 0 : (double) data.get("flw7")); - ipcData.setFlow8(data.get("flw8") == null ? 0 : (double) data.get("flw8")); - ipcData.setFlow9(data.get("flw9") == null ? 0 : (double) data.get("flw9")); - ipcData.setFlow10(data.get("flw10") == null ? 0 : (double) data.get("flw10")); - ipcData.setFlow11(data.get("flw11") == null ? 0 : (double) data.get("flw11")); + ipcData.setFlow1(data.get("flw1") == null ? 0.0 : (double) data.get("flw1")); + ipcData.setFlow2(data.get("flw2") == null ? 0.0 : (double) data.get("flw2")); + ipcData.setFlow3(data.get("flw3") == null ? 0.0 : (double) data.get("flw3")); + ipcData.setFlow4(data.get("flw4") == null ? 0.0 : (double) data.get("flw4")); + ipcData.setFlow5(data.get("flw5") == null ? 0.0 : (double) data.get("flw5")); + ipcData.setFlow6(data.get("flw6") == null ? 0.0 : (double) data.get("flw6")); + ipcData.setFlow7(data.get("flw7") == null ? 0.0 : (double) data.get("flw7")); + ipcData.setFlow8(data.get("flw8") == null ? 0.0 : (double) data.get("flw8")); + ipcData.setFlow9(data.get("flw9") == null ? 0.0 : (double) data.get("flw9")); + ipcData.setFlow10(data.get("flw10") == null ? 0.0 : (double) data.get("flw10")); + ipcData.setFlow11(data.get("flw11") == null ? 0.0 : (double) data.get("flw11")); resList.add(ipcData); }); 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 5a407a7..3bd6f85 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) { + public List dealRealTimeData(Map map, Map tags,int type, List rulesList, int status) { List returnList = new ArrayList<>(); for (IpcAlarmRules rule : rulesList) { - // 判断是否当前参数类型 0:运行中 1:待机 + // 判断是否当前参数类型 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(rule.getReferenceName()); + ipcAlarmRecord.setContent(status == 2 || status == 3 ? "(开机监测)" + 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 c5a4fa0..c420489 100644 --- a/zfipc-ui/src/views/zf/cydg/yxjk.vue +++ b/zfipc-ui/src/views/zf/cydg/yxjk.vue @@ -6,7 +6,10 @@ class="second-col" style="height: 100%;" > - + ZFSC4超压平衡缸P/Q特性 @@ -145,7 +148,11 @@
-
{{ sjyltxWarning }}
+
{{sjyltxWarning}}
+
@@ -154,7 +161,10 @@ class="first-col" style="height: 100%;" > - + ZFSC4超压底缸加压液压系统主参数 @@ -166,8 +176,11 @@ id="xtyl" style="height: 90%" >
-
系统压力
+
系统压力
-
系统液温
+
系统液温
- +
- - -
-
当前值{{ xtywei }}
-
初始值{{ xtyweicsz }}
-
最小值{{ xtyweimin }}
-
最大值{{ xtyweimax }}
-
- +
+
当前值{{ xtywei }}
+
初始值{{ xtyweicsz }}
+
最小值{{ xtyweimin }}
+
最大值{{ xtyweimax }}
+
+
-
系统液位(CP)
+
系统液位(CP)
@@ -217,8 +242,11 @@ id="bscll" style="height: 90%" > -
泵输出流量
+
泵输出流量
-
{{mainWarning}}
+
{{mainWarning}}
+
@@ -254,7 +286,10 @@ class="third-col" style="height: 100%;" > - + 系统状态信息
@@ -264,7 +299,7 @@ >电机总耗电量{{powerConsumption}}度 -->
电机实时电流{{zdjdl}}A
@@ -277,7 +312,11 @@
-
{{sysecWarning}}
+
{{sysecWarning}}
+
@@ -288,7 +327,10 @@ class="first-col" style="height: 100%;" > - + ZFSC4超压底缸加压压区P/Q特性 @@ -386,7 +428,11 @@
-
{{llyltxWarning}}
+
{{llyltxWarning}}
+
@@ -395,7 +441,10 @@ class="second-col" style="height: 100%;" > - + ZFSC4超压底缸加压系统油品特性 @@ -405,7 +454,7 @@ >
@@ -416,7 +465,7 @@ >
@@ -426,30 +475,42 @@ 4um + >4um {{ yykld4 }} 6um + >6um {{ yykld6 }} 14um + >14um {{ yykld14 }} 21um + >21um {{ yykld21 }}
@@ -466,7 +527,11 @@
-
{{ylkldWarning}}
+
{{ylkldWarning}}
+
@@ -475,7 +540,10 @@ class="third-col" style="height: 100%;" > - + 系统状态
@@ -989,6 +1057,9 @@ export default { }, handleQuery() { this.loading = true; + if (this.datetime == null) { + this.datetime = this.getDefaultTimeRange(); + } let startTime = new Date(this.datetime[0]); this.queryParams.startTime = this.formatDateTime(startTime); let endTime = new Date(this.datetime[1]); @@ -1190,6 +1261,7 @@ export default { item.nameKey == "sys_level" || item.nameKey == "sys_temp" ) + .slice(0, 10) .map( (obj) => "报警内容:" + obj.content + " 报警时间:" + obj.alarmTime @@ -1216,6 +1288,7 @@ export default { item.nameKey == "driven_soft_flw" || item.nameKey == "driven_hot_flw" ) + .slice(0, 10) .map( (obj) => "报警内容:" + obj.content + " 报警时间:" + obj.alarmTime @@ -1224,6 +1297,7 @@ export default { // 系统能耗及预警 this.sysecWarning = response.data .filter((item) => item.nameKey == "sys_cur") + .slice(0, 10) .map( (obj) => "报警内容:" + obj.content + " 报警时间:" + obj.alarmTime @@ -1238,6 +1312,7 @@ export default { item.nameKey == "opr_bottom_set_press" || item.nameKey == "driven_bottom_set_press" ) + .slice(0, 10) .map( (obj) => "报警内容:" + obj.content + " 报警时间:" + obj.alarmTime @@ -1254,6 +1329,7 @@ export default { item.nameKey == "gran14" || item.nameKey == "gran21" ) + .slice(0, 10) .map( (obj) => "报警内容:" + obj.content + " 报警时间:" + obj.alarmTime @@ -1436,14 +1512,14 @@ export default { cdcjyylqxOption.xAxis[0].data = this.XDATA; cdcjyylqxOption.series[0].data = this.showdata.drivensoftrealpress; cdcjyylqxOption.series[1].data = this.showdata.drivenhotrealpress; - cdcjyylqxOption.series[0].markLine.data[0].yAxis = - this.showdata.drivensoftbondpress.slice(-1)[0]; - cdcjyylqxOption.series[0].markLine.data[1].yAxis = - this.showdata.drivensoftactpress.slice(-1)[0]; - cdcjyylqxOption.series[1].markLine.data[0].yAxis = - this.showdata.drivenhotbondpress.slice(-1)[0]; - cdcjyylqxOption.series[1].markLine.data[1].yAxis = - this.showdata.drivenhotactpress.slice(-1)[0]; + // cdcjyylqxOption.series[0].markLine.data[0].yAxis = + // this.showdata.drivensoftbondpress.slice(-1)[0]; + // cdcjyylqxOption.series[0].markLine.data[1].yAxis = + // this.showdata.drivensoftactpress.slice(-1)[0]; + // cdcjyylqxOption.series[1].markLine.data[0].yAxis = + // this.showdata.drivenhotbondpress.slice(-1)[0]; + // cdcjyylqxOption.series[1].markLine.data[1].yAxis = + // this.showdata.drivenhotactpress.slice(-1)[0]; // cdcjyylqxOption.series[2].data = this.showdata.dsrghgyl; // cdcjyylqxOption.series[3].data = this.showdata.dsrgjyyl; // cdcjyylqxOption.series[4].data = this.showdata.dsreghgyl; @@ -1460,14 +1536,14 @@ export default { czcjyylqxOption.xAxis[0].data = this.XDATA; czcjyylqxOption.series[0].data = this.showdata.oprsoftrealpress; czcjyylqxOption.series[1].data = this.showdata.oprhotrealpress; - czcjyylqxOption.series[0].markLine.data[0].yAxis = - this.showdata.oprsoftbondpress.slice(-1)[0]; - czcjyylqxOption.series[0].markLine.data[1].yAxis = - this.showdata.oprsoftactpress.slice(-1)[0]; - czcjyylqxOption.series[1].markLine.data[0].yAxis = - this.showdata.oprhotbondpress.slice(-1)[0]; - czcjyylqxOption.series[1].markLine.data[1].yAxis = - this.showdata.oprhotactpress.slice(-1)[0]; + // czcjyylqxOption.series[0].markLine.data[0].yAxis = + // this.showdata.oprsoftbondpress.slice(-1)[0]; + // czcjyylqxOption.series[0].markLine.data[1].yAxis = + // this.showdata.oprsoftactpress.slice(-1)[0]; + // czcjyylqxOption.series[1].markLine.data[0].yAxis = + // this.showdata.oprhotbondpress.slice(-1)[0]; + // czcjyylqxOption.series[1].markLine.data[1].yAxis = + // this.showdata.oprhotactpress.slice(-1)[0]; // czcjyylqxOption.series[2].data = this.showdata.tsrghgyl; // czcjyylqxOption.series[3].data = this.showdata.tsrgjyyl; // czcjyylqxOption.series[4].data = this.showdata.tsreghgyl; @@ -1483,16 +1559,16 @@ export default { let cdcylbhqxOption = this.cdcylbhqxCharts.getOption(); cdcylbhqxOption.xAxis[0].data = this.XDATA; cdcylbhqxOption.series[0].data = this.showdata.drivenbottompress; - cdcylbhqxOption.series[0].markLine.data[0].yAxis = - this.showdata.oprbottomsetpress.slice(-1)[0]; + // cdcylbhqxOption.series[0].markLine.data[0].yAxis = + // this.showdata.oprbottomsetpress.slice(-1)[0]; // cdcylbhqxOption.series[1].data = this.showdata.dgcdcblsff; this.cdcylbhqxCharts.setOption(cdcylbhqxOption); let czcylbhqxOption = this.czcylbhqxCharts.getOption(); czcylbhqxOption.xAxis[0].data = this.XDATA; czcylbhqxOption.series[0].data = this.showdata.oprbottompress; - czcylbhqxOption.series[0].markLine.data[0].yAxis = - this.showdata.oprbottomsetpress.slice(-1)[0]; + // czcylbhqxOption.series[0].markLine.data[0].yAxis = + // this.showdata.oprbottomsetpress.slice(-1)[0]; // czcylbhqxOption.series[1].data = this.showdata.dgczcblsff; this.czcylbhqxCharts.setOption(czcylbhqxOption); @@ -1682,33 +1758,6 @@ export default { }, data: this.showdata.drivensoftrealpress, symbol: "none", - markLine: { - symbol: ["none", "none"], - silent: true, - lineStyle: { - type: "dashed", - }, - label: { - position: "middle", - color: "inherit", - }, - data: [ - { - yAxis: this.showdata.drivensoftbondpress.slice(-1)[0], - lineStyle: { - width: 1, - color: "#FF0087", - }, - }, - { - yAxis: this.showdata.drivensoftactpress.slice(-1)[0], - lineStyle: { - width: 1, - color: "#FFBF00", - }, - }, - ], - }, }, { name: "热辊实际压力", @@ -1718,33 +1767,6 @@ export default { }, data: this.showdata.drivenhotrealpress, symbol: "none", - markLine: { - symbol: ["none", "none"], - silent: true, - lineStyle: { - type: "dashed", - }, - label: { - position: "middle", - color: "inherit", - }, - data: [ - { - yAxis: this.showdata.drivenhotbondpress.slice(-1)[0], - lineStyle: { - width: 1, - color: "#fc8452", - }, - }, - { - yAxis: this.showdata.drivenhotactpress.slice(-1)[0], - lineStyle: { - width: 1, - color: "#ea7ccc", - }, - }, - ], - }, }, // { // name: "软辊合辊压力", @@ -1858,33 +1880,6 @@ export default { }, data: this.showdata.oprsoftrealpress, symbol: "none", - markLine: { - symbol: ["none", "none"], - silent: true, - lineStyle: { - type: "dashed", - }, - label: { - position: "middle", - color: "inherit", - }, - data: [ - { - yAxis: this.showdata.oprsoftbondpress.slice(-1)[0], - lineStyle: { - width: 1, - color: "#FF0087", - }, - }, - { - yAxis: this.showdata.oprsoftactpress.slice(-1)[0], - lineStyle: { - width: 1, - color: "#FFBF00", - }, - }, - ], - }, }, { name: "热辊实际压力", @@ -1894,33 +1889,6 @@ export default { }, data: this.showdata.oprhotrealpress, symbol: "none", - markLine: { - symbol: ["none", "none"], - silent: true, - lineStyle: { - type: "dashed", - }, - label: { - position: "middle", - color: "inherit", - }, - data: [ - { - yAxis: this.showdata.oprhotbondpress.slice(-1)[0], - lineStyle: { - width: 1, - color: "#fc8452", - }, - }, - { - yAxis: this.showdata.oprhotactpress.slice(-1)[0], - lineStyle: { - width: 1, - color: "#ea7ccc", - }, - }, - ], - }, }, // { // name: "软辊合辊压力", @@ -2065,26 +2033,6 @@ export default { }, data: this.showdata.oprbottompress, symbol: "none", - markLine: { - symbol: ["none", "none"], - silent: true, - lineStyle: { - type: "dashed", - }, - label: { - position: "middle", - color: "#FFFF00", - }, - data: [ - { - yAxis: this.showdata.oprbottomsetpress.slice(-1)[0], //底缸操作侧设定压力 - lineStyle: { - width: 1, - color: "#FFFF00", - }, - }, - ], - }, }, // { // name: "底缸加压设定压力", @@ -2128,27 +2076,6 @@ export default { }, data: this.showdata.drivenbottompress, symbol: "none", - markLine: { - symbol: ["none", "none"], - // symbol: ["circle", "arrow"], //箭头 - silent: true, - lineStyle: { - type: "dashed", - }, - label: { - position: "middle", - color: "#FFFF00", - }, - data: [ - { - yAxis: this.showdata.drivenbottompress.slice(-1)[0], //底缸传动侧设定压力 - lineStyle: { - width: 1, - color: "#FFFF00", - }, - }, - ], - }, }, // { // name: "底缸加压设定压力", @@ -2273,14 +2200,14 @@ export default { data: ["4um", "6um", "14um", "21um"], }, yAxis: { - name: "Y(mA)", + name: "颗粒度", min: 0, max: 1, interval: 0.2, // 指定刻度间隔 }, series: [ { - name: "位移", + name: "颗粒度", type: "bar", barWidth: "30", itemStyle: { @@ -2815,6 +2742,7 @@ export default { font-weight: 400; color: #ffffff; padding-left: 10%; + white-space: nowrap; } .device-bottom-value { font-size: 14px; diff --git a/zfipc-ui/src/views/zf/zgdgBottom/index.vue b/zfipc-ui/src/views/zf/zgdgBottom/index.vue index 2bb7dcb..d66977d 100644 --- a/zfipc-ui/src/views/zf/zgdgBottom/index.vue +++ b/zfipc-ui/src/views/zf/zgdgBottom/index.vue @@ -4,8 +4,12 @@ - + ZFSC4中高底辊液压压区P/Q特性 @@ -157,15 +161,23 @@
-
{{sjyltxWarning}}
+
{{sjyltxWarning}}
+
- + ZFSC4中高底辊液压系统主参数 @@ -177,8 +189,11 @@ id="xtyl" style="height: 90%" >
-
系统压力
+
系统压力
-
系统液温
+
系统液温
最大值{{ xtyweimax }}
-
系统液位(CP)
+
系统液位(CP)
@@ -224,8 +245,11 @@ id="zbscll" style="height: 90%" >
-
泵输出流量
+
泵输出流量
-
{{mainWarning}}
+
{{mainWarning}}
+
- + 系统状态信息
电机实时电流{{zdjdl}}A
@@ -279,7 +311,11 @@
-
{{sysecWarning}}
+
{{sysecWarning}}
+
@@ -441,38 +477,44 @@
-
{{ llyltxWarning }}
+
{{llyltxWarning}}
+
- + ZFSC4超压底缸加压系统油品特性
@@ -482,26 +524,42 @@ 4um + >4um
{{ yykld4 }} 6um + >6um {{ yykld6 }} 14um + >14um {{ yykld14 }} 21um + >21um {{ yykld21 }}
@@ -518,15 +576,23 @@
-
{{ylkldWarning}}
+
{{ylkldWarning}}
+
- + 系统状态
@@ -1032,6 +1098,9 @@ export default { }, handleQuery() { this.loading = true; + if (this.datetime == null) { + this.datetime = this.getDefaultTimeRange(); + } let startTime = new Date(this.datetime[0]); this.queryParams.startTime = this.formatDateTime(startTime); let endTime = new Date(this.datetime[1]); @@ -1233,6 +1302,7 @@ export default { item.nameKey == "sys_level" || item.nameKey == "sys_temp" ) + .slice(0, 10) .map( (obj) => "报警内容:" + obj.content + " 报警时间:" + obj.alarmTime @@ -1254,6 +1324,7 @@ export default { item.nameKey == "press10" || item.nameKey == "press11" ) + .slice(0, 10) .map( (obj) => "报警内容:" + obj.content + " 报警时间:" + obj.alarmTime @@ -1263,6 +1334,7 @@ export default { // 系统能耗及预警 this.sysecWarning = response.data .filter((item) => item.nameKey == "sys_cur") + .slice(0, 10) .map( (obj) => "报警内容:" + obj.content + " 报警时间:" + obj.alarmTime @@ -1285,6 +1357,7 @@ export default { item.nameKey == "flw10" || item.nameKey == "flw11" ) + .slice(0, 10) .map((obj) => obj.alarmDetail); // .join(","); // ZFSC4超压底缸加压系统油品特性报警 @@ -1298,6 +1371,7 @@ export default { item.nameKey == "gran14" || item.nameKey == "gran21" ) + .slice(0, 10) .map( (obj) => "报警内容:" + obj.content + " 报警时间:" + obj.alarmTime @@ -2496,6 +2570,7 @@ export default { font-weight: 400; color: #ffffff; padding-left: 10%; + white-space: nowrap; } .device-bottom-value { font-size: 14px; @@ -2557,6 +2632,7 @@ export default { } .font-size-14 { font-size: 14px; + cursor: pointer; } .font-size-18 { font-size: 18px; diff --git a/zfipc-ui/src/views/zf/zgdgTop/index.vue b/zfipc-ui/src/views/zf/zgdgTop/index.vue index 4ae227e..c1975ed 100644 --- a/zfipc-ui/src/views/zf/zgdgTop/index.vue +++ b/zfipc-ui/src/views/zf/zgdgTop/index.vue @@ -4,8 +4,12 @@ - + ZFSC4中高底辊液压压区P/Q特性 @@ -157,15 +161,23 @@
-
{{sjyltxWarning}}
+
{{sjyltxWarning}}
+
- + ZFSC4中高底辊液压系统主参数 @@ -177,8 +189,11 @@ id="xtyl" style="height: 90%" >
-
系统压力
+
系统压力
-
系统液温
+
系统液温
最大值{{ xtyweimax }}
-
系统液位(CP)
+
系统液位(CP)
@@ -224,8 +245,11 @@ id="zbscll" style="height: 90%" >
-
泵输出流量
+
泵输出流量
-
{{mainWarning}}
+
{{mainWarning}}
+
- + 系统状态信息
电机实时电流{{zdjdl}}A
@@ -279,7 +311,11 @@
-
{{sysecWarning}}
+
{{sysecWarning}}
+
@@ -288,8 +324,12 @@ - + ZFSC4中高底辊液压压区P/Q特性 @@ -441,38 +481,44 @@
-
{{ llyltxWarning }}
+
{{llyltxWarning}}
+
- + ZFSC4超压底缸加压系统油品特性
@@ -482,26 +528,42 @@ 4um + >4um
{{ yykld4 }} 6um + >6um {{ yykld6 }} 14um + >14um {{ yykld14 }} 21um + >21um {{ yykld21 }}
@@ -518,15 +580,23 @@
-
{{ylkldWarning}}
+
{{ylkldWarning}}
+
- + 系统状态
@@ -1032,6 +1102,9 @@ export default { }, handleQuery() { this.loading = true; + if (this.datetime == null) { + this.datetime = this.getDefaultTimeRange(); + } let startTime = new Date(this.datetime[0]); this.queryParams.startTime = this.formatDateTime(startTime); let endTime = new Date(this.datetime[1]); @@ -1233,6 +1306,7 @@ export default { item.nameKey == "sys_level" || item.nameKey == "sys_temp" ) + .slice(0, 10) .map( (obj) => "报警内容:" + obj.content + " 报警时间:" + obj.alarmTime @@ -1254,6 +1328,7 @@ export default { item.nameKey == "press10" || item.nameKey == "press11" ) + .slice(0, 10) .map( (obj) => "报警内容:" + obj.content + " 报警时间:" + obj.alarmTime @@ -1263,6 +1338,7 @@ export default { // 系统能耗及预警 this.sysecWarning = response.data .filter((item) => item.nameKey == "sys_cur") + .slice(0, 10) .map( (obj) => "报警内容:" + obj.content + " 报警时间:" + obj.alarmTime @@ -1285,6 +1361,7 @@ export default { item.nameKey == "flw10" || item.nameKey == "flw11" ) + .slice(0, 10) .map((obj) => obj.alarmDetail); // .join(","); // ZFSC4超压底缸加压系统油品特性报警 @@ -1298,6 +1375,7 @@ export default { item.nameKey == "gran14" || item.nameKey == "gran21" ) + .slice(0, 10) .map( (obj) => "报警内容:" + obj.content + " 报警时间:" + obj.alarmTime @@ -2496,6 +2574,7 @@ export default { font-weight: 400; color: #ffffff; padding-left: 10%; + white-space: nowrap; } .device-bottom-value { font-size: 14px; @@ -2557,6 +2636,7 @@ export default { } .font-size-14 { font-size: 14px; + cursor: pointer; } .font-size-18 { font-size: 18px;