冀北地图信息开发

This commit is contained in:
zhuxinyu
2023-05-10 16:06:11 +08:00
parent 1458f9425b
commit bf52617a24
12 changed files with 488 additions and 14 deletions

View File

@@ -852,28 +852,28 @@
ROUND(SUM(t.statisValue)/flowMeal,2) flowProportion
from (
SELECT
device.id id,
device.Name name,
sub.Name substation,
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,
ROUND(ifnull(m.Actual_Value,0)/1024/1024,2) statisValue
device.id id,
device.Name name,
sub.Name substation,
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,
ROUND(ifnull(m.Actual_Value,0)/1024/1024,2) statisValue
FROM cld_month_flow m
INNER JOIN pq_line device ON device.id=m.Dev_Id
INNER JOIN pq_device b ON device.id=b.id
INNER JOIN pq_line sub ON device.pid = sub.id
LEFT JOIN cld_dev_meal c ON b.id = c.line_id
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 device.id in
<foreach item="item" collection="devs" separator="," open="(" close=")">
WHERE m.Dev_Id IN
<foreach collection="devs" item="item" separator="," open="(" close=")">
#{item}
</foreach>
and
m.Time_Id between #{startTime} and #{endTime}
and
AND
device.Update_Time between #{startTime} and #{endTime}
AND
b.Run_Flag != 2
) t
GROUP BY t.id