diff --git a/yanzhu-bigscreen/public/css/largeScreenStyle.css b/yanzhu-bigscreen/public/css/largeScreenStyle.css
index 780881ef..011c25cf 100644
--- a/yanzhu-bigscreen/public/css/largeScreenStyle.css
+++ b/yanzhu-bigscreen/public/css/largeScreenStyle.css
@@ -60,7 +60,6 @@ body {
height: 1080px;
}
.img-openwin {
- cursor: pointer;
width: 26px;
height: 26px;
}
@@ -4116,7 +4115,7 @@ table {
}
.process-control-current-value-data p {
padding-top: 15px;
- font-size: 25px;
+ font-size: 23px;
font-weight: bold;
color: #62cff8;
}
diff --git a/yanzhu-bigscreen/public/css/largeScreenStyle.less b/yanzhu-bigscreen/public/css/largeScreenStyle.less
index 404befb3..0d0551f4 100644
--- a/yanzhu-bigscreen/public/css/largeScreenStyle.less
+++ b/yanzhu-bigscreen/public/css/largeScreenStyle.less
@@ -4186,7 +4186,7 @@ table{
}
.process-control-current-value-data p{
padding-top: 15px;
- font-size: 25px;
+ font-size: 23px;
font-weight: bold;
color: #62cff8;
}
diff --git a/yanzhu-bigscreen/src/api/powerIot.js b/yanzhu-bigscreen/src/api/powerIot.js
index e3f2bdc2..d5e677c7 100644
--- a/yanzhu-bigscreen/src/api/powerIot.js
+++ b/yanzhu-bigscreen/src/api/powerIot.js
@@ -17,17 +17,17 @@ const findConfigPointInfo = (id) => {
};
// 查询配电箱数据统计
-const findIotDatasMonitor = (proId,date) => {
+const findIotDatasMonitor = (proId,pointId,date) => {
return request({
- url: `/manage/iotDatas/findIotDatasMonitor/${proId}?date=${date}`,
+ url: `/manage/iotDatas/findIotDatasMonitor/${proId}?pointId=${pointId}&date=${date}`,
method: "get",
});
};
// 查询配电箱预警数据
-const findIotWarnings = (proId) => {
+const findIotWarnings = (proId,pointId) => {
return request({
- url: `/manage/iotWarning/findIotWarnings/${proId}`,
+ url: `/manage/iotWarning/findIotWarnings/${proId}?pointId=${pointId}`,
method: "get",
});
};
diff --git a/yanzhu-bigscreen/src/views/safety/powerIot.vue b/yanzhu-bigscreen/src/views/safety/powerIot.vue
index 34383046..b6fbb3b4 100644
--- a/yanzhu-bigscreen/src/views/safety/powerIot.vue
+++ b/yanzhu-bigscreen/src/views/safety/powerIot.vue
@@ -9,8 +9,8 @@
-
A相温度
-
{{ powerRun.t1 }} ℃
+
A相电压
+
{{ runData.voltageA }} ℃
@@ -20,8 +20,8 @@
-
B相温度
-
{{ powerRun.t2 }} ℃
+
B相电压
+
{{ runData.voltageB }} ℃
@@ -31,8 +31,8 @@
-
C相温度
-
{{ powerRun.t3 }} ℃
+
C相电压
+
{{ runData.voltageC }} ℃
@@ -43,7 +43,7 @@
零线温度
-
{{ powerRun.t4 }} ℃
+
{{ runData.temperature }} ℃
@@ -51,10 +51,12 @@
温度阈值
-
70 ℃
+
{{ powerRun.ratedTemperature }} ℃
+
+
@@ -62,7 +64,7 @@
A相电流
-
{{ powerRun.c1 }} A
+
{{ runData.currentA }} A
@@ -73,7 +75,7 @@
B相电流
-
{{ powerRun.c2 }} A
+
{{ runData.currentB }} A
@@ -84,13 +86,13 @@
C相电流
-
{{ powerRun.c3 }} A
+
{{ runData.currentC }} A
-
+
@@ -214,7 +212,13 @@
export default {
data() {
return {
+ runData: {
+ voltageA:0.00,
+ voltageB:0.00,
+ voltageC:0.00,
+ },
powerRun: {},
+ powerRunId: 0,
powerRunList: [],
trendBtnNav: 7,
trendData: [],
@@ -223,6 +227,7 @@ export default {
warningDataList: [],
forIndex: 0,
warningInterval: undefined,
+
};
},
mounted() {
@@ -241,41 +246,105 @@ export default {
}
this.$api.powerIot.findProAllConfigPoint(this.selProject.id).then((res) => {
if (res.data.length > 0) {
+ this.powerRunId = res.data[0].id;
this.powerRun = res.data[0];
+ this.initTrendData();
+ this.initTumidityData();
+ this.initPowerWarning();
}
this.powerRunList = res.data;
});
- this.initTrendData();
- this.initTumidityData();
},
initTrendData(_date) {
if (_date) {
- this.trendBtnNav = _data;
+ this.trendBtnNav = _date;
}
this.$api.powerIot
- .findIotDatasMonitor(this.selProject.id, this.trendBtnNav)
+ .findIotDatasMonitor(this.selProject.id, this.powerRun.id, this.trendBtnNav)
.then((res) => {
if (res.data.length > 0) {
- this.trendData = JSON.parse(
- '{"lineData":[[6,7,6,6,6,7,7,6,7,9,9,9,9,10,10,9,10,9,8,9,10,11,10,10,8,7,7,7,7,7,6,7,6,6,6,5,5,6,9,10,10,10,11,11,12,12,13,11,9,8,8,7,6,5,5,5,5,5,5,5,5,6,9,12,11,11,12,12,13,13,13,13,11,9,7,6,5,5,4,3,3,2,2,1,1,4,7,7,8,8,9,10,11,13,12,11,11,9,9,9,8,7,6,6,6,6,5,4,4,6,8,10,12,12,13,14,14,15,15,15,12,11,9,8,8,7],[6,6,6,6,5,6,6,6,6,7,8,8,8,9,9,7,8,8,8,8,9,10,10,9,8,7,7,6,6,6,6,6,6,6,5,5,4,5,7,9,10,10,10,11,11,12,12,11,9,8,7,6,6,5,4,4,4,4,5,5,4,5,8,10,10,10,11,11,12,12,12,12,10,8,7,5,5,4,4,3,2,2,1,1,1,2,5,7,8,9,9,10,11,12,12,11,10,9,8,8,7,6,6,6,6,5,5,4,3,4,7,9,11,12,12,13,13,14,15,14,12,10,8,8,7,7],[5,6,5,5,5,6,6,6,7,8,9,9,9,9,9,9,10,9,8,8,9,11,10,10,8,7,7,6,6,6,6,6,6,6,5,5,4,6,8,11,11,11,11,11,12,12,13,12,9,9,7,7,6,5,4,4,5,4,5,5,4,5,8,11,10,11,11,11,12,13,13,12,11,9,7,5,5,4,4,3,2,2,1,1,1,4,6,8,8,9,9,10,11,12,12,11,10,8,8,8,7,6,6,5,5,5,4,4,3,5,7,9,11,12,12,13,14,14,15,15,12,10,8,8,7,7],[5,6,5,5,5,6,6,5,6,7,7,8,8,8,8,7,8,8,7,8,8,9,9,9,7,7,6,6,6,6,6,6,5,5,5,5,4,5,7,9,9,10,10,10,11,11,12,11,9,8,7,6,5,4,4,4,4,4,4,4,4,5,7,10,9,10,11,11,11,12,12,11,10,8,6,5,4,4,3,2,2,2,1,1,0,2,5,6,7,8,8,9,10,11,11,10,9,8,8,7,7,6,6,5,5,5,4,3,3,4,7,8,9,11,11,12,13,14,14,14,11,9,8,7,7,6],[70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70]],"color":["#008ffd","#f6d023","#5af9fd","#fc6902"],"legend":["A相温度","B相温度","C相温度","零线温度","温度阈值"],"unit":"℃","date":["2024-03-04 00:00","2024-03-04 01:00","2024-03-04 02:00","2024-03-04 03:00","2024-03-04 04:00","2024-03-04 05:00","2024-03-04 06:00","2024-03-04 07:00","2024-03-04 08:00","2024-03-04 09:00","2024-03-04 10:00","2024-03-04 11:00","2024-03-04 12:00","2024-03-04 13:00","2024-03-04 14:00","2024-03-05 10:00","2024-03-05 11:00","2024-03-05 12:00","2024-03-05 13:00","2024-03-05 14:00","2024-03-05 15:00","2024-03-05 16:00","2024-03-05 17:00","2024-03-05 18:00","2024-03-05 19:00","2024-03-05 20:00","2024-03-05 21:00","2024-03-05 22:00","2024-03-05 23:00","2024-03-06 00:00","2024-03-06 01:00","2024-03-06 02:00","2024-03-06 03:00","2024-03-06 04:00","2024-03-06 05:00","2024-03-06 06:00","2024-03-06 07:00","2024-03-06 08:00","2024-03-06 09:00","2024-03-06 10:00","2024-03-06 11:00","2024-03-06 12:00","2024-03-06 13:00","2024-03-06 14:00","2024-03-06 15:00","2024-03-06 16:00","2024-03-06 17:00","2024-03-06 18:00","2024-03-06 19:00","2024-03-06 20:00","2024-03-06 21:00","2024-03-06 22:00","2024-03-06 23:00","2024-03-07 00:00","2024-03-07 01:00","2024-03-07 02:00","2024-03-07 03:00","2024-03-07 04:00","2024-03-07 05:00","2024-03-07 06:00","2024-03-07 07:00","2024-03-07 08:00","2024-03-07 09:00","2024-03-07 10:00","2024-03-07 11:00","2024-03-07 12:00","2024-03-07 13:00","2024-03-07 14:00","2024-03-07 15:00","2024-03-07 16:00","2024-03-07 17:00","2024-03-07 18:00","2024-03-07 19:00","2024-03-07 20:00","2024-03-07 21:00","2024-03-07 22:00","2024-03-07 23:00","2024-03-08 00:00","2024-03-08 01:00","2024-03-08 02:00","2024-03-08 03:00","2024-03-08 04:00","2024-03-08 05:00","2024-03-08 06:00","2024-03-08 07:00","2024-03-08 08:00","2024-03-08 09:00","2024-03-08 10:00","2024-03-08 11:00","2024-03-08 12:00","2024-03-08 13:00","2024-03-08 14:00","2024-03-08 15:00","2024-03-08 16:00","2024-03-08 17:00","2024-03-08 18:00","2024-03-08 19:00","2024-03-08 20:00","2024-03-08 21:00","2024-03-08 22:00","2024-03-08 23:00","2024-03-09 00:00","2024-03-09 01:00","2024-03-09 02:00","2024-03-09 03:00","2024-03-09 04:00","2024-03-09 05:00","2024-03-09 06:00","2024-03-09 07:00","2024-03-09 08:00","2024-03-09 09:00","2024-03-09 10:00","2024-03-09 11:00","2024-03-09 12:00","2024-03-09 13:00","2024-03-09 14:00","2024-03-09 15:00","2024-03-09 16:00","2024-03-09 17:00","2024-03-09 18:00","2024-03-09 19:00","2024-03-09 20:00","2024-03-09 21:00","2024-03-09 22:00","2024-03-09 23:00","2024-03-10 00:00"]}'
- );
+ this.runData = res.data[0];
+ res.data.reverse();
+ let _data1 = [];
+ let _data2 = [];
+ let _data3 = [];
+ let _data4 = [];
+ let _data5 = [];
+ let _data6 = [];
+ let _date8 = [];
+ res.data.forEach(item => {
+ _data1.push(item.voltageA);
+ _data2.push(item.voltageB);
+ _data3.push(item.voltageC);
+ _data4.push(item.voltageAb);
+ _data5.push(item.voltageBc);
+ _data6.push(item.voltageCa);
+ _date8.push(item.createTime);
+ });
+ let _lineData = [];
+ _lineData.push(_data1);
+ _lineData.push(_data2);
+ _lineData.push(_data3);
+ _lineData.push(_data4);
+ _lineData.push(_data5);
+ _lineData.push(_data6);
+ let _color = ['#0078e7','#f8e04d','#00bcd4','#008ffd','#f6d023','#5af9fd'];
+ let _legend = ['A相电压','B相电压','C相电压','AB相电压','BC相电压','CA相电压'];
+ let _trendData = {'lineData':_lineData,'color':_color,'legend':_legend,'unit':'V','date':_date8};
+ this.trendData = _trendData;
}
});
},
initTumidityData(_date) {
if (_date) {
- this.tumidityBtnNav = _data;
+ this.tumidityBtnNav = _date;
}
+ let _ratedCurrent = this.powerRun.ratedCurrent;
this.$api.powerIot
- .findIotDatasMonitor(this.selProject.id, this.tumidityBtnNav)
+ .findIotDatasMonitor(this.selProject.id, this.powerRun.id, this.tumidityBtnNav)
.then((res) => {
if (res.data.length > 0) {
- this.tumidityData = JSON.parse(
- '{"lineData":[[16.6,11.6,11.7,11.7,17,16.3,16.8,16.1,18.4,57.3,34.1,16.1,24.9,17,11.6,29.3,31.9,44.2,9.6,34.6,30.2,42.4,19.3,11.9,4.2,4.7,3.4,12,2.1,2.1,2.1,2.1,7,2.2,2,2.1,2,30,27,39.4,30.2,16.2,9.5,6.3,11.6,7.4,13.5,4.2,4.5,13.5,9.3,12.1,2.9,7.6,2.9,2.9,2.8,2.8,2.8,2.9,2.8,11.2,18.3,20.5,11.3,17.8,10.6,10.5,11.2,11.9,16.8,8.7,8.7,18.6,10.5,4.5,8.5,7.3,2.3,7.4,7.2,6.7,7.3,7.3,2.3,25.4,31.7,23.4,21.7,18.4,8.8,7,17.8,11,5.8,4.8,4.6,5.1,8.7,20.5,7.1,25,2.4,2.2,6.6,2.3,2.3,7.1,2.3,19.8,19.2,21.1,13.6,23.6,13.9,4.9,7.3,7.2,6.6,7.4,9.6,9.2,2.8,2.3,2.3,2.3],[6.7,1.4,1.4,9.8,1.4,11.3,18.1,6.4,24.2,37.1,25.6,21.2,30,5.7,21.2,40.2,23.3,39.1,30.7,28.9,19.5,34.3,12.9,15.8,14.9,9.9,10.2,7,2.6,7.1,2.1,14.5,2.2,2.1,2.1,15.9,14.5,36.2,36,31.5,25.6,26.9,17.9,14.4,19.8,14.9,22.9,27.9,21.5,28.4,22,19.6,8.6,8.3,13.4,18.2,12.5,8.1,12,8.2,8.2,26.1,17.7,9.4,9,18.9,19,11.3,17.8,19,24.7,10.4,20.9,13.6,13.5,6.9,7,1.4,7.5,6.3,16.5,5.9,5.9,2,14.3,36.3,34.4,23.8,23.1,26,14.6,16.2,4.2,8.7,2.9,6.6,4.4,10.4,6.7,14.6,6.5,1.4,6.9,1.4,12.1,6.8,6.1,14.9,6.4,25.5,20,15.1,26.6,14.9,7.8,6.2,13.4,9.6,25.8,12.6,12.4,6.8,5.9,4.6,9.3,3.5],[11.2,4.8,15.9,4,14.1,4,15.9,1.9,10.8,22.3,12,13.4,25.8,15.3,16.6,16.1,8.9,17,7.3,10.5,9.9,15.6,20.7,18.5,2.9,7,2.9,1.8,11.4,1.3,11.5,1.2,11.5,1.3,1.2,11.6,11.2,21,21.2,17.3,9.4,19.6,5.4,17.3,10.2,9.6,7.4,6.6,4,2.5,4.4,4.5,9.7,10.1,11.1,1.5,11.1,1.5,1.4,1.5,9.1,11,18.5,6.1,24.5,4.1,2.3,9.7,14.4,6.7,17.1,14,3.4,2.6,10.9,1.2,10.8,1.3,6.3,1.3,6.1,1.3,7.8,8.5,7.9,21.1,13.1,19.9,14.4,24.3,4.2,17.9,16.8,6,18.6,6.4,12.3,14.5,15,4.4,14.4,12.9,1.7,15.7,4.3,4.4,4.4,4.4,15.2,9.2,6.6,6.5,18,7.8,8.6,3.4,10,9.1,21.9,6.6,4,5.5,1.5,4.2,4.1,5.7],[131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131]],"color":["#008ffd","#f4f660","#5af9fd","#FF0016"],"legend":["A相电流","B相电流","C相电流","电流阈值"],"unit":"A","date":["2024-03-04 00:00","2024-03-04 01:00","2024-03-04 02:00","2024-03-04 03:00","2024-03-04 04:00","2024-03-04 05:00","2024-03-04 06:00","2024-03-04 07:00","2024-03-04 08:00","2024-03-04 09:00","2024-03-04 10:00","2024-03-04 11:00","2024-03-04 12:00","2024-03-04 13:00","2024-03-04 14:00","2024-03-05 10:00","2024-03-05 11:00","2024-03-05 12:00","2024-03-05 13:00","2024-03-05 14:00","2024-03-05 15:00","2024-03-05 16:00","2024-03-05 17:00","2024-03-05 18:00","2024-03-05 19:00","2024-03-05 20:00","2024-03-05 21:00","2024-03-05 22:00","2024-03-05 23:00","2024-03-06 00:00","2024-03-06 01:00","2024-03-06 02:00","2024-03-06 03:00","2024-03-06 04:00","2024-03-06 05:00","2024-03-06 06:00","2024-03-06 07:00","2024-03-06 08:00","2024-03-06 09:00","2024-03-06 10:00","2024-03-06 11:00","2024-03-06 12:00","2024-03-06 13:00","2024-03-06 14:00","2024-03-06 15:00","2024-03-06 16:00","2024-03-06 17:00","2024-03-06 18:00","2024-03-06 19:00","2024-03-06 20:00","2024-03-06 21:00","2024-03-06 22:00","2024-03-06 23:00","2024-03-07 00:00","2024-03-07 01:00","2024-03-07 02:00","2024-03-07 03:00","2024-03-07 04:00","2024-03-07 05:00","2024-03-07 06:00","2024-03-07 07:00","2024-03-07 08:00","2024-03-07 09:00","2024-03-07 10:00","2024-03-07 11:00","2024-03-07 12:00","2024-03-07 13:00","2024-03-07 14:00","2024-03-07 15:00","2024-03-07 16:00","2024-03-07 17:00","2024-03-07 18:00","2024-03-07 19:00","2024-03-07 20:00","2024-03-07 21:00","2024-03-07 22:00","2024-03-07 23:00","2024-03-08 00:00","2024-03-08 01:00","2024-03-08 02:00","2024-03-08 03:00","2024-03-08 04:00","2024-03-08 05:00","2024-03-08 06:00","2024-03-08 07:00","2024-03-08 08:00","2024-03-08 09:00","2024-03-08 10:00","2024-03-08 11:00","2024-03-08 12:00","2024-03-08 13:00","2024-03-08 14:00","2024-03-08 15:00","2024-03-08 16:00","2024-03-08 17:00","2024-03-08 18:00","2024-03-08 19:00","2024-03-08 20:00","2024-03-08 21:00","2024-03-08 22:00","2024-03-08 23:00","2024-03-09 00:00","2024-03-09 01:00","2024-03-09 02:00","2024-03-09 03:00","2024-03-09 04:00","2024-03-09 05:00","2024-03-09 06:00","2024-03-09 07:00","2024-03-09 08:00","2024-03-09 09:00","2024-03-09 10:00","2024-03-09 11:00","2024-03-09 12:00","2024-03-09 13:00","2024-03-09 14:00","2024-03-09 15:00","2024-03-09 16:00","2024-03-09 17:00","2024-03-09 18:00","2024-03-09 19:00","2024-03-09 20:00","2024-03-09 21:00","2024-03-09 22:00","2024-03-09 23:00","2024-03-10 00:00"]}'
- );
+ res.data.reverse();
+ let _data1 = [];
+ let _data2 = [];
+ let _data3 = [];
+ let _data4 = [];
+ let _date8 = [];
+ res.data.forEach(item => {
+ _data1.push(item.currentA);
+ _data2.push(item.currentB);
+ _data3.push(item.currentC);
+ _data4.push(_ratedCurrent);
+ _date8.push(item.createTime);
+ });
+ let _lineData = [];
+ _lineData.push(_data1);
+ _lineData.push(_data2);
+ _lineData.push(_data3);
+ _lineData.push(_data4);
+ let _color = ['#008ffd','#f6d023','#5af9fd','#FF0016'];
+ let _legend = ['A相电流','B相电流','C相电流','电流阈值'];
+ let _tumidityData = {'lineData':_lineData,'color':_color,'legend':_legend,'unit':'A','date':_date8};
+ this.tumidityData = _tumidityData;
}
});
},
+ initPowerWarning(){
+ this.$api.powerIot
+ .findIotWarnings(this.selProject.id, this.powerRun.id)
+ .then((res) => {
+ this.warningDataList = res.data;
+ });
+ },
+ doIotSelect(){
+ let _iots = this.powerRunList.filter(detail => detail.id == this.powerRunId);
+ if (_iots.length > 0) {
+ this.powerRun = _iots[0];
+ this.initTrendData();
+ this.initTumidityData();
+ this.initPowerWarning();
+ }
+ },
automaticRoll() {
var height = $(".afoot-con-for").innerHeight()
if (this.forIndex == this.warningDataList.length) {
diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotDatas.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotDatas.java
index ae101a9e..14ca8654 100644
--- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotDatas.java
+++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotDatas.java
@@ -1,10 +1,13 @@
package com.yanzhu.device.domain;
+import com.fasterxml.jackson.annotation.JsonFormat;
import com.yanzhu.common.core.annotation.Excel;
import com.yanzhu.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
+import java.util.Date;
+
/**
* 配电箱数据对象 dev_iot_datas
*
@@ -152,6 +155,10 @@ public class DevIotDatas extends BaseEntity
@Excel(name = "C相频率")
private String frequencyC;
+ /** 创建时间 */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
+ private Date createTime;
+
public void setId(Long id)
{
this.id = id;
@@ -466,6 +473,16 @@ public class DevIotDatas extends BaseEntity
this.projectName = projectName;
}
+ @Override
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ @Override
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotDatasController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotDatasController.java
index e9c5b389..4ae2aeda 100644
--- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotDatasController.java
+++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotDatasController.java
@@ -105,14 +105,15 @@ public class DevIotDatasController extends BaseController
* 查询配电箱数据统计
*/
@GetMapping("/findIotDatasMonitor/{proId}")
- public AjaxResult findProAllConfigPoint(@PathVariable("proId") Long proId, Integer date)
+ public AjaxResult findProAllConfigPoint(@PathVariable("proId") Long proId, Long pointId, Integer date)
{
// 获取当前日期
LocalDate today = LocalDate.now();
// 获取最近${X}天的日期
LocalDate todayAgo = today.minusDays(date);
DevIotDatas datasQuery = new DevIotDatas();
- datasQuery.setPointId(proId);
+ datasQuery.setPointId(pointId);
+ datasQuery.setProjectId(proId);
Map params = new HashMap<>();
params.put("beginCreateTime",today);
params.put("endCreateTime",todayAgo);
diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotWarningController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotWarningController.java
index 16ea66a1..bc938e57 100644
--- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotWarningController.java
+++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotWarningController.java
@@ -104,11 +104,12 @@ public class DevIotWarningController extends BaseController
* 查询配电箱预警数据
*/
@GetMapping("/findIotWarnings/{proId}")
- public AjaxResult findIotWarnings(@PathVariable("proId") Long proId)
+ public AjaxResult findIotWarnings(@PathVariable("proId") Long proId, Long pointId)
{
startPage(1,20);
DevIotWarning warningQuery = new DevIotWarning();
- warningQuery.setPointId(proId);
+ warningQuery.setPointId(pointId);
+ warningQuery.setProjectId(proId);
List list = devIotWarningService.selectDevIotWarningList(warningQuery);
return success(list);
}
diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotWarningServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotWarningServiceImpl.java
index 346887e9..6f05befb 100644
--- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotWarningServiceImpl.java
+++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotWarningServiceImpl.java
@@ -50,8 +50,10 @@ public class DevIotWarningServiceImpl implements IDevIotWarningService
@Override
public List selectDevIotWarningList(DevIotWarning devIotWarning)
{
- devIotWarning.setActiveComId(SecurityUtils.getLoginUser().getSysUser().getActiveComId());
- devIotWarning.setActiveProjectId(SecurityUtils.getLoginUser().getSysUser().getActiveProjectId());
+ if(devIotWarning.getProjectId()==null){
+ devIotWarning.setActiveComId(SecurityUtils.getLoginUser().getSysUser().getActiveComId());
+ devIotWarning.setActiveProjectId(SecurityUtils.getLoginUser().getSysUser().getActiveProjectId());
+ }
return devIotWarningMapper.selectDevIotWarningList(devIotWarning);
}