From 85e362adc639c3a2f27ff5b2dc9a9575b2444d44 Mon Sep 17 00:00:00 2001 From: zhuxinyu <1799009482@qq.com> Date: Fri, 21 Apr 2023 13:47:56 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=88=E7=AB=AF=E8=BF=90=E7=BB=B4=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../device/pq/mapper/mapping/LineMapper.xml | 2 +- .../mapper/mapping/TerminalMaintainMapper.xml | 7 ++++--- .../impl/TerminalMaintainServiceImpl.java | 14 ++++++------- .../impl/EventTemplateServiceImpl.java | 21 +++++++++++++++++-- 4 files changed, 31 insertions(+), 13 deletions(-) diff --git a/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/mapping/LineMapper.xml b/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/mapping/LineMapper.xml index 1c894e8f4..a97da5c46 100644 --- a/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/mapping/LineMapper.xml +++ b/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/mapping/LineMapper.xml @@ -846,7 +846,7 @@ SELECT device.Name name, sub.Name substation, - m.Time_Id updateTime, + device.Update_Time updateTime, b.run_flag runFlag, b.com_flag comFlag, ifnull(d.flow, (select flow from cld_flow_meal where type = 0 and flag = 1)) + ifnull(d1.flow, 0) flowMeal, diff --git a/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/mapping/TerminalMaintainMapper.xml b/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/mapping/TerminalMaintainMapper.xml index d28a02770..78c6cdffe 100644 --- a/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/mapping/TerminalMaintainMapper.xml +++ b/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/mapping/TerminalMaintainMapper.xml @@ -14,7 +14,7 @@ ifnull(g.name,'/') version, ifnull(d.flow,(select flow from cld_flow_meal where type = 0 and flag = 1)) baseFlowMeal, ifnull(d1.flow,0) reamFlowMeal, - FORMAT(ifnull(mo.statis_value,0)/1024/1024,2) as statisValue + ROUND(ifnull(mo.Actual_Value,0)/1024/1024,2) statisValue FROM pq_line a INNER JOIN pq_device b ON a.id = b.id @@ -139,10 +139,11 @@ FROM IFNULL(d.flow, (select flow from cld_flow_meal where type = 0 and flag = 1)) baseFlow, IFNULL(d1.flow, 0) extendFlow, IFNULL(d.flow, (select flow from cld_flow_meal where type = 0 and flag = 1)) + IFNULL(d1.flow, 0) flowMeal - FROM cld_dev_meal c + FROM pq_line device + LEFT JOIN cld_dev_meal c ON device.id = c.Line_Id LEFT JOIN cld_flow_meal d ON c.Base_Meal_Id = d.id LEFT JOIN cld_flow_meal d1 ON c.Ream_Meal_Id = d1.id - WHERE c.Line_Id = #{devId} AND d.State =1 AND d1.State =1 + WHERE device.Id = #{devId}