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 cf97546..951d10a 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 @@ -418,6 +418,9 @@ public class IpcDataProcess implements Runnable { fields.put("opr_bottom_dis", results.getValue(26)); //传动侧底缸位移 fields.put("driven_bottom_dis", results.getValue(27)); + + //工控机参数 + fields.put("ipc_status", results.getValue(300)); //报警处理 List rulesList = alarmRulesService.selectIpcAlarmRulesConfigListByCache(equipId); alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields, tags, Constant.RUNNING, rulesList));//TODO 根据运行状态确定规则 @@ -518,6 +521,8 @@ public class IpcDataProcess implements Runnable { // 十一压区流量 fields.put("flw11", results.getValue(53)); + //工控机参数 + fields.put("ipc_status", results.getValue(301)); //报警处理 List rulesList = alarmRulesService.selectIpcAlarmRulesConfigListByCache(equipId); alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields, tags, Constant.RUNNING, rulesList));//TODO 根据运行状态确定规则 @@ -616,7 +621,8 @@ public class IpcDataProcess implements Runnable { fields.put("flw10", results.getValue(88)); // 十一压区流量 fields.put("flw11", results.getValue(89)); - + //工控机参数 + fields.put("ipc_status", results.getValue(302)); //报警处理 List rulesList = alarmRulesService.selectIpcAlarmRulesConfigListByCache(equipId); alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields, tags, Constant.RUNNING, rulesList));//TODO 根据运行状态确定规则 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 05f2d30..b20697b 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 @@ -55,6 +55,7 @@ public class DataQueryService implements IDataQueryService { 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("visctemp",list.get(0).get("visc_temp") == null ? 0.0 : list.get(0).get("visc_temp"));//系统粘度温度 //系统颗粒度 resMap.put("sysgran4",list.get(0).get("gran4") == null ? 0.0 : list.get(0).get("gran4")); @@ -78,6 +79,8 @@ public class DataQueryService implements IDataQueryService { double pressure = (double)resMap.get("sysprs") == 0 ? 0.0 : (double)resMap.get("sysprs"); resMap.put("syseff",power == 0 ? 0.0 : pressure * sysflw/power*100); + resMap.put("ipcstatus", list.get(0).get("ipc_status") == null ? 0 : list.get(0).get("ipc_status")); + List syscur = new ArrayList<>();//系统电流 List oprsoftflw = new ArrayList<>();//操作侧软辊流量 @@ -232,11 +235,13 @@ public class DataQueryService implements IDataQueryService { List columnList = new ArrayList<>(); List timelist = new ArrayList<>(); + List statusList = new ArrayList<>(); if(intervalHours > 6){ columnName = "mean"; } for (Map data : list) { columnList.add(data.get(columnName)); + statusList.add((Integer) data.get("ipc_status")); LocalDateTime time = InfluxdbTimeUtil.utcToCst(data.get("time").toString()); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); timelist.add(time.format(formatter)); @@ -244,7 +249,7 @@ public class DataQueryService implements IDataQueryService { resMap.put("y", columnList); resMap.put("x", timelist); - + resMap.put("status", statusList); return resMap; } @@ -389,7 +394,7 @@ public class DataQueryService implements IDataQueryService { * @return 数据 */ private List> selectDataByColumnNameandDate(String tableName, String columnName, String startTime, String endTime){ - String sql = "select time," + columnName + " from " + tableName + " where time >= '" + startTime + "' and time <= '" + endTime + "'"; + String sql = "select time," + columnName + ",ipc_status from " + tableName + " where time >= '" + startTime + "' and time <= '" + endTime + "'"; return influxDBUtils.queryResultProcess(influxDBUtils.query(sql)); } @@ -398,7 +403,7 @@ public class DataQueryService implements IDataQueryService { * @return */ private List> selectLongTimeDataByColumnNameandDate(String tableName, String columnName, String startTime, String endTime, String interval){ - String sql = "select time, mean(" + columnName + ") from " + tableName + " where time >= '" + startTime + "' and time <= '" + endTime + "' group by time(" + interval +")"; + String sql = "select time, ipc_status, mean(" + columnName + ") from " + tableName + " where time >= '" + startTime + "' and time <= '" + endTime + "' group by time(" + interval +")"; return influxDBUtils.queryResultProcess(influxDBUtils.query(sql)); } @@ -421,7 +426,7 @@ public class DataQueryService implements IDataQueryService { 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("visctemp",list.get(0).get("visc_temp") == null ? 0.0 : list.get(0).get("visc_temp"));//系统粘度温度 //系统颗粒度 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")); @@ -438,6 +443,8 @@ public class DataQueryService implements IDataQueryService { double pressure = (double)resMap.get("sysprs"); resMap.put("syseff",power == 0 ? 0.0 : pressure * sysflw/power); + resMap.put("ipcstatus", list.get(0).get("ipc_status") == null ? 0 : list.get(0).get("ipc_status"));//工控机状态 + List syscur = new ArrayList<>();//系统电流 List flw1 = new ArrayList<>();//一区流量 diff --git a/zfipc-ui/src/views/zf/bigscreen/bigscreen.vue b/zfipc-ui/src/views/zf/bigscreen/bigscreen.vue index c1ee7f7..9d39959 100644 --- a/zfipc-ui/src/views/zf/bigscreen/bigscreen.vue +++ b/zfipc-ui/src/views/zf/bigscreen/bigscreen.vue @@ -458,7 +458,7 @@
+
+
+
+
+
+
+
+
+
{ this.bsdlndCharts && this.bsdlndCharts.resize(); }); + //温度 + const dlndtemp = document.getElementById("bsdlndtemp"); //系统压力 + this.bsdlndtempCharts = echarts.init(dlndtemp); + this.bsdlndtempCharts.setOption( + this.generateGaugeOption2({ + color: ["00F28D", "00FFDD", "00BFFF"], + bgColor: "87a6a8", + name: "温度", + value: parseFloat(this.showdata.visctemp).toFixed(2), + limit: 200, + unit: "℃", + }), + true, + true + ); + window.addEventListener("resize", () => { + this.bsdlndtempCharts && this.bsdlndtempCharts.resize(); + }); //xdsd 湿度 const xdsd = document.getElementById("bsxdsd"); //系统压力 this.bsxdsdCharts = echarts.init(xdsd); @@ -3924,7 +3992,7 @@ export default { bgColor: "87a6a8", name: "湿度", value: parseFloat(this.showdata.syshumid).toFixed(2), - limit: 0.8, + limit: 100, unit: "%", }), true, @@ -4189,6 +4257,11 @@ export default { this.showdata.sysvisc ).toFixed(2); this.dlndCharts.setOption(dlndOption); + let dlndtempOption = this.dlndtempCharts.getOption(); + dlndtempOption.series[0].data[0].value = parseFloat( + this.showdata.visctemp + ).toFixed(2); + this.dlndCharts.setOption(dlndtempOption); let xdsdOption = this.xdsdCharts.getOption(); xdsdOption.series[0].data[0].value = parseFloat( this.showdata.syshumid @@ -4223,7 +4296,7 @@ export default { bgColor: "023E44", name: "系统压力", value: this.xtyl, - limit: 0.8, + limit: 250, unit: "bar", }), true, @@ -4241,7 +4314,7 @@ export default { bgColor: "0D3F62", name: "系统液温", value: this.xtyw, - limit: 0.8, + limit: 200, unit: "℃", }), true, @@ -4253,7 +4326,7 @@ export default { const xtywei = document.getElementById("xtywei"); //系统液位 this.xtyweiCharts = echarts.init(xtywei); - let yMax = 1; + let yMax = 1500; let option = { grid: { bottom: "20%", @@ -4279,6 +4352,7 @@ export default { yAxis: { show: false, max: yMax, + min: 0, }, series: [ { @@ -4318,7 +4392,7 @@ export default { bgColor: "023953", name: "泵输出流量", value: this.zbscll, - limit: 0.8, + limit: 200, unit: "L/min", }), true, @@ -4336,7 +4410,7 @@ export default { bgColor: "2C2864", name: "输出效率", value: this.scxl, - limit: 0.8, + limit: 100, unit: "%", }), true, @@ -4354,7 +4428,7 @@ export default { bgColor: "373341", name: "主电机实际功率", value: this.zdjsjgl, - limit: 0.8, + limit: 60, unit: "KW", }), true, @@ -4391,7 +4465,7 @@ export default { // data: this.XDATA, // }, // ], - yAxis: { name: "P (bar)" }, + yAxis: { name: "P (bar)", min: 0, max: 210 }, tooltip: { trigger: "axis", axisPointer: { @@ -4494,7 +4568,7 @@ export default { this.zdjdlCharts = echarts.init(zdjdl); this.zdjdlCharts.setOption( this.generateOptions({ - yAxis: { name: "I(A)" }, + yAxis: { name: "I(A)", min: 0, max: 100 }, grid: { left: "10%", top: "12%", @@ -4544,7 +4618,7 @@ export default { // data: this.XDATA, // }, // ], - yAxis: { name: "Q (L/min)" }, + yAxis: { name: "Q (L/min)", min: 0, max: 30 }, tooltip: { trigger: "axis", axisPointer: { @@ -4660,7 +4734,7 @@ export default { yAxis: { name: "PM", min: 0, - max: 1, + max: 26, interval: 0.2, // 指定刻度间隔 }, series: [ @@ -4695,7 +4769,7 @@ export default { bgColor: "87a6a8", name: "粘度", value: parseFloat(this.showdata.sysvisc).toFixed(2), - limit: 0.8, + limit: 250, unit: "mm2/s", }), true, @@ -4704,6 +4778,24 @@ export default { window.addEventListener("resize", () => { this.dlndCharts && this.dlndCharts.resize(); }); + //温度 + const dlndtemp = document.getElementById("dlndtemp"); //系统压力 + this.dlndtempCharts = echarts.init(dlndtemp); + this.dlndtempCharts.setOption( + this.generateGaugeOption2({ + color: ["00F28D", "00FFDD", "00BFFF"], + bgColor: "87a6a8", + name: "温度", + value: parseFloat(this.showdata.visctemp).toFixed(2), + limit: 200, + unit: "℃", + }), + true, + true + ); + window.addEventListener("resize", () => { + this.dlndtempCharts && this.dlndtempCharts.resize(); + }); //xdsd 湿度 const xdsd = document.getElementById("xdsd"); //系统压力 this.xdsdCharts = echarts.init(xdsd); @@ -4713,7 +4805,7 @@ export default { bgColor: "87a6a8", name: "湿度", value: parseFloat(this.showdata.syshumid).toFixed(2), - limit: 0.8, + limit: 100, unit: "%", }), true, @@ -4864,6 +4956,10 @@ export default { this.showdata.sysvisc ).toFixed(2); this.cyldlndCharts.setOption(dlndOption); + let cyldlndtempOption = this.cyldlndtempCharts.getOption(); + cyldlndtempOption.series[0].data[0].value = parseFloat( + this.showdata.visctemp + ).toFixed(2); let xdsdOption = this.cylxdsdCharts.getOption(); xdsdOption.series[0].data[0].value = parseFloat( this.showdata.syshumid @@ -4977,7 +5073,7 @@ export default { bgColor: "023E44", name: "系统压力", value: this.cylxtyl, - limit: 0.8, + limit: 250, unit: "bar", }), true, @@ -4995,7 +5091,7 @@ export default { bgColor: "0D3F62", name: "系统液温", value: this.cylxtyw, - limit: 0.8, + limit: 200, unit: "℃", }), true, @@ -5007,7 +5103,7 @@ export default { const xtywei = document.getElementById("cylxtywei"); //系统液位 this.cylxtyweiCharts = echarts.init(xtywei); - let yMax = 1; + let yMax = 1500; let option = { grid: { bottom: "10%", @@ -5072,7 +5168,7 @@ export default { bgColor: "023953", name: "泵输出流量", value: this.bscll, - limit: 0.8, + limit: 200, unit: "L/min", }), true, @@ -5090,7 +5186,7 @@ export default { bgColor: "2C2864", name: "输出效率", value: this.cylscxl, - limit: 0.8, + limit: 100, unit: "%", }), true, @@ -5108,7 +5204,7 @@ export default { bgColor: "373341", name: "主电机实际功率", value: this.cylzdjsjgl, - limit: 0.8, + limit: 60, unit: "KW", }), true, @@ -5134,7 +5230,7 @@ export default { fontSize: 16, }, }, - yAxis: { name: "P(bar)" }, + yAxis: { name: "P(bar)", min: 0, max: 210 }, series: [ { name: "软辊实际压力", @@ -5213,7 +5309,7 @@ export default { fontSize: 16, }, }, - yAxis: { name: "Q(L/min)" }, + yAxis: { name: "Q(L/min)", min: 0, max: 200 }, series: [ { name: "软辊", @@ -5256,7 +5352,7 @@ export default { fontSize: 16, }, }, - yAxis: { name: "P(bar)" }, + yAxis: { name: "P(bar)", min: 0, max: 210 }, series: [ { name: "软辊实际压力", @@ -5335,7 +5431,7 @@ export default { fontSize: 16, }, }, - yAxis: { name: "Q(L/min)" }, + yAxis: { name: "Q(L/min)", min: 0, max: 200 }, series: [ { name: "软辊", @@ -5369,7 +5465,7 @@ export default { this.cylzdjdlCharts = echarts.init(zdjdl); this.cylzdjdlCharts.setOption( this.generateOptions({ - yAxis: { name: "I(A)" }, + yAxis: { name: "I(A)", min: 0, max: 100 }, grid: { left: "10%", top: "12%", @@ -5409,7 +5505,7 @@ export default { fontSize: 16, }, }, - yAxis: { name: "P(bar)" }, + yAxis: { name: "P(bar)", min: 0, max: 210 }, series: [ { name: "底缸加压实际压力", @@ -5452,7 +5548,7 @@ export default { fontSize: 16, }, }, - yAxis: { name: "P(bar)" }, + yAxis: { name: "P(bar)", min: 0, min: 210 }, series: [ { name: "底缸加压实际压力", @@ -5495,7 +5591,7 @@ export default { fontSize: 16, }, }, - yAxis: { name: "L(mm)" }, + yAxis: { name: "L(mm)", min: 0, max: 350 }, series: [ { name: "位移", @@ -5529,7 +5625,7 @@ export default { fontSize: 16, }, }, - yAxis: { name: "L(mm)" }, + yAxis: { name: "L(mm)", min: 0, max: 350 }, series: [ { name: "位移", @@ -5558,7 +5654,7 @@ export default { bgColor: "87a6a8", name: "粘度", value: parseFloat(this.showdata.sysvisc).toFixed(2), - limit: 0.8, + limit: 200, unit: "mm2/s", }), true, @@ -5567,6 +5663,24 @@ export default { window.addEventListener("resize", () => { this.cyldlndCharts && this.cyldlndCharts.resize(); }); + //粘度温度 + const dlndtemp = document.getElementById("cyldlndtemp"); //系统压力 + this.cyldlndtempCharts = echarts.init(dlndtemp); + this.cyldlndtempCharts.setOption( + this.generateGaugeOption2({ + color: ["00F28D", "00FFDD", "00BFFF"], + bgColor: "87a6a8", + name: "温度", + value: parseFloat(this.showdata.visctemp).toFixed(2), + limit: 200, + unit: "℃", + }), + true, + true + ); + window.addEventListener("resize", () => { + this.cyldlndtempCharts && this.cyldlndtempCharts.resize(); + }); //yykldtx 颗粒度特性 const yykldtx = document.getElementById("cylyykldtx"); this.cylyykldtxCharts = echarts.init(yykldtx); @@ -5588,7 +5702,7 @@ export default { yAxis: { name: "PM", min: 0, - max: 1, + max: 26, interval: 0.2, // 指定刻度间隔 }, series: [ @@ -5628,7 +5742,7 @@ export default { bgColor: "87a6a8", name: "湿度", value: parseFloat(this.showdata.syshumid).toFixed(2), - limit: 0.8, + limit: 100, unit: "%", }), true,