From 4132fb04e4a81702e5e3a6ba13185b9264cc151a Mon Sep 17 00:00:00 2001 From: jiminglei <836545853@qq.com> Date: Mon, 15 May 2023 15:04:05 +0800 Subject: [PATCH 1/3] 11 --- psdc-ui/src/views/emonitor/db/index.vue | 364 +++++++++++++------- psdc-ui/src/views/emonitor/xrgl/index.vue | 388 +++++++++++++--------- psdc-ui/src/views/system/cl/index.vue | 1 + 3 files changed, 464 insertions(+), 289 deletions(-) diff --git a/psdc-ui/src/views/emonitor/db/index.vue b/psdc-ui/src/views/emonitor/db/index.vue index 6f725b6..2e4395f 100644 --- a/psdc-ui/src/views/emonitor/db/index.vue +++ b/psdc-ui/src/views/emonitor/db/index.vue @@ -5,28 +5,28 @@ <div>pic</div> <div> <p>当前功率</p> - <h2>{{data.num}}kW</h2> + <h2>{{data.totp}}kW</h2> </div> </div> <div class="card"> <div>pic</div> <div> <p>日用电量</p> - <h2>11kWh</h2> + <h2>{{data.eday}}kWh</h2> </div> </div> <div class="card"> <div>pic</div> <div> <p>月用电量</p> - <h2>141kWh</h2> + <h2>{{data.emonth}}kWh</h2> </div> </div> <div class="card"> <div>pic</div> <div> <p>累计用电量</p> - <h2>1641kWh</h2> + <h2>{{data.totwh}}kWh</h2> </div> </div> </div> @@ -63,7 +63,109 @@ export default { name: "db", setup() { let data = reactive({ - num:666, + totp:'', + totwh:'', + eday:'', + emonth:'', + glData:[], + glXz:[ + "00:00", + "00:15", + "00:30", + "00:45", + "01:00", + "01:15", + "01:30", + "01:45", + "02:00", + "02:15", + "02:30", + "02:45", + "03:00", + "03:15", + "03:30", + "03:45", + "04:00", + "04:15", + "04:30", + "04:45", + "05:00", + "05:15", + "05:30", + "05:45", + "06:00", + "06:15", + "06:30", + "06:45", + "07:00", + "07:15", + "07:30", + "07:45", + "08:00", + "08:15", + "08:30", + "08:45", + "09:00", + "09:15", + "09:30", + "09:45", + "10:00", + "10:15", + "10:30", + "10:45", + "11:00", + "11:15", + "11:30", + "11:45", + "12:00", + "12:15", + "12:30", + "12:45", + "13:00", + "13:15", + "13:30", + "13:45", + "14:00", + "14:15", + "14:30", + "14:45", + "15:00", + "15:15", + "15:30", + "15:45", + "16:00", + "16:15", + "16:30", + "16:45", + "17:00", + "17:15", + "17:30", + "17:45", + "18:00", + "18:15", + "18:30", + "18:45", + "19:00", + "19:15", + "19:30", + "19:45", + "20:00", + "20:15", + "20:30", + "20:45", + "21:00", + "21:15", + "21:30", + "21:45", + "22:00", + "22:15", + "22:30", + "22:45", + "23:00", + "23:15", + "23:30", + "23:45" + ], fdlData:'', fdlXz:'', }) @@ -79,6 +181,136 @@ export default { onMounted(() => {//需要获取到element,所以是onMounted的Hook getData(13).then((res)=>{ console.log(res) + data.totp=res.data.totp + data.totwh=res.data.totwh + data.eday=res.data.eday + data.emonth=res.data.emonth + delete res.data.todayUsePowers.deviceId + delete res.data.todayUsePowers.samDate + delete res.data.todayUsePowers.userId + let arr = Object.values(res.data.todayUsePowers) + data.glData=arr + + + + let myChart1 = echarts.getInstanceByDom(document.getElementById("myEcharts1")); + if (myChart1){ + myChart1.dispose() + } + myChart1 = echarts.init(document.getElementById("myEcharts1")); + myChart1.setOption({ + series: [ + { + type: 'gauge', + axisLine: { + lineStyle: { + width: 10, + color: [ + [0.3, '#67e0e3'], + [0.7, '#37a2da'], + [1, '#fd666d'] + ] + } + }, + pointer: { + itemStyle: { + color: 'inherit' + } + }, + // axisTick: { + // distance: -30, + // length: 8, + // lineStyle: { + // color: '#fff', + // width: 2 + // } + // }, + // splitLine: { + // distance: -30, + // length: 30, + // lineStyle: { + // color: '#fff', + // width: 4 + // } + // }, + axisLabel: { + color: 'inherit', + distance: 10, + fontSize: 10 + }, + detail: { + valueAnimation: true, + formatter: '{value} kW', + color: 'inherit' + }, + data: [ + { + value: data.totp + } + ] + } + ] + }); + window.onresize = function () {//自适应大小 + myChart1.resize(); + }; + + + + + let myChart2 = echarts.getInstanceByDom(document.getElementById("myEcharts2")); + if (myChart2){ + myChart2.dispose() + } + myChart2 = echarts.init(document.getElementById("myEcharts2")); + myChart2.setOption({ + title: {}, + tooltip: {}, + textStyle:{ + color:'#BEC3DA' + }, + xAxis: { + data:data.glXz, + axisLine:{ + lineStyle:{ + color:'#BEC3DA', + type:'dashed' + } + } + }, + yAxis: { + type: 'value', + name: "kW", + splitLine:{ + show:true, + lineStyle:{ + type:'dashed', + color:'#BEC3DA' + } + }, + axisLine: { + show: true, + lineStyle:{ + type:'dashed', + color:'#BEC3DA' + } + }, + }, + series: [ + { + name: "当前功率", + type: "line", + data: data.glData, + itemStyle:{ + color:'#2F8EE0' + }, + }, + ], + }); + window.onresize = function () {//自适应大小 + myChart2.resize(); + }; + }) getZdb(13).then((res)=>{ console.log(res) @@ -133,7 +365,7 @@ export default { { name: "今日用电量", type: "bar", - data: [data.fdlData], + data: data.fdlData, itemStyle:{ color:'#2F8EE0' }, @@ -145,126 +377,6 @@ export default { }; }) - - - let myChart1 = echarts.getInstanceByDom(document.getElementById("myEcharts1")); - if (myChart1){ - myChart1.dispose() - } - myChart1 = echarts.init(document.getElementById("myEcharts1")); - myChart1.setOption({ - series: [ - { - type: 'gauge', - axisLine: { - lineStyle: { - width: 10, - color: [ - [0.3, '#67e0e3'], - [0.7, '#37a2da'], - [1, '#fd666d'] - ] - } - }, - pointer: { - itemStyle: { - color: 'inherit' - } - }, - // axisTick: { - // distance: -30, - // length: 8, - // lineStyle: { - // color: '#fff', - // width: 2 - // } - // }, - // splitLine: { - // distance: -30, - // length: 30, - // lineStyle: { - // color: '#fff', - // width: 4 - // } - // }, - axisLabel: { - color: 'inherit', - distance: 10, - fontSize: 10 - }, - detail: { - valueAnimation: true, - formatter: '{value} kW', - color: 'inherit' - }, - data: [ - { - value: 70 - } - ] - } - ] - }); - window.onresize = function () {//自适应大小 - myChart1.resize(); - }; - - - let myChart2 = echarts.getInstanceByDom(document.getElementById("myEcharts2")); - if (myChart2){ - myChart2.dispose() - } - myChart2 = echarts.init(document.getElementById("myEcharts2")); - myChart2.setOption({ - title: {}, - tooltip: {}, - textStyle:{ - color:'#BEC3DA' - }, - xAxis: { - data: ["12-3", "12-4", "12-5", "12-6", "12-7", "12-8"], - axisLine:{ - lineStyle:{ - color:'#BEC3DA', - type:'dashed' - } - } - }, - yAxis: { - type: 'value', - name: "kW", - splitLine:{ - show:true, - lineStyle:{ - type:'dashed', - color:'#BEC3DA' - } - }, - axisLine: { - show: true, - lineStyle:{ - type:'dashed', - color:'#BEC3DA' - } - }, - }, - series: [ - { - name: "当前功率", - type: "line", - data: [5, 20, 36, 10, 10, 20], - itemStyle:{ - color:'#2F8EE0' - }, - }, - ], - }); - window.onresize = function () {//自适应大小 - myChart2.resize(); - }; - - - }) return { data diff --git a/psdc-ui/src/views/emonitor/xrgl/index.vue b/psdc-ui/src/views/emonitor/xrgl/index.vue index 8d77249..5f73a26 100644 --- a/psdc-ui/src/views/emonitor/xrgl/index.vue +++ b/psdc-ui/src/views/emonitor/xrgl/index.vue @@ -179,6 +179,44 @@ export default { "23:30", "23:45" ], + dayData:[], + dayXz:[], + emonthData:[], + emonthXz:[ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31], + temIn:'', + temOut:'', + time:'', }) @@ -197,6 +235,7 @@ export default { //gl delete res.data.todayUsePowers.deviceId delete res.data.todayUsePowers.samDate + delete res.data.todayUsePowers.userId let arr = Object.values(res.data.todayUsePowers) data.glData=arr let myChart3 = echarts.getInstanceByDom(document.getElementById("myEcharts3")); @@ -254,188 +293,211 @@ export default { }) getXcgl(2).then((res)=>{ console.log(res) - }) - - - - let myChart = echarts.getInstanceByDom(document.getElementById("myEcharts")); - if (myChart){ - myChart.dispose() - } - myChart = echarts.init(document.getElementById("myEcharts")); - - let myChart2 = echarts.getInstanceByDom(document.getElementById("myEcharts2")); - if (myChart2){ - myChart2.dispose() - } - myChart2 = echarts.init(document.getElementById("myEcharts2")); - - - - let myChart4 = echarts.getInstanceByDom(document.getElementById("myEcharts4")); - if (myChart4){ - myChart4.dispose() - } - myChart4 = echarts.init(document.getElementById("myEcharts4")); - // 绘制图表 - myChart.setOption({ - title: {}, - tooltip: {}, - textStyle:{ - color:'#BEC3DA' - }, - xAxis: { - data: ["12-3", "12-4", "12-5", "12-6", "12-7", "12-8"], - axisLine:{ - lineStyle:{ - color:'#BEC3DA', - type:'dashed' - } - } - }, - yAxis: { - type: 'value', - name: "kWh", - splitLine:{ - show:true, - lineStyle:{ - type:'dashed', - color:'#BEC3DA' - } + //日用电量 + let arr = [] + let brr = [] + for(let i in res.xrglqhour){ + arr.push(res.xrglqhour[i].useElectric) + brr.push(res.xrglqhour[i].hour) + } + data.dayData=arr + data.dayXz=brr + let myChart = echarts.getInstanceByDom(document.getElementById("myEcharts")); + if (myChart){ + myChart.dispose() + } + myChart = echarts.init(document.getElementById("myEcharts")); + myChart.setOption({ + title: {}, + tooltip: {}, + textStyle:{ + color:'#BEC3DA' }, - axisLine: { - show: true, - lineStyle:{ - type:'dashed', - color:'#BEC3DA' + xAxis: { + data: data.dayXz, + axisLine:{ + lineStyle:{ + color:'#BEC3DA', + type:'dashed' + } } }, - }, - series: [ - { - name: "日用电量", - type: "bar", - data: [5, 20, 36, 10, 10, 20], - itemStyle:{ - color:'#2F8EE0' + yAxis: { + type: 'value', + name: "kWh", + splitLine:{ + show:true, + lineStyle:{ + type:'dashed', + color:'#BEC3DA' + } + }, + axisLine: { + show: true, + lineStyle:{ + type:'dashed', + color:'#BEC3DA' + } }, }, - ], - }); - window.onresize = function () {//自适应大小 - myChart.resize(); - }; - myChart2.setOption({ - title: {}, - tooltip: {}, - textStyle:{ - color:'#BEC3DA' - }, - xAxis: { - data: ["12-3", "12-4", "12-5", "12-6", "12-7", "12-8"], - axisLine:{ - lineStyle:{ - color:'#BEC3DA', - type:'dashed' - } - } - }, - yAxis: { - type: 'value', - name: "kWh", - splitLine:{ - show:true, - lineStyle:{ - type:'dashed', - color:'#BEC3DA' - } + series: [ + { + name: "日用电量", + type: "bar", + data: data.dayData, + itemStyle:{ + color:'#2F8EE0' + }, + }, + ], + }); + window.onresize = function () {//自适应大小 + myChart.resize(); + }; + + //月用电量 + let crr = [] + for(let i in res.xrglqday){ + crr.push(res.xrglqday[i].useElectric) + } + data.emonthData=crr + let myChart2 = echarts.getInstanceByDom(document.getElementById("myEcharts2")); + if (myChart2){ + myChart2.dispose() + } + myChart2 = echarts.init(document.getElementById("myEcharts2")); + + myChart2.setOption({ + title: {}, + tooltip: {}, + textStyle:{ + color:'#BEC3DA' }, - axisLine: { - show: true, - lineStyle:{ - type:'dashed', - color:'#BEC3DA' + xAxis: { + data: data.emonthXz, + axisLine:{ + lineStyle:{ + color:'#BEC3DA', + type:'dashed' + } } }, - }, - series: [ - { - name: "月用电量", - type: "bar", - data: [5, 20, 36, 10, 10, 20], - itemStyle:{ - color:'#2F8EE0' + yAxis: { + type: 'value', + name: "kWh", + splitLine:{ + show:true, + lineStyle:{ + type:'dashed', + color:'#BEC3DA' + } + }, + axisLine: { + show: true, + lineStyle:{ + type:'dashed', + color:'#BEC3DA' + } }, }, - ], - }); - window.onresize = function () {//自适应大小 - myChart2.resize(); - }; + series: [ + { + name: "月用电量", + type: "bar", + data: data.emonthData, + itemStyle:{ + color:'#2F8EE0' + }, + }, + ], + }); + window.onresize = function () {//自适应大小 + myChart2.resize(); + }; - myChart4.setOption({ - title: {}, - tooltip: {}, - legend: { - data: ['进水', '出水'], - textStyle:{ - color:'#BEC3DA' - } - }, - textStyle:{ - color:'#BEC3DA' - }, - xAxis: { - data: ["12-3", "12-4", "12-5", "12-6", "12-7", "12-8"], - axisLine:{ - lineStyle:{ - color:'#BEC3DA', - type:'dashed' - } - } - }, - yAxis: { - type: 'value', - name: "℃", - splitLine:{ - show:true, - lineStyle:{ - type:'dashed', + //进出水温度 + data.time=res.times + data.temIn=res.tempIn + data.temOut=res.tempOut + + let myChart4 = echarts.getInstanceByDom(document.getElementById("myEcharts4")); + if (myChart4){ + myChart4.dispose() + } + myChart4 = echarts.init(document.getElementById("myEcharts4")); + myChart4.setOption({ + title: {}, + tooltip: {}, + legend: { + data: ['进水', '出水'], + textStyle:{ color:'#BEC3DA' } }, - axisLine: { - show: true, - lineStyle:{ - type:'dashed', - color:'#BEC3DA' + textStyle:{ + color:'#BEC3DA' + }, + xAxis: { + data: data.time, + axisLine:{ + lineStyle:{ + color:'#BEC3DA', + type:'dashed' + } } }, - }, - series: [ - { - name: '进水', - type: 'line', - stack: 'Total', - itemStyle:{ - color:'#2F8EE0' + yAxis: { + type: 'value', + name: "℃", + splitLine:{ + show:true, + lineStyle:{ + type:'dashed', + color:'#BEC3DA' + } }, - data: [120, 132, 101, 134, 90, 230, 210] - }, - { - name: '出水', - type: 'line', - stack: 'Total', - itemStyle:{ - color:'#2F8EE0' + axisLine: { + show: true, + lineStyle:{ + type:'dashed', + color:'#BEC3DA' + } }, - data: [220, 182, 191, 234, 290, 330, 310] }, - ], - }); - window.onresize = function () {//自适应大小 - myChart4.resize(); - }; + series: [ + { + name: '进水', + type: 'line', + stack: 'Total', + itemStyle:{ + color:'#2F8EE0' + }, + data: data.temIn + }, + { + name: '出水', + type: 'line', + stack: 'Total', + itemStyle:{ + color:'#2F8EE0' + }, + data: data.temOut + }, + ], + }); + window.onresize = function () {//自适应大小 + myChart4.resize(); + }; + }) + + + + + + + + + }); return{ data diff --git a/psdc-ui/src/views/system/cl/index.vue b/psdc-ui/src/views/system/cl/index.vue index cbd4503..793e744 100644 --- a/psdc-ui/src/views/system/cl/index.vue +++ b/psdc-ui/src/views/system/cl/index.vue @@ -10,6 +10,7 @@ </el-select> </el-form-item> <el-form-item> + <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> <el-button icon="Refresh" @click="resetQuery">重置</el-button> </el-form-item> From a71bbd82e9c99ddbf5cf5af36724b53e6801c3bc Mon Sep 17 00:00:00 2001 From: wj <347312259@qq.com> Date: Mon, 15 May 2023 15:06:41 +0800 Subject: [PATCH 2/3] 11 --- psdc-ui/src/api/control/manual.js | 4 + psdc-ui/src/api/control/timer.js | 6 + psdc-ui/src/assets/images/功率.png | Bin 0 -> 1979 bytes psdc-ui/src/assets/images/温度.png | Bin 0 -> 1829 bytes psdc-ui/src/assets/images/温度传感器.png | Bin 0 -> 1971 bytes psdc-ui/src/assets/images/用电量.png | Bin 0 -> 1667 bytes psdc-ui/src/views/control/manual/index.vue | 76 ++++++++++++- psdc-ui/src/views/control/timer/index.vue | 103 ++++++++++++++---- 8 files changed, 165 insertions(+), 24 deletions(-) create mode 100644 psdc-ui/src/assets/images/功率.png create mode 100644 psdc-ui/src/assets/images/温度.png create mode 100644 psdc-ui/src/assets/images/温度传感器.png create mode 100644 psdc-ui/src/assets/images/用电量.png diff --git a/psdc-ui/src/api/control/manual.js b/psdc-ui/src/api/control/manual.js index 6ee57e7..b754ed7 100644 --- a/psdc-ui/src/api/control/manual.js +++ b/psdc-ui/src/api/control/manual.js @@ -7,4 +7,8 @@ export function getDevice() { /** 获取调控日志列表*/ export function getControlLogList(data) { return request.post('/control/manual/controlLogList',data) +} +/** 获取策略列表*/ +export function getStrategyList(data) { + return request.get('/control/manual/strategyList',data) } \ No newline at end of file diff --git a/psdc-ui/src/api/control/timer.js b/psdc-ui/src/api/control/timer.js index e69de29..8ecf3d2 100644 --- a/psdc-ui/src/api/control/timer.js +++ b/psdc-ui/src/api/control/timer.js @@ -0,0 +1,6 @@ +import request from '@/utils/request' + +/** 获取定时控制列表*/ +export function getList(data) { + return request.post('/control/timer/list',data) +} \ No newline at end of file diff --git a/psdc-ui/src/assets/images/功率.png b/psdc-ui/src/assets/images/功率.png new file mode 100644 index 0000000000000000000000000000000000000000..ef520cfa7cd55ade92a1e242abcdb74b3b434854 GIT binary patch literal 1979 zcmV;s2SoUZP)<h;3K|Lk000e1NJLTq002P%002P<1^@s6j`zt$00009a7bBm000XU z000XU0RWnu7ytkVZAnByRCt{2Tia6`*BS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MJAM)AAAr-&=eF(|53S<S_9 z$=`?h^(Tsgkc0X4C-}(Uhe$52m`ia*YqF5SC4V0Vx4bbtZw!XLxa9An${FkhRnlt( zk;g#rIwq3S=&3ymhYEE>#ju)-qd#~ZzC=J(UR869zC-|z*XHns{RqxDPbezp+=^H} ziJL1!xVJh&oN}ju>WS98P{6J5Fz!SiqRrZj4qNMgEbA=>K@>5WoW^j}htc@d|5jP= z26&N&H|B#k=7WLd&}gbdqsa|dnRBzidm{s#6>^&e-l6mg0;vTAQj1jAVI|m?D)$VZ z#dsosah2z?S}6U$14<$QD2V`|Bm#hv2mneV04Rw7pd<o-k_Z5Re*#>An{D^G5aIv; N002ovPDHLkV1o5&rm+A3 literal 0 HcmV?d00001 diff --git a/psdc-ui/src/assets/images/温度.png b/psdc-ui/src/assets/images/温度.png new file mode 100644 index 0000000000000000000000000000000000000000..90ce78ddac4bcc88c095ad9ca134e8379c288b5e GIT binary patch literal 1829 zcmV+=2io|FP)<h;3K|Lk000e1NJLTq002P%002P<1^@s6j`zt$00009a7bBm000XU z000XU0RWnu7ytkU*GWV{RCt{2n}2LpR~g4Y=id9awB5?s3YH8el@jPEjh#~LVwdP9 z5GKr+C~CG;?P4%l;$JcoG!x@y&`e`uGFdVltQwPPVhY1xSR7Q=0E0sLQAj&G1-C+J zyCS3Q``&Yof1I~nUpm}9=ia`U_<sLtbI*C6Z@#_vInVQ)r($g5_cZ_K@NPAM{{<98 zpdbQJ5CJHN02D+33L*dn5daAC;-#b*uciub*&@V8=OgCMf!j(D#YF(<@ibf;MGp+4 z|M3p$+*_#bJ{TR(3q3Jo8Drq%HPqra)#KGI0pIealM2<<gKY0a9XSo5oDrHZ6K_H) zz<;m-f5QWaJ7>Gw@jblyrFivA(L*E1wu8u5k3c3&j%yZ)z6svPmlAw^J)-iiq)g^O z_YV@jxEpoie4=)f5g`>2Jh~2lO=AL-J{)pi2Vv{p#NLY7pMxkbBiP)GSG_O^K9S(B zX+$huK={+0=&SF=wioM&6m#d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` zeesfUTDJs%%riSsN6&!Hy$RGqBW7P|iIYFs-f6WyvIy$vnMrcC@IJKy0Qs5;biorF z5fyi!2S>;}+d6H%e7(!;bLe5{p%HVHZ^JM0%1|PAx7%_uPFCIvm}E)rJ%lJPqv%&p z;(vA}UhQI-(n(UC=TWbp1aNAa%H8eOvkX?<X1V_`y5Bx$5Oe1cd~GcN;jTT%wgUhJ z-})k{?>|0SS;_;)$!vSk5NoVMSYGhx{wv7+hwb^<Ud?+emXO-=O>0L0;d3t|517~@ z%FFORQ3GWqaD5Eb)q}qBZY&>}r+4Jx@&!<*dXRtVz+Y{D3l)6(ONgqwk$-v({qDbW zE?@vCn}xr+kznI$Yuj>Phm!!{SVe}rUO{|pfzy4YzxMvbyGp9}0^v)qIPZ76l@2B0 zv#sxUif<wGr9r}<x5gUma-L7n!&k}t_ywmxnG|&YAepCMKo4DwWhd68iXIpy^VIg7 zK0&^qdoPfA>euMY!?A6}o@mu0*GO-D9=We0Hkqi9`#MN(eI7k>EfIUkwAV5r;cwbd zC(aXm<B{nNlZ2oLh6#7HMZQmnisUC+i&AEobA40%3*0R9&<JvOyBX%pHfoc^%#QW0 zs>T1b<5;g!sFOX&zjdMx&+J(5%!x1+69e8gRfu~kvjg6xh>5HCu{2z}ZU(&n*^lb( z%j<x5ep>FM<EZ23P{)(~mXku^{~aiZ02D+33L*dn5rBdSKtTkcAOcVj0f7GikBwh! TvFEVl00000NkvXXu0mjf;_8p< literal 0 HcmV?d00001 diff --git a/psdc-ui/src/assets/images/温度传感器.png b/psdc-ui/src/assets/images/温度传感器.png new file mode 100644 index 0000000000000000000000000000000000000000..051a33941e88ec0f0562e81a263e1080073378f7 GIT binary patch literal 1971 zcmV;k2Tb^hP)<h;3K|Lk000e1NJLTq002P%002P<1^@s6j`zt$00009a7bBm000XU z000XU0RWnu7ytkVWl2OqRCt{2n|o|jRUXGbbLY-<rY(KY2hvh%L1=kYgo2o*SxwxH zteaK;K%*>1v&kAZ5SPSV-F4R}@r5yQ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vK#%E;EkmG3xTLVL%Y3pvHV6m* z5HEmS3<SEN>5uU;zDcB3u?Y6Uf#1PMTS{h3VWbWA-vfa!Q#O@)*(NkBLUip+*_1N6 zc1oWU<+>D+hAn&>Qky0dA=oR^pyHy6D$=l-)A`M2&NUWq=G+0EcYgqzIVVHYp`;#W zUTbn&Zxn_OK+i|e-|z$5)_Xqa*-{oOsFiIwu2KnnCQA9?0E~}(v%&kM)B?OMhSK3w zaA8FFo+I=B4rD|CG9myO5rB*cKt=>0BLa{S0mz5|z}M>;P#HUf)mQ)k002ovPDHLk FV1hF*qS*id literal 0 HcmV?d00001 diff --git a/psdc-ui/src/assets/images/用电量.png b/psdc-ui/src/assets/images/用电量.png new file mode 100644 index 0000000000000000000000000000000000000000..832f09769a853c6d1f764bc614e9284a51cbc5ef GIT binary patch literal 1667 zcmV-}27LL6P)<h;3K|Lk000e1NJLTq002P%002P<1^@s6j`zt$00009a7bBm000XU z000XU0RWnu7ytkUHAzH4RCt{2TU%&UR}@`$?z}UT$xIq=Ow_3oDT+yawO9~aW5JIa zu*4)%idfM;K>DH5qU}dPuoS8v(g#t5;8%RxnnGJNr8a0pQ&S&J#XvIV(V4tvCYfjE z&YgaYBV(M$Ip^Nk+TQh-nRD;ntT}t_efHVmst@%g@IQy<pLXEi0F?x&BmhuJ0HBfp zKqUcyN&*0t1OR~cX&5QcYp`OD0n5sacwv?fv#na#j2f79$=@Ixli-g?_-j(cz2O*c z4n@#85JhlGdK&J5o2iOX$8%U$VaA3<1$fzM0#CW;;u3Jx6-H}!5SMyFh{b2FuvMG{ zJ<p-8(t@oo+8|hXMc(NN#L;}+kF$3Ih>FUSp(qKfpEu#7wGPZJnwco;_lfxY=W(?6 zg%y3TA|&W}4!hRav3aRg37_(!rE3z0E_*ShP>9IR4t5idV-3PnBLDz4FSX)Wg8;ip znQ)UuLRp~}&5Z&oOAU%R10=UR2`WnsXl@ixRwzI8m`Sjkcr?`saN2dUok-!6A4c)r z9|7X^PP-0Gb@F!v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9tjmScy z21hs1SA>~xplyulx}N#~)!~ZZ#P5^ThSHH<$Q-LLrRoP}Lrd2ra|UCw{>3j|+;)@a z;puQsCU?UA^~G5Docw0WZFdw0FMFAvXCfgMPhi)D5#m{b>FD=~SUuk)t0GK)*X|1= zvIe`D_u)t&j(5*^sD-k<FN`In27I}37OUw;==X_u@2m&IGE=v#U>uqd@%9Nf?ofn= z&8We_+7dZt0RVU0QEWZoCTiW~gKR|_3&pYRqz5fsWMWxaYLI=M*U~kKZ6`fht4>-d zJHj{LguQDWD7Veb2;b0zh|k)_@oS!5BrOyl<}_$IY^t<i%SvU3Igj7)<Mi!kV3;!< zI-bL86=uB7IMypAfGd4reBT|!#b<4-Hxp6=-Yd$DSXh!A@GdfGV178@9g0ctg_8r` z_eWyr9Q=<Act1-}|K9;B2>?_Q0H`DYP)Puwk^n#@0f0&Z0F?v)z~9Tp8Xf*$xd#9M N002ovPDHLkV1hvo4~+l- literal 0 HcmV?d00001 diff --git a/psdc-ui/src/views/control/manual/index.vue b/psdc-ui/src/views/control/manual/index.vue index 9e72f2a..9790278 100644 --- a/psdc-ui/src/views/control/manual/index.vue +++ b/psdc-ui/src/views/control/manual/index.vue @@ -16,6 +16,7 @@ <el-form-item label="当前状态:"><span :class="{'green':item.deviceRunstatus === '开启','red':item.deviceRunstatus === '关闭'}">{{ item.deviceRunstatus }}</span></el-form-item> <el-form-item label="进水温度:"><el-input v-model="form1.enter" /></el-form-item> <el-form-item label="出水温度:"><el-input v-model="form1.leave" /></el-form-item> +<!-- <el-form-item label="当前温度:"><el-input v-model="form1.now" /></el-form-item>--> <div class="submit" @click="onSubmit1">确定</div> </el-form> </div> @@ -151,8 +152,18 @@ <el-drawer v-model="drawerIshow"> <template #header><h4>策略导入</h4></template> <template #default> - <el-radio v-model="radio" label="策略1" size="large">策略1</el-radio> - <el-radio v-model="radio" label="策略2" size="large">策略2</el-radio> + <el-radio v-for="(item,index) in celueList" :key="index" class="celueBox" v-model="radio" :label="item.sceneName" size="large"> + <span style="font-weight: bold; display: inline-block; margin-bottom: 20px;">{{ item.sceneName }}</span> + <div class="celueItem" v-for="items in item.data" :key="items.device_id"> + <span>{{ items.device_name }}</span> + <div class="itemsValue"> + <span class="txtInput" v-for="itemsValue in items.value" :key="itemsValue.sceneKey"> + <span class="txt">{{ itemsValue.sceneContext }}:</span> + <input type="text" :value="itemsValue.sceneValue" disabled/> + </span> + </div> + </div> + </el-radio> </template> <template #footer> <div style="flex: auto"> @@ -167,15 +178,19 @@ import { Download } from '@element-plus/icons-vue' //element字体图标 import { ref,reactive,onMounted } from 'vue' import { ElMessageBox } from 'element-plus' -import { getDevice,getControlLogList } from '@/api/control/manual' +import { getDevice,getControlLogList,getStrategyList } from '@/api/control/manual' onMounted(()=>{ getDeviceFun(); getControlLogListFun(); + getStrategyListFun() }) /** 获取所有设备*/ const deviceArr = ref([]) +const isShow1 = ref(true) +const isShow2 = ref(true) +const isShow3 = ref(true) function getDeviceFun(){ getDevice().then((res)=>{ console.log(res.data) @@ -201,6 +216,7 @@ const value7 = ref(false) const form1 = reactive({ enter:'', leave:'', + now:'' }) const form2 = reactive({ enter:'', @@ -254,10 +270,18 @@ function getControlLogListFun(){ /** 策略导入处理*/ const drawerIshow = ref(false) const radio = ref() +const celueList = ref([]) +function getStrategyListFun(){ + getStrategyList().then((res)=>{ + celueList.value = res.data + console.log(res.data) + }) +} function confirmClick() { ElMessageBox.confirm(`确定执行 ${radio.value} ?`).then(() => { drawerIshow.value = false; - }) + console.log('确定') + }) } @@ -363,6 +387,43 @@ function confirmClick() { } } +.celueBox{ + width: 100%; + height: auto; + padding: 10px; + margin-bottom: 12px; + border: 1px solid #ddd; + &:hover{ + border: 1px solid #409EFF; + } + .celueItem{ + display: flex; + justify-content: space-between; + flex-wrap: nowrap; + padding: 10px 0; + border-bottom: 1px solid #dddddd50; + .itemsValue{ + display: flex; + justify-content: flex-start; + flex-wrap: nowrap; + width: 80%; + .txtInput{ + margin-right: 10px; + .txt{ + display: inline-block; + width: 80px; + text-align: right; + } + input{ + padding: 3px 3px; + width: 100px; + border: 1px solid #ddd; + } + } + } + } +} + ::v-deep .el-button{ border-radius: 2px; margin-bottom: 12px; @@ -396,5 +457,12 @@ function confirmClick() { ::v-deep .el-table--fit{ background-color: #2D3D88; } +::v-deep .el-radio{ + display: inline-block; +} +::v-deep .el-drawer__body{ + overflow-x: hidden; + overflow-y: auto; +} </style> diff --git a/psdc-ui/src/views/control/timer/index.vue b/psdc-ui/src/views/control/timer/index.vue index 916a378..c044c49 100644 --- a/psdc-ui/src/views/control/timer/index.vue +++ b/psdc-ui/src/views/control/timer/index.vue @@ -16,7 +16,14 @@ </el-select> </el-form-item> <el-form-item label="有效日期" style="width: 308px;"> - <el-date-picker v-model="dateRange" value-format="YYYY-MM-DD" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker> + <el-date-picker v-model="dateRange" + value-format="YYYY-MM-DD" + type="daterange" + range-separator="-" + start-placeholder="开始日期" + end-placeholder="结束日期" + @click="seletDate" + ></el-date-picker> </el-form-item> <el-form-item> <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> @@ -31,8 +38,8 @@ <div class="dev_control_table"> <el-table :data="timingList" height="500px"> <el-table-column label="序号" align="center" width="50"/> - <el-table-column label="指令内容" align="center" prop="content" width="700"/> - <el-table-column label="执行时间" align="center" prop="time"/> + <el-table-column label="指令内容" align="center" prop="controlValue" width="700"/> + <el-table-column label="执行时间" align="center" prop="createTime"/> <el-table-column label="有效日期" align="center" prop="dateRange"/> <el-table-column label="有效星期" align="center" prop="week"/> <el-table-column label="操作" align="center" prop="handle"> @@ -49,7 +56,7 @@ :disabled="disabled" :background="background" layout="total, sizes, prev, pager, next, jumper" - :total="timingList.length" + :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange"/> </div> @@ -107,46 +114,93 @@ <script setup name="Index"> import {Delete} from '@element-plus/icons-vue' -import {ref,reactive,watch} from "vue"; +import {ref,reactive,watch,onMounted} from "vue"; +import { getList } from '@/api/control/timer' + + +/** 页面加载时*/ +onMounted(()=>{ + formattedDateFun() + getListFun() +}) + + +/** 格式化日期*/ +const YYYYMMDD = ref(); +const timer = ref() +function formattedDateFun(){ + let date = new Date() + let year = date.getFullYear() + let month = (date.getMonth()+1).toString().padStart(2, '0'); + let day = date.getDate().toString().padStart(2, '0'); + let hours = date.getHours() + let minutes = date.getMinutes() + let seconds = date.getSeconds() + YYYYMMDD.value = `${year}-${month}-${day}` + timer.value = `${hours}:${minutes}:${seconds}` + console.log(YYYYMMDD.value) + console.log(timer.value) +} + /** 筛选处理 */ +//选择的日期 const dateRange = ref([]); +const startDate = ref() +const endDate = ref() +const wacthSelectDate = watch(()=> dateRange.value,(val) =>{ + console.log(val[0]) + startDate.value = val[0] + console.log(val[1]) + endDate.value = val[1] +}) const data = reactive({ queryParams: { week: '', time: '', } }); +//选择日期 +function seletDate(){ + console.log('选择的日期',dateRange.value) +} //搜索按钮 function handleQuery(){ + getListFun() } //重置按钮 function resetQuery(){ - dateRange.value = [] + dateRange.value = []; + getListFun() } /** 数据表格处理 */ -const timingList = reactive([ - { - content:'11', - time:'22', - dateRange:'44', - week:'55', - }, - { - content:'11', - time:'22', - dateRange:'44', - week:'55', - } -]) +const timingList = ref([]) const currentPage = ref(1) const pageSize = ref(5) +const total = ref() const small = ref(false) const background = ref(false) const disabled = ref(false) + +function getListFun(){ + getList({ + "timerId":null, + "deviceId":null, + "controlContext":null, + "timerStatus":null, + "createStart":startDate.value, + "createEnd": endDate.value, + "pageNum": currentPage.value, + "pageSize": pageSize.value + }).then((res)=>{ + total.value = res.total + timingList.value = res.rows + }) +} + const handleSizeChange = (val) => { console.log(`${val}`) } @@ -236,5 +290,14 @@ const { queryParams } = toRefs(data); ::v-deep .el-form-item__content{ //display: flex; } +::v-deep .el-input__inner{ + color: #f3ffff; +} +::v-deep .el-date-editor .el-range-input{ + color: #f3ffff; +} +::v-deep .el-scrollbar__wrap.el-scrollbar__wrap--hidden-default{ + background-color: rgba(47,61,138); +} </style> From 23069ec5183fa3d2b12d2c2391b2a9f76093f626 Mon Sep 17 00:00:00 2001 From: XMnhwj_BackTechnologyDevelopment <3512363680@qq.com> Date: Mon, 15 May 2023 16:46:26 +0800 Subject: [PATCH 3/3] =?UTF-8?q?2023-05-15=2016:46:15=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=AE=8C=E5=96=84=E9=A6=96=E9=A1=B5=E5=A4=A7=E5=B1=8F=E3=80=81?= =?UTF-8?q?=E8=83=BD=E6=BA=90=E7=9B=91=E6=B5=8B=E7=9A=84=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/psdc/entity/PsdcDevice.java | 9 --- .../psdc/entity/res/PsdcDeviceInfoRes.java | 73 +++++++++++++++++++ .../com/psdc/mapper/PsdcDeviceMapper.java | 3 +- .../com/psdc/service/IPsdcDeviceService.java | 3 +- .../IPsdcThermometerHtdataService.java | 2 +- .../service/impl/PsdcDeviceServiceImpl.java | 35 +++++++-- .../PsdcThermometerHtdataServiceImpl.java | 67 ++++++----------- .../mapper/business/PsdcDeviceMapper.xml | 47 +++++++++--- .../manager/PsdcDeviceController.java | 15 ++-- .../controller/monitor/WenDuController.java | 9 +-- 10 files changed, 174 insertions(+), 89 deletions(-) create mode 100644 psdc-business/src/main/java/com/psdc/entity/res/PsdcDeviceInfoRes.java diff --git a/psdc-business/src/main/java/com/psdc/entity/PsdcDevice.java b/psdc-business/src/main/java/com/psdc/entity/PsdcDevice.java index 7b97ddf..cfa55f7 100644 --- a/psdc-business/src/main/java/com/psdc/entity/PsdcDevice.java +++ b/psdc-business/src/main/java/com/psdc/entity/PsdcDevice.java @@ -32,9 +32,6 @@ public class PsdcDevice { /** 设备类型:1-监测设备,2-运行设备 */ private Integer deviceType ; - /** 设备类型:1-监测设备,2-运行设备 */ - @Excel(name = "设备类型") - private String devType ; /** 设备名称 */ @Excel(name = "设备名称") private String deviceName ; @@ -58,9 +55,6 @@ public class PsdcDevice { /** 设备状态:1-未激活,2-禁用,3-在线,4-离线 */ private Integer deviceStatus ; - /** 设备状态:1-未激活,2-禁用,3-在线,4-离线 */ - @Excel(name = "设备状态") - private String devStatus ; /** 图片地址 */ private String photoUrl ; /** 创建者 */ @@ -74,9 +68,6 @@ public class PsdcDevice { /** 设备运行状态:1-开启,2-关闭 */ private Integer deviceRunstatus ; - /** 设备运行状态:1-开启,2-关闭 */ - @Excel(name = "设备运行状态") - private String devRunstatus ; } diff --git a/psdc-business/src/main/java/com/psdc/entity/res/PsdcDeviceInfoRes.java b/psdc-business/src/main/java/com/psdc/entity/res/PsdcDeviceInfoRes.java new file mode 100644 index 0000000..f4be2eb --- /dev/null +++ b/psdc-business/src/main/java/com/psdc/entity/res/PsdcDeviceInfoRes.java @@ -0,0 +1,73 @@ +package com.psdc.entity.res; + +import com.psdc.annotation.Excel; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @Author:戴仕崑 + * @Project:psdc + * @Filename:PsdcDeviceInfoRes + * @Date:2023/5/15 15:24 + * @Version 1.0 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class PsdcDeviceInfoRes { + + /** 设备id */ + @Excel(name = "设备Id", cellType = Excel.ColumnType.NUMERIC) + private Integer deviceId ; + /** 设备模型 */ + @Excel(name = "设备模型") + private String deviceModel; + /** 安装地址 */ + @Excel(name = "安装地址") + private String deviceAddress ; + /** 用户id */ + private Integer userId ; + /** 用户名称 */ + @Excel(name = "用户名称") + private String userName ; + + /** 父设备Id */ + private Integer parentId; + /** 设备名称 */ + @Excel(name = "设备名称") + private String deviceName ; + /** 设备sn */ + @Excel(name = "设备Sn") + private String deviceSn ; + /** 启用时间 */ + @Excel(name = "启用时间") + private String startTime ; + /** 当前功率 */ + @Excel(name = "当前功率") + private Double totp; + /** 当前温度 */ + @Excel(name = "当前温度") + private Double temp; + /** 目前实时进水温度 */ + @Excel(name = "进水温度") + private Double tempIn; + /** 目前实时出水温度 */ + @Excel(name = "出水温度") + private Double tempOut; + /** 当前总有功电能 */ + @Excel(name = "总用电量") + private Double totWh; + + /** 设备状态:1-未激活,2-禁用,3-在线,4-离线 */ + private Integer deviceStatus ; + /** 设备状态:1-未激活,2-禁用,3-在线,4-离线 */ + @Excel(name = "设备状态") + private String devStatus ; + /** 设备运行状态:1-开启,2-关闭 */ + private Integer deviceRunstatus ; + /** 设备运行状态:1-开启,2-关闭 */ + @Excel(name = "设备运行状态") + private String devRunstatus ; + +} diff --git a/psdc-business/src/main/java/com/psdc/mapper/PsdcDeviceMapper.java b/psdc-business/src/main/java/com/psdc/mapper/PsdcDeviceMapper.java index cb8538b..bd9b1c5 100644 --- a/psdc-business/src/main/java/com/psdc/mapper/PsdcDeviceMapper.java +++ b/psdc-business/src/main/java/com/psdc/mapper/PsdcDeviceMapper.java @@ -3,6 +3,7 @@ package com.psdc.mapper; import java.util.List; import com.psdc.entity.PsdcDevice; +import com.psdc.entity.res.PsdcDeviceInfoRes; import com.psdc.entity.vo.DeviceStatusVo; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -38,7 +39,7 @@ public interface PsdcDeviceMapper{ * @param psdcDevice 查询条件 * @return 对象列表 */ - List<PsdcDevice> queryAllByLimit(PsdcDevice psdcDevice); + List<PsdcDeviceInfoRes> queryAllByLimit(PsdcDevice psdcDevice); /** * 统计总行数 * diff --git a/psdc-business/src/main/java/com/psdc/service/IPsdcDeviceService.java b/psdc-business/src/main/java/com/psdc/service/IPsdcDeviceService.java index 76aa545..b9f7b80 100644 --- a/psdc-business/src/main/java/com/psdc/service/IPsdcDeviceService.java +++ b/psdc-business/src/main/java/com/psdc/service/IPsdcDeviceService.java @@ -1,6 +1,7 @@ package com.psdc.service; import com.psdc.entity.PsdcDevice; +import com.psdc.entity.res.PsdcDeviceInfoRes; import com.psdc.entity.vo.DeviceStatusVo; import org.springframework.web.multipart.MultipartFile; @@ -47,7 +48,7 @@ public interface IPsdcDeviceService { * @param psdcDevice 查询条件 * @return 对象列表 */ - List<PsdcDevice> queryAllByLimit(PsdcDevice psdcDevice); + List<PsdcDeviceInfoRes> queryAllByLimit(PsdcDevice psdcDevice); /** * 更新数据 diff --git a/psdc-business/src/main/java/com/psdc/service/IPsdcThermometerHtdataService.java b/psdc-business/src/main/java/com/psdc/service/IPsdcThermometerHtdataService.java index 5450247..736461a 100644 --- a/psdc-business/src/main/java/com/psdc/service/IPsdcThermometerHtdataService.java +++ b/psdc-business/src/main/java/com/psdc/service/IPsdcThermometerHtdataService.java @@ -24,7 +24,7 @@ public interface IPsdcThermometerHtdataService { PsdcDevicePowerRes selTotalElectricityInfo(Integer deviceId); - Map selTodayThermometerById(Integer deviceId); + List selTodayThermometerById(); AjaxResult selDzglWenDu(Integer deviceId); diff --git a/psdc-business/src/main/java/com/psdc/service/impl/PsdcDeviceServiceImpl.java b/psdc-business/src/main/java/com/psdc/service/impl/PsdcDeviceServiceImpl.java index 7c60ada..d216f1e 100644 --- a/psdc-business/src/main/java/com/psdc/service/impl/PsdcDeviceServiceImpl.java +++ b/psdc-business/src/main/java/com/psdc/service/impl/PsdcDeviceServiceImpl.java @@ -2,6 +2,7 @@ package com.psdc.service.impl; import com.psdc.entity.PsdcControlLog; import com.psdc.entity.PsdcDevice; +import com.psdc.entity.res.PsdcDeviceInfoRes; import com.psdc.entity.vo.DeviceStatusVo; import com.psdc.enums.ControlKeyEnum; import com.psdc.exception.ControlException; @@ -18,6 +19,7 @@ import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; import java.io.InputStream; +import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; @@ -76,19 +78,36 @@ public class PsdcDeviceServiceImpl implements IPsdcDeviceService { * @return 实例对象 */ public Integer insert(PsdcDevice psdcDevice) { + psdcDevice.setDeviceStatus(1); // 未激活 + psdcDevice.setDeviceRunstatus(2); // 关闭 return psdcDeviceMapper.insert(psdcDevice); } @Override - public List<PsdcDevice> queryAllByLimit(PsdcDevice psdcDevice) { - List<PsdcDevice> list = psdcDeviceMapper.queryAllByLimit(psdcDevice); - for (PsdcDevice dev : list){ + public List<PsdcDeviceInfoRes> queryAllByLimit(PsdcDevice psdcDevice) { + List<PsdcDeviceInfoRes> list = psdcDeviceMapper.queryAllByLimit(psdcDevice); + List<Integer> ary = new ArrayList<>(); + List<PsdcDeviceInfoRes> removeList = new ArrayList<>(); + for (PsdcDeviceInfoRes dev : list){ // 导出时转换为String - dev.setDevType(coverStr("t", dev.getDeviceType())); - dev.setDevStatus(coverStr("s", dev.getDeviceStatus())); - dev.setDevRunstatus(coverStr("r", dev.getDeviceRunstatus())); + if (null != dev){ + dev.setDevStatus(coverStr("s", dev.getDeviceStatus())); + dev.setDevRunstatus(coverStr("r", dev.getDeviceRunstatus())); + if (dev.getParentId() != 0){ + ary.add(dev.getParentId()); + } + } } - +// for (PsdcDeviceInfoRes dev : list){ +// // 剔除多设备父模型 +// for (Integer pId : ary){ +// if (dev.getDeviceId() == pId){ +// removeList.add(dev); +// } +// } +// } +// +// list.removeAll(removeList); return list; } @@ -124,7 +143,7 @@ public class PsdcDeviceServiceImpl implements IPsdcDeviceService { for (PsdcDevice pd : devices){ pd.setCreateBy(cjr); pd.setCreateTime(new Date()); - pd.setDeviceType(Integer.parseInt(pd.getDevType())); + // pd.setDeviceType(Integer.parseInt(pd.getDevType())); // 新导入的设备默认状态为: 未激活 // 新导入的设备默认启动时间为null,请在设备激活后手动修改! pd.setDeviceStatus(1); diff --git a/psdc-business/src/main/java/com/psdc/service/impl/PsdcThermometerHtdataServiceImpl.java b/psdc-business/src/main/java/com/psdc/service/impl/PsdcThermometerHtdataServiceImpl.java index c844f1d..7ab52f5 100644 --- a/psdc-business/src/main/java/com/psdc/service/impl/PsdcThermometerHtdataServiceImpl.java +++ b/psdc-business/src/main/java/com/psdc/service/impl/PsdcThermometerHtdataServiceImpl.java @@ -114,61 +114,40 @@ public class PsdcThermometerHtdataServiceImpl implements IPsdcThermometerHtdataS } @Override - public Map<String, Object> selTodayThermometerById(Integer deviceId) { + public List<Map> selTodayThermometerById() { Date date = new Date(); String tb = sdf.format(date) + " 00:00:00"; // 今天开始检索时间 String te = sdf.format(date) + " 23:59:59"; // 今天结束检索时间 - Map<String, Object> map = new HashMap(); - // 查询该设备实时温度数据 - PsdcThermometerDataRes dataRes = psdcThermometerRtdataMapper.queryById(deviceId, sdf.format(date)); - List<PsdcThermometerHtdata> htdata = psdcThermometerHtdataMapper.selTodayThermometer(deviceId, tb, te); - - if (null == dataRes || null == htdata) { - return null; - } + List<Map> ary = new ArrayList<>(); + List<PsdcThermometerDataRes> dataResList = psdcThermometerRtdataMapper.selWenDu(SecurityUtils.getUserId(), 16); + for (PsdcThermometerDataRes dec : dataResList ){ + PsdcThermometerDataRes dataRes = psdcThermometerRtdataMapper.queryById(dec.getDeviceId(), sdf.format(date)); + List<PsdcThermometerHtdata> htdata = psdcThermometerHtdataMapper.selTodayThermometer(dec.getDeviceId(), tb, te); - List<Double> listIn = new ArrayList(); // 今天历史进水温度集合 - List<Double> listOut = new ArrayList(); // 今天历史出水温度集合 - List<Double> listTemp = new ArrayList(); // 今天历史温度集合 - List<String> times = new ArrayList(); // 时间轴 + List<Double> listTemp = new ArrayList(); // 今天历史温度集合 + List<String> times = new ArrayList(); // 时间轴 - // 循环遍历今天历史数据对象集合 + // 循环遍历今天历史数据对象集合 + for (PsdcThermometerHtdata h : htdata) { + if (null != h.getThermometerValue()) { + listTemp.add(h.getThermometerValue()); + } - for (PsdcThermometerHtdata h : htdata) { - if (null != h.getThermometerValue()) { - listTemp.add(h.getThermometerValue()); + String t = h.getUpdateTime().split(" ")[1].substring(0, 5); + times.add(t); } - if (null != h.getThermometerValueIn()) { - listIn.add(h.getThermometerValueIn()); - } - if (null != h.getThermometerValueOut()) { - listOut.add(h.getThermometerValueOut()); - } - - String t = h.getUpdateTime().split(" ")[1].substring(0, 5); - times.add(t); - } - map.put("deviceId", dataRes.getDeviceId()); - map.put("deviceName", dataRes.getDeviceName()); - map.put("tempIn", listIn); - map.put("tempOut", listOut); - map.put("temps", listTemp); - map.put("times", times); - Map<String, Object> map2 = new HashMap(); - List<PsdcThermometerDataRes> dataRes1 = psdcThermometerRtdataMapper.selWenDu(SecurityUtils.getUserId(), 16); - ArrayList<Map> ary = new ArrayList<>(); - // 循环遍历温度实时对象集合并 - for (PsdcThermometerDataRes temp : dataRes1) { Map<String, Object> map3 = new HashMap(); - map3.put("deviceId", temp.getDeviceId()); - map3.put("deviceName", temp.getDeviceName()); - map3.put("deviceTemp", temp.getThermometerValue()); + + map3.put("deviceId", dataRes.getDeviceId()); + map3.put("deviceName", dataRes.getDeviceName()); + map3.put("deviceTemp", dec.getThermometerValue()); + map3.put("temps", listTemp); + map3.put("times", times); ary.add(map3); } - map2.put("realTemp", ary); - map2.put("tempList", map); - return map2; + + return ary; } /** diff --git a/psdc-business/src/main/resources/mapper/business/PsdcDeviceMapper.xml b/psdc-business/src/main/resources/mapper/business/PsdcDeviceMapper.xml index aef6622..b86b868 100644 --- a/psdc-business/src/main/resources/mapper/business/PsdcDeviceMapper.xml +++ b/psdc-business/src/main/resources/mapper/business/PsdcDeviceMapper.xml @@ -33,6 +33,25 @@ <result property="deviceRunstatus" column="device_runstatus" /> </resultMap> + <resultMap type="com.psdc.entity.res.PsdcDeviceInfoRes" id="PsdcDeviceMap3"> + <result property="deviceId" column="device_id" /> + <result property="parentId" column="parent_id" /> + <result property="userId" column="user_id" /> + <result property="userName" column="user_name" /> + <result property="deviceModel" column="device_model" /> + <result property="deviceSn" column="device_sn" /> + <result property="deviceName" column="device_name" /> + <result property="totp" column="TotP" /> + <result property="temp" column="thermometer_value" /> + <result property="tempIn" column="thermometer_value_in" /> + <result property="tempOut" column="thermometer_value_out" /> + <result property="totWh" column="TotWh" /> + <result property="deviceAddress" column="device_address" /> + <result property="startTime" column="start_time" /> + <result property="deviceStatus" column="device_status" /> + <result property="deviceRunstatus" column="device_runstatus" /> + </resultMap> + <select id="queryDeviceStatusById" resultMap="PsdcDeviceMap2"> Select device_id, device_type, device_sn, device_name, device_runstatus, photo_url From psdc_device Where device_id = #{deviceId} @@ -85,19 +104,23 @@ </select> <!--分页查询指定行数据--> - <select id="queryAllByLimit" resultMap="PsdcDeviceMap"> - select - device_id, parent_id, device_model, is_control, user_id, device_type,device_sn,device_name,hard_version,soft_version,device_address,start_time,device_status,device_runstatus,photo_url,create_by,create_time,update_by,update_time - from psdc_device - <where> + <select id="queryAllByLimit" resultMap="PsdcDeviceMap3"> + Select + pd.device_id, device_name, device_address, device_status, device_runstatus, parent_id, device_model, su.user_id, su.user_name, + device_sn, per.TotP, per.TotWh, start_time, ptr.thermometer_value, ptr.thermometer_value_in, ptr.thermometer_value_out + From psdc_device pd + Left Join sys_user su On su.user_id = pd.user_id + Left Join psdc_electric_rtdata per On per.device_id = pd.device_id + Left Join psdc_thermometer_rtdata ptr On ptr.device_id = pd.device_id + Where !(device_model = "温度传感器" And parent_id = 0) <if test="deviceId != null and deviceId != ''"> - and device_id = #{deviceId} + and pd.device_id = #{deviceId} </if> <if test="userId != null and userId != ''"> - and user_id = #{userId} + and pd.user_id = #{userId} </if> - <if test="deviceType != null and deviceType != ''"> - and device_type = #{deviceType} + <if test="deviceModel != null and deviceModel != ''"> + and device_model Like concat('%', #{deviceModel}, '%') </if> <if test="deviceSn != null and deviceSn != ''"> and device_sn = #{deviceSn} @@ -138,7 +161,7 @@ <if test="updateTime != null and updateTime != ''"> and update_time = #{updateTime} </if> - </where> + Order by pd.device_id </select> <!--统计总行数--> @@ -199,7 +222,7 @@ <!--新增数据--> <insert id="insert"> - insert into psdc_device(user_id, device_type, parent_id, device_model, is_control, device_sn, device_name, hard_version, soft_version, + insert into psdc_device(user_id, device_type, device_model, parent_id, is_control, device_sn, device_name, hard_version, soft_version, device_address, start_time, device_status, device_runstatus, photo_url, create_by, create_time, update_by, update_time) values (#{userId}, #{deviceType}, #{deviceModel},#{parentId},#{isControl}, #{deviceSn}, #{deviceName}, #{hardVersion}, #{softVersion}, #{deviceAddress}, @@ -213,7 +236,7 @@ create_time, update_by, update_time) Values <foreach collection="devRecord" item="entity" separator=","> - (NULL, #{entity.deviceType}, #{entity.deviceSn}, #{entity.deviceModel},#{entity.parentId},#{entity.isControl}, #{entity.deviceName}, #{entity.hardVersion}, #{entity.softVersion}, #{entity.deviceAddress}, + (NULL, #{entity.deviceType}, #{entity.deviceSn},#{entity.parentId}, #{entity.deviceModel}, #{entity.isControl}, #{entity.deviceName}, #{entity.hardVersion}, #{entity.softVersion}, #{entity.deviceAddress}, #{entity.startTime}, #{entity.deviceStatus}, #{entity.deviceRunstatus}, #{entity.photoUrl}, #{entity.createBy}, #{entity.createTime}, NULL, NULL) </foreach> </insert> diff --git a/psdc-web/src/main/java/com/psdc/controller/manager/PsdcDeviceController.java b/psdc-web/src/main/java/com/psdc/controller/manager/PsdcDeviceController.java index 7e9c322..e87e3f0 100644 --- a/psdc-web/src/main/java/com/psdc/controller/manager/PsdcDeviceController.java +++ b/psdc-web/src/main/java/com/psdc/controller/manager/PsdcDeviceController.java @@ -8,6 +8,7 @@ import com.psdc.core.domain.AjaxResult; import com.psdc.core.domain.entity.SysUser; import com.psdc.core.page.TableDataInfo; import com.psdc.entity.PsdcDevice; +import com.psdc.entity.res.PsdcDeviceInfoRes; import com.psdc.enums.BusinessType; import com.psdc.service.IPsdcDeviceService; import com.psdc.service.ISysUserService; @@ -96,7 +97,7 @@ public class PsdcDeviceController extends BaseController { // PageMethod.startPage(jsonObject.getInteger("pageNum"),jsonObject.getInteger("pageSize")); // PsdcDevice deviceVo = JSON.parseObject(String.valueOf(jsonObject), PsdcDevice.class); PsdcDevice deviceVo = myPage(jsonObject, PsdcDevice.class); - List<PsdcDevice> list = psdcDeviceService.queryAllByLimit(deviceVo); + List<PsdcDeviceInfoRes> list = psdcDeviceService.queryAllByLimit(deviceVo); return getDataTable(list); } @@ -107,12 +108,12 @@ public class PsdcDeviceController extends BaseController { @Log(title = "设备管理", businessType = BusinessType.EXPORT) @RequestMapping(value = "/daochuDevs", method = RequestMethod.POST) public void daochuDevDta(HttpServletResponse response, @RequestBody PsdcDevice pd) { - List<PsdcDevice> list = psdcDeviceService.queryAllByLimit(pd); - for (PsdcDevice dev : list){ - dev.setUserName(sysUserService.selectUserById(Long.valueOf(dev.getUserId())).getUserName()); - } - ExcelUtil<PsdcDevice> util = new ExcelUtil<>(PsdcDevice.class); - util.exportExcel(response, list, "角色数据"); +// List<PsdcDevice> list = psdcDeviceService.queryAllByLimit(pd); +// for (PsdcDevice dev : list){ +// dev.setUserName(sysUserService.selectUserById(Long.valueOf(dev.getUserId())).getUserName()); +// } +// ExcelUtil<PsdcDevice> util = new ExcelUtil<>(PsdcDevice.class); +// util.exportExcel(response, list, "角色数据"); } /** diff --git a/psdc-web/src/main/java/com/psdc/controller/monitor/WenDuController.java b/psdc-web/src/main/java/com/psdc/controller/monitor/WenDuController.java index 073288b..0ffcaa5 100644 --- a/psdc-web/src/main/java/com/psdc/controller/monitor/WenDuController.java +++ b/psdc-web/src/main/java/com/psdc/controller/monitor/WenDuController.java @@ -24,12 +24,9 @@ public class WenDuController { IPsdcThermometerHtdataService psdcThermometerHtdataService; @PreAuthorize("@ss.hasPermi('emonitor:wdcgq')") - @RequestMapping(value = "/sel1/{deviceId}", method = RequestMethod.GET) - public AjaxResult seldrgl1(@PathVariable(value = "deviceId", required = false) Integer deviceId){ - if (null == psdcThermometerHtdataService.selTodayThermometerById(deviceId)){ - return AjaxResult.success("今日该设备暂无温度数据!"); - } - return AjaxResult.success(psdcThermometerHtdataService.selTodayThermometerById(deviceId)); + @RequestMapping(value = "/sel1", method = RequestMethod.GET) + public AjaxResult selwd(){ + return AjaxResult.success(psdcThermometerHtdataService.selTodayThermometerById()); } }