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}