From 042e9c52a4fb32af40c97021283e2d2ba534b196 Mon Sep 17 00:00:00 2001 From: jiminglei <836545853@qq.com> Date: Wed, 31 May 2023 17:41:09 +0800 Subject: [PATCH 01/10] 11 --- psdc-ui/src/views/emonitor/db/index.vue | 5 ++++- psdc-ui/src/views/emonitor/drgl/index.vue | 11 +++++++++-- psdc-ui/src/views/emonitor/frdl/index.vue | 10 ++++++++-- psdc-ui/src/views/emonitor/kqyrb/index.vue | 10 ++++++++-- psdc-ui/src/views/emonitor/wdcgq/index.vue | 5 ++++- psdc-ui/src/views/emonitor/xrgl/index.vue | 10 ++++++++-- 6 files changed, 41 insertions(+), 10 deletions(-) diff --git a/psdc-ui/src/views/emonitor/db/index.vue b/psdc-ui/src/views/emonitor/db/index.vue index 105b70b..27b4321 100644 --- a/psdc-ui/src/views/emonitor/db/index.vue +++ b/psdc-ui/src/views/emonitor/db/index.vue @@ -268,7 +268,10 @@ export default { myChart2 = echarts.init(document.getElementById("myEcharts2")); myChart2.setOption({ title: {}, - tooltip: {}, + tooltip: { + trigger: "axis", + show: true + }, textStyle:{ color:'#BEC3DA' }, diff --git a/psdc-ui/src/views/emonitor/drgl/index.vue b/psdc-ui/src/views/emonitor/drgl/index.vue index 2f35688..6498298 100644 --- a/psdc-ui/src/views/emonitor/drgl/index.vue +++ b/psdc-ui/src/views/emonitor/drgl/index.vue @@ -358,7 +358,11 @@ export default { myChart4 = echarts.init(document.getElementById("myEcharts4")); myChart4.setOption({ title: {}, - tooltip: {}, + tooltip: { + trigger: "axis", + + show: true + }, legend: { data: ['进水', '出水'], textStyle:{ @@ -447,7 +451,10 @@ export default { myChart3 = echarts.init(document.getElementById("myEcharts3")); myChart3.setOption({ title: {}, - tooltip: {}, + tooltip: { + trigger: "axis", + show: true + }, textStyle:{ color:'#BEC3DA' }, diff --git a/psdc-ui/src/views/emonitor/frdl/index.vue b/psdc-ui/src/views/emonitor/frdl/index.vue index c127043..d737ed8 100644 --- a/psdc-ui/src/views/emonitor/frdl/index.vue +++ b/psdc-ui/src/views/emonitor/frdl/index.vue @@ -350,7 +350,10 @@ export default { myChart4 = echarts.init(document.getElementById("myEcharts4")); myChart4.setOption({ title: {}, - tooltip: {}, + tooltip: { + trigger: "axis", + show: true + }, textStyle:{ color:'#BEC3DA' }, @@ -424,7 +427,10 @@ export default { myChart3 = echarts.init(document.getElementById("myEcharts3")); myChart3.setOption({ title: {}, - tooltip: {}, + tooltip: { + trigger: "axis", + show: true + }, textStyle:{ color:'#BEC3DA' }, diff --git a/psdc-ui/src/views/emonitor/kqyrb/index.vue b/psdc-ui/src/views/emonitor/kqyrb/index.vue index 00b8b77..d131d49 100644 --- a/psdc-ui/src/views/emonitor/kqyrb/index.vue +++ b/psdc-ui/src/views/emonitor/kqyrb/index.vue @@ -355,7 +355,10 @@ export default { myChart4 = echarts.init(document.getElementById("myEcharts4")); myChart4.setOption({ title: {}, - tooltip: {}, + tooltip: { + trigger: "axis", + show: true + }, legend: { data: ['进水', '出水'], textStyle:{ @@ -443,7 +446,10 @@ export default { myChart3 = echarts.init(document.getElementById("myEcharts3")); myChart3.setOption({ title: {}, - tooltip: {}, + tooltip: { + trigger: "axis", + show: true + }, textStyle:{ color:'#BEC3DA' }, diff --git a/psdc-ui/src/views/emonitor/wdcgq/index.vue b/psdc-ui/src/views/emonitor/wdcgq/index.vue index 907d71d..ce28d15 100644 --- a/psdc-ui/src/views/emonitor/wdcgq/index.vue +++ b/psdc-ui/src/views/emonitor/wdcgq/index.vue @@ -81,7 +81,10 @@ export default { // 绘制图表 myChart.setOption({ title: {}, - tooltip: {}, + tooltip: { + trigger: "axis", + show: true + }, legend: { selectedMode: 'single', textStyle:{ diff --git a/psdc-ui/src/views/emonitor/xrgl/index.vue b/psdc-ui/src/views/emonitor/xrgl/index.vue index 8afa1c2..5ccd4dd 100644 --- a/psdc-ui/src/views/emonitor/xrgl/index.vue +++ b/psdc-ui/src/views/emonitor/xrgl/index.vue @@ -247,7 +247,10 @@ export default { myChart3 = echarts.init(document.getElementById("myEcharts3")); myChart3.setOption({ title: {}, - tooltip: {}, + tooltip: { + trigger: "axis", + show: true + }, textStyle:{ color:'#BEC3DA' }, @@ -430,7 +433,10 @@ export default { myChart4 = echarts.init(document.getElementById("myEcharts4")); myChart4.setOption({ title: {}, - tooltip: {}, + tooltip: { + trigger: "axis", + show: true + }, legend: { textStyle:{ color:'#BEC3DA' From b8f506b3ea6fccd7559c7e93d676e4b1d8df4e75 Mon Sep 17 00:00:00 2001 From: wj <347312259@qq.com> Date: Thu, 1 Jun 2023 08:54:39 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E7=AD=96=E7=95=A5=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=A4=9A=E9=80=89=E6=A1=86=E6=A0=B7=E5=BC=8F=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- psdc-ui/src/views/system/cl/index.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/psdc-ui/src/views/system/cl/index.vue b/psdc-ui/src/views/system/cl/index.vue index 5876165..95c35aa 100644 --- a/psdc-ui/src/views/system/cl/index.vue +++ b/psdc-ui/src/views/system/cl/index.vue @@ -69,7 +69,7 @@
- {{item.deviceName}} + {{item.deviceName}} 全选
- {{item.deviceName}} + + {{item.deviceName}} Date: Thu, 1 Jun 2023 09:14:08 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- psdc-ui/src/views/control/manual/index.vue | 1 + psdc-ui/src/views/control/timer/index.vue | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/psdc-ui/src/views/control/manual/index.vue b/psdc-ui/src/views/control/manual/index.vue index 6d28824..c9a9bcb 100644 --- a/psdc-ui/src/views/control/manual/index.vue +++ b/psdc-ui/src/views/control/manual/index.vue @@ -442,6 +442,7 @@ function getSetTemperatureFun(item){ bottom: 10px; left: 50%; transform: translateX(-50%); + z-index: 999; } ::v-deep .el-pagination__total{ color: #f3ffff; diff --git a/psdc-ui/src/views/control/timer/index.vue b/psdc-ui/src/views/control/timer/index.vue index 963d8ec..eb614ce 100644 --- a/psdc-ui/src/views/control/timer/index.vue +++ b/psdc-ui/src/views/control/timer/index.vue @@ -576,10 +576,10 @@ const { queryParams } = toRefs(data); } } } -::v-deep .el-input__wrapper{ - border-top-left-radius: 0px; - border-bottom-left-radius: 0px; -} +//::v-deep .el-input__wrapper{ +// border-top-left-radius: 0px; +// border-bottom-left-radius: 0px; +//} ::v-deep .el-button{ border-radius: 2px; } From a0839f1ed4a23a283802496c3a7a14006044fa71 Mon Sep 17 00:00:00 2001 From: wj <347312259@qq.com> Date: Thu, 1 Jun 2023 09:29:00 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E6=B2=99=E7=9B=98=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- psdc-ui/src/views/emonitor/sp/index.vue | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/psdc-ui/src/views/emonitor/sp/index.vue b/psdc-ui/src/views/emonitor/sp/index.vue index 5c021da..2a759d5 100644 --- a/psdc-ui/src/views/emonitor/sp/index.vue +++ b/psdc-ui/src/views/emonitor/sp/index.vue @@ -1,7 +1,7 @@ @@ -21,9 +21,9 @@ export default { if(res.data!=null) { data.name = res.data.deviceName if (res.data.deviceRunstatus == true) { - data.status = '开启' + data.status = '正在运行' } else { - data.status = '关闭' + data.status = '停止运行' } } }) @@ -40,8 +40,17 @@ export default { From 01e9b4bfadcd75c73045a84291aab28c95a595f1 Mon Sep 17 00:00:00 2001 From: wj <347312259@qq.com> Date: Thu, 1 Jun 2023 10:24:56 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E7=AD=96=E7=95=A5=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E8=BF=9B=E5=87=BA=E6=B0=B4=E6=B8=A9=E5=BA=A6=E5=8C=BA=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- psdc-ui/src/views/system/cl/index.vue | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/psdc-ui/src/views/system/cl/index.vue b/psdc-ui/src/views/system/cl/index.vue index 95c35aa..bdc1e89 100644 --- a/psdc-ui/src/views/system/cl/index.vue +++ b/psdc-ui/src/views/system/cl/index.vue @@ -66,7 +66,7 @@ 全选 -
+
进水温度出水温度温度
{{item.deviceName}} @@ -133,7 +133,7 @@ 全选 -
+
进水温度出水温度温度
{{item.deviceName}} @@ -562,7 +562,19 @@ const { queryParams } = toRefs(data); min-height: 745px; background-color: #2F3D8A; } - +.taber{ + width: 400px; + margin-left: 52px; + display: flex; + justify-content: flex-start; + line-height: 32px; + span{ + width: 120px; + &:nth-child(2),&:nth-child(3){ + margin-left: 20px; + } + } +} ::v-deep .el-button{ border-radius: 2px; } From d77df5593fa4a1ce8ad82cc6fb60ad03d76e0bb2 Mon Sep 17 00:00:00 2001 From: jiminglei <836545853@qq.com> Date: Thu, 1 Jun 2023 14:36:30 +0800 Subject: [PATCH 06/10] 11 --- psdc-ui/src/views/system/cl/index.vue | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/psdc-ui/src/views/system/cl/index.vue b/psdc-ui/src/views/system/cl/index.vue index bdc1e89..20cd66f 100644 --- a/psdc-ui/src/views/system/cl/index.vue +++ b/psdc-ui/src/views/system/cl/index.vue @@ -70,12 +70,9 @@ {{item.deviceName}} - - - + + + @@ -137,12 +134,9 @@ {{item.deviceName}} - - - + + + From bbd949abcf849285f3ef20a4514afc2873a83b8d Mon Sep 17 00:00:00 2001 From: wj <347312259@qq.com> Date: Thu, 1 Jun 2023 14:36:46 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E6=89=8B=E5=8A=A8=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E6=B8=B2=E6=9F=93=E5=8F=AF=E6=8E=A7=E8=AE=BE=E5=A4=87=EF=BC=8C?= =?UTF-8?q?=E7=AD=96=E7=95=A5=E5=AF=BC=E5=85=A5=E6=89=A7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- psdc-ui/src/api/control/manual.js | 8 ++++++++ psdc-ui/src/views/control/manual/index.vue | 23 +++++++++++++--------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/psdc-ui/src/api/control/manual.js b/psdc-ui/src/api/control/manual.js index 902edf6..eb6cf03 100644 --- a/psdc-ui/src/api/control/manual.js +++ b/psdc-ui/src/api/control/manual.js @@ -4,6 +4,10 @@ import request from '@/utils/request' export function getDevice() { return request.get('/control/manual/deviceStatusList') } +/** 获取可控设备*/ +export function getControlDeviceList() { + return request.get('/control/manual/controlDeviceList') +} /** 获取调控日志列表*/ export function getControlLogList(data) { return request.post('/control/manual/controlLogList',data) @@ -19,4 +23,8 @@ export function getStartAndStop(data) { /** 设置温度*/ export function getSetTemperature(data) { return request.post('/control/manual/setTemperature',data) +} +/** 策略执行控制*/ +export function getSenceControl(data) { + return request.post('/control/manual/senceControl',data) } \ No newline at end of file diff --git a/psdc-ui/src/views/control/manual/index.vue b/psdc-ui/src/views/control/manual/index.vue index c9a9bcb..cd5e9cf 100644 --- a/psdc-ui/src/views/control/manual/index.vue +++ b/psdc-ui/src/views/control/manual/index.vue @@ -25,6 +25,7 @@ +
确定
@@ -89,7 +90,7 @@ import { Download } from '@element-plus/icons-vue' //element字体图标 import { ref,reactive,onMounted } from 'vue' import { ElMessageBox,ElMessage } from 'element-plus' -import { getDevice,getControlLogList,getStrategyList,getStartAndStop,getSetTemperature } from '@/api/control/manual' +import { getDevice,getControlLogList,getStrategyList,getStartAndStop,getSetTemperature,getSenceControl,getControlDeviceList } from '@/api/control/manual' onMounted(()=>{ getDeviceFun(); @@ -100,15 +101,15 @@ onMounted(()=>{ /** 获取所有设备*/ const deviceArr = ref([]) function getDeviceFun(){ - getDevice().then((res)=>{ + getControlDeviceList().then((res)=>{ deviceArr.value = res.data; //拼接温度单位 - for(let i = 0;i < res.data.length;i++){ - for(let j = 0;j < res.data[i].control_elements.length;j++){ - console.log(res.data[i].control_elements[j].tempValue) - res.data[i].control_elements[j].tempValue = res.data[i].control_elements[j].tempValue + '℃' - } - } + // for(let i = 0;i < res.data.length;i++){ + // for(let j = 0;j < res.data[i].control_elements.length;j++){ + // console.log(res.data[i].control_elements[j].tempValue) + // res.data[i].control_elements[j].tempValue = res.data[i].control_elements[j].tempValue + '℃' + // } + // } }) } /** 设备控制处理*/ @@ -174,6 +175,7 @@ function getStrategyListFun(){ }) } //选择策略 +const SenceControlArr = ref([]) function selectCeLue(item){ //拼数组对象 //1、 @@ -202,12 +204,15 @@ function selectCeLue(item){ //最终要传参的格式 console.log(JSON.stringify(dataArr, null, 4)); + SenceControlArr.value = JSON.stringify(dataArr, null, 4) } //执行 function confirmClick() { ElMessageBox.confirm(`确定执行 ${radio.value} ?`).then(() => { drawerIshow.value = false; - + getSenceControl(SenceControlArr.value).then((res)=>{ + console.log(res) + }) }) } From 638889add927f7f9e4562c2cb4a4a30640b6472c Mon Sep 17 00:00:00 2001 From: jiminglei <836545853@qq.com> Date: Thu, 1 Jun 2023 15:00:50 +0800 Subject: [PATCH 08/10] 11 --- psdc-ui/src/views/emonitor/drgl/index.vue | 8 ++++---- psdc-ui/src/views/emonitor/frdl/index.vue | 4 ++-- psdc-ui/src/views/emonitor/kqyrb/index.vue | 8 ++++---- psdc-ui/src/views/emonitor/wdcgq/index.vue | 4 +++- psdc-ui/src/views/emonitor/xrgl/index.vue | 8 ++++---- 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/psdc-ui/src/views/emonitor/drgl/index.vue b/psdc-ui/src/views/emonitor/drgl/index.vue index 6498298..5007576 100644 --- a/psdc-ui/src/views/emonitor/drgl/index.vue +++ b/psdc-ui/src/views/emonitor/drgl/index.vue @@ -403,7 +403,7 @@ export default { { name: '进水', type: 'line', - stack: 'Total', + // stack: 'Total', itemStyle:{ color:'#2F8EE0' }, @@ -412,9 +412,9 @@ export default { { name: '出水', type: 'line', - stack: 'Total', - itemStyle:{ - color:'#2F8EE0' + // stack: 'Total', + itemStyle: { //线条颜色 + color: '#F5901A', }, data: data.temOut }, diff --git a/psdc-ui/src/views/emonitor/frdl/index.vue b/psdc-ui/src/views/emonitor/frdl/index.vue index d737ed8..38ed214 100644 --- a/psdc-ui/src/views/emonitor/frdl/index.vue +++ b/psdc-ui/src/views/emonitor/frdl/index.vue @@ -389,8 +389,8 @@ export default { name: '当前温度', type: 'line', stack: 'Total', - itemStyle:{ - color:'#2F8EE0' + itemStyle: { //线条颜色 + color: '#F5901A', }, data: data.tem }, diff --git a/psdc-ui/src/views/emonitor/kqyrb/index.vue b/psdc-ui/src/views/emonitor/kqyrb/index.vue index d131d49..62bec96 100644 --- a/psdc-ui/src/views/emonitor/kqyrb/index.vue +++ b/psdc-ui/src/views/emonitor/kqyrb/index.vue @@ -399,7 +399,7 @@ export default { { name: '进水', type: 'line', - stack: 'Total', + // stack: 'Total', itemStyle:{ color:'#2F8EE0' }, @@ -408,9 +408,9 @@ export default { { name: '出水', type: 'line', - stack: 'Total', - itemStyle:{ - color:'#2F8EE0' + // stack: 'Total', + itemStyle: { //线条颜色 + color: '#F5901A', }, data: data.temOut }, diff --git a/psdc-ui/src/views/emonitor/wdcgq/index.vue b/psdc-ui/src/views/emonitor/wdcgq/index.vue index ce28d15..fd7b7dc 100644 --- a/psdc-ui/src/views/emonitor/wdcgq/index.vue +++ b/psdc-ui/src/views/emonitor/wdcgq/index.vue @@ -64,7 +64,9 @@ export default { name: res.data[i].deviceName, type: "line", data: res.data[i].temps, - itemStyle: {color: '#2F8EE0'} + itemStyle: { //线条颜色 + color: '#F5901A', + } }) crr.push(res.data[i].times) } diff --git a/psdc-ui/src/views/emonitor/xrgl/index.vue b/psdc-ui/src/views/emonitor/xrgl/index.vue index 5ccd4dd..fc8d45e 100644 --- a/psdc-ui/src/views/emonitor/xrgl/index.vue +++ b/psdc-ui/src/views/emonitor/xrgl/index.vue @@ -476,7 +476,7 @@ export default { { name: '进水', type: 'line', - stack: 'Total', + // stack: 'Total', itemStyle:{ color:'#2F8EE0' }, @@ -485,9 +485,9 @@ export default { { name: '出水', type: 'line', - stack: 'Total', - itemStyle:{ - color:'#2F8EE0' + // stack: 'Total', + itemStyle: { //线条颜色 + color: '#F5901A', }, data: data.temOut }, From 680e8e239a212961a34d85e8161f6e38fa49820a Mon Sep 17 00:00:00 2001 From: wj <347312259@qq.com> Date: Fri, 2 Jun 2023 09:38:52 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- psdc-ui/src/views/bigview/index.vue | 34 +++++++++---------- .../src/views/system/user/profile/index.vue | 15 +++++++- 2 files changed, 31 insertions(+), 18 deletions(-) diff --git a/psdc-ui/src/views/bigview/index.vue b/psdc-ui/src/views/bigview/index.vue index 4b39a4e..759176d 100644 --- a/psdc-ui/src/views/bigview/index.vue +++ b/psdc-ui/src/views/bigview/index.vue @@ -144,39 +144,39 @@ function getWenduFun(){ /**运行设备工作信息*/ //蓄热锅炉运行数据 -const xrglRunStatus = ref() -const xrglThermometerValueIn = ref() -const xrglThermometerValueOut = ref() -const xrglTodayUseEnergy = ref() +const xrglRunStatus = ref('--') +const xrglThermometerValueIn = ref('--') +const xrglThermometerValueOut = ref('--') +const xrglTodayUseEnergy = ref('--') //蓄热锅炉折线图数据 const xrglTimeList = ref([]); const xrglTempInTodayList = ref([]); const xrglTempOutTodayList = ref([]); //电磁锅炉运行数据 -const dcglRunStatus = ref() -const dcglThermometerValueIn = ref() -const dcglThermometerValueOut = ref() -const dcglTodayUseEnergy = ref() +const dcglRunStatus = ref('--') +const dcglThermometerValueIn = ref('--') +const dcglThermometerValueOut = ref('--') +const dcglTodayUseEnergy = ref('--') //电磁锅炉折线图数据 const dcglTimeList = ref([]); const dcglTempInTodayList = ref([]); const dcglTempOutTodayList = ref([]); //空气源热泵运行数据 -const kqyrbRunStatus = ref() -const kqyrbThermometerValueIn = ref() -const kqyrbThermometerValueOut = ref() -const kqyrbTodayUseEnergy = ref() +const kqyrbRunStatus = ref('--') +const kqyrbThermometerValueIn = ref('--') +const kqyrbThermometerValueOut = ref('--') +const kqyrbTodayUseEnergy = ref('--') //空气源热泵折线图数据 const kqyrbTimeList = ref([]); const kqyrbTempInTodayList = ref([]); const kqyrbTempOutTodayList = ref([]); //发热电缆运行数据 -const frdlRunStatus = ref() -const frdlThermometerValueNow = ref() -const frdlTodayUseEnergy = ref() +const frdlRunStatus = ref('--') +const frdlThermometerValueNow = ref('--') +const frdlTodayUseEnergy = ref('--') //发热电缆折线图数据 const frdlTimeList = ref([]); const frdlTempTodayList = ref([]); @@ -614,8 +614,8 @@ function frdlChartFun(){ }; /**总电表信息*/ -const nowPower = ref() -const nowEle = ref() +const nowPower = ref('--') +const nowEle = ref('--') const todayUsePowersArr = []; function getZdbFun(){ getZdb(13).then((res)=>{ diff --git a/psdc-ui/src/views/system/user/profile/index.vue b/psdc-ui/src/views/system/user/profile/index.vue index 3f777dd..16a3e78 100644 --- a/psdc-ui/src/views/system/user/profile/index.vue +++ b/psdc-ui/src/views/system/user/profile/index.vue @@ -147,6 +147,19 @@ getUser(); From 56e1d17db21971c4e78283dec9c1e4813b54d6c4 Mon Sep 17 00:00:00 2001 From: XMnhwj_BackTechnologyDevelopment <3512363680@qq.com> Date: Fri, 2 Jun 2023 09:55:56 +0800 Subject: [PATCH 10/10] =?UTF-8?q?2023-06-02=2009:55:36=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=AE=8C=E5=96=84=E7=AD=96=E7=95=A5=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/psdc/service/impl/PsdcDeviceServiceImpl.java | 6 +++--- .../java/com/psdc/service/impl/PsdcSceneServiceImpl.java | 8 +++++++- 2 files changed, 10 insertions(+), 4 deletions(-) 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 578e56b..18503f4 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 @@ -302,7 +302,7 @@ public class PsdcDeviceServiceImpl implements IPsdcDeviceService { // TODO 发送MQTT指令 // psdcControlLogMapper.insert(new PsdcControlLog(deviceId,psdcDevice.getDeviceName(),psdcDevice.getDeviceSn(),controlContext,controlValue,controlMethod,2,"控制成功",controlBy)); // psdcControlLogMapper.insert(new PsdcControlLog(deviceId,psdcDevice.getDeviceName(),psdcDevice.getDeviceSn(),controlContext,controlValue,controlMethod,3,"等待终端响应超时",controlBy)); - //发送成功 + // 发送成功 psdcControlLogMapper.insert(new PsdcControlLog(deviceId, psdcDevice.getDeviceName(), psdcDevice.getDeviceSn(), controlContext, controlValue, controlMethod, 2, "控制成功", controlBy)); atomicInteger.incrementAndGet(); @@ -336,10 +336,10 @@ public class PsdcDeviceServiceImpl implements IPsdcDeviceService { } - //TODO 发送MQTT指令 + // TODO 发送MQTT指令 // psdcControlLogMapper.insert(new PsdcControlLog(deviceId,psdcDevice.getDeviceName(),psdcDevice.getDeviceSn(),controlContext,value,controlMethod,2,"控制成功",controlBy)); // psdcControlLogMapper.insert(new PsdcControlLog(deviceId,psdcDevice.getDeviceName(),psdcDevice.getDeviceSn(),controlContext,value,controlMethod,3,"等待终端响应超时",controlBy)); - //发送成功 + // 发送成功 return psdcControlLogMapper.insert(new PsdcControlLog(deviceId, psdcDevice.getDeviceName(), psdcDevice.getDeviceSn(), controlContext, value, controlMethod, 2, "控制成功", controlBy)); diff --git a/psdc-business/src/main/java/com/psdc/service/impl/PsdcSceneServiceImpl.java b/psdc-business/src/main/java/com/psdc/service/impl/PsdcSceneServiceImpl.java index b1ca67a..9df5103 100644 --- a/psdc-business/src/main/java/com/psdc/service/impl/PsdcSceneServiceImpl.java +++ b/psdc-business/src/main/java/com/psdc/service/impl/PsdcSceneServiceImpl.java @@ -199,7 +199,9 @@ public class PsdcSceneServiceImpl implements IPsdcSceneService { DeviceVo deviceVo = new DeviceVo(); for (int i = 0; i < listByCode.size(); i++) { SceneVo sv = listByCode.get(i); + // System.out.println("序号 = " + i + ", 元素" + sv + "\n"); if (deviceId == sv.getDeviceId()) { + // System.out.println("上行: " + i + "\n"); deviceVo.setDeviceId(sv.getDeviceId()); deviceVo.setDeviceName(sv.getDeviceName()); deviceVo.setDeviceSn(sv.getDeviceSn()); @@ -214,10 +216,12 @@ public class PsdcSceneServiceImpl implements IPsdcSceneService { deviceVo.setTemp(sv.getSceneValue()); break; } - if (1 == listByCode.size()){ + if (1 == listByCode.size() || i == listByCode.size() - 1){ ary.add(deviceVo); } + } else { + // System.out.println("下发: " + i + "\n"); ary.add(deviceVo); deviceId = sv.getDeviceId(); deviceVo = new DeviceVo(); @@ -248,9 +252,11 @@ public class PsdcSceneServiceImpl implements IPsdcSceneService { } } } + // System.out.println("终端元素 = " + ary + "\n"); } psr.setDeviceVos(ary); } + // System.out.println("集合:" + sceneRes + "\n"); return sceneRes; }