报告模版配置联调
This commit is contained in:
@@ -842,17 +842,20 @@
|
||||
<select id="getNewDeviceFlowStatistics" resultType="LineFlowMealDetailVO">
|
||||
select t.*,
|
||||
(t.statisValue)/t.flowMeal flowProportion
|
||||
from (SELECT
|
||||
from (
|
||||
SELECT
|
||||
a.id,
|
||||
a.Name name,
|
||||
sub.Name substation,
|
||||
a.level,
|
||||
a.update_Time updateTime,
|
||||
b.run_flag runFlag,
|
||||
b.com_flag comFlag,
|
||||
b.id deviceId,
|
||||
ifnull(d.flow, (select flow from cld_flow_meal where type = 0 and flag = 1)) + ifnull(d1.flow, 0) flowMeal,
|
||||
ifnull(m.Actual_Value,0) statisValue
|
||||
ROUND(ifnull(m.Actual_Value,0)/1024/1024,2) statisValue
|
||||
FROM pq_line a
|
||||
INNER JOIN pq_line sub ON sub.id = a.pid
|
||||
INNER JOIN pq_device b ON a.id = b.id
|
||||
LEFT JOIN cld_month_flow m ON b.id = m.Dev_Id
|
||||
LEFT JOIN cld_dev_meal c ON b.id = c.line_id
|
||||
@@ -863,7 +866,7 @@
|
||||
#{item}
|
||||
</foreach>
|
||||
and
|
||||
a.Create_Time between #{startTime} and #{endTime}
|
||||
m.Time_Id between #{startTime} and #{endTime}
|
||||
and
|
||||
b.Run_Flag != 2
|
||||
) t ORDER BY flowProportion DESC
|
||||
|
||||
Reference in New Issue
Block a user