zbj//大屏暂降事件时间统计
This commit is contained in:
@@ -16,4 +16,6 @@ public interface LargeScreenMapper {
|
||||
|
||||
List<Map<String, Object>> selectLoadTypeCount(@Param("lineIds") List<String> lineIds, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
|
||||
List<Map<String, Object>> getTimeCount(@Param("lineIds") List<String> lineIds, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
|
||||
}
|
||||
|
||||
@@ -37,4 +37,20 @@
|
||||
</if>
|
||||
group by ed.measurement_point_id
|
||||
</select>
|
||||
|
||||
<select id="getTimeCount" resultType="java.util.Map">
|
||||
select
|
||||
date(ed.create_time) "day", count(*) "count"
|
||||
from r_mp_event_detail ed where ed.measurement_point_id in
|
||||
<foreach collection="lineIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
and date_format(ed.create_time,'%y%m%d') >= date_format(#{startTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
and date_format(ed.create_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')
|
||||
</if>
|
||||
group by day
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user