概率统计-电量指标
This commit is contained in:
@ -151,7 +151,7 @@
|
||||
</select>
|
||||
|
||||
<select id="getAllClusterInfoByStackId" parameterType="String" resultType="java.util.Map">
|
||||
select distinct t.device_id,t.device_name from ems_devices_setting t where t.parent_id = #{stackDeviceId}
|
||||
select distinct t.device_id as id,t.device_name as deviceName from ems_devices_setting t where t.parent_id = #{stackDeviceId}
|
||||
</select>
|
||||
|
||||
<select id="getAllBatteryDeviceBySiteId" parameterType="String" resultType="com.xzzn.ems.domain.EmsDevicesSetting">
|
||||
|
@ -379,6 +379,10 @@
|
||||
from ( SELECT p.site_id, p.device_id,p.date_month,p.date_day, MAX(p.data_update_time) AS max_update_time
|
||||
FROM ems_pcs_data p
|
||||
where p.site_id = #{siteId}
|
||||
<if test="startDate != null and endDate != null">
|
||||
and p.data_update_time >= #{startDate}
|
||||
and p.data_update_time < DATE_ADD(#{endDate}, INTERVAL 1 DAY)
|
||||
</if>
|
||||
GROUP BY p.site_id,p.device_id,p.date_month,p.date_day
|
||||
) latest inner join ems_pcs_data t ON latest.site_id = t.site_id
|
||||
AND latest.device_id = t.device_id
|
||||
@ -386,6 +390,6 @@
|
||||
and latest.date_month = t.date_month
|
||||
and latest.date_day = t.date_day
|
||||
group by ammeterDate
|
||||
order by ammeterDate desc
|
||||
order by ammeterDate desc;
|
||||
</select>
|
||||
</mapper>
|
Reference in New Issue
Block a user