zbj//大屏暂降事件负荷类型
This commit is contained in:
@@ -13,4 +13,7 @@ import java.util.Map;
|
||||
public interface LargeScreenMapper {
|
||||
|
||||
Map<String, Object> selectDownCount(@Param("lineIds") List<String> lineIds, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
|
||||
List<Map<String, Object>> selectLoadTypeCount(@Param("lineIds") List<String> lineIds, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
|
||||
}
|
||||
|
||||
@@ -6,17 +6,35 @@
|
||||
select
|
||||
count(ed.event_id) "count"
|
||||
from r_mp_event_detail ed
|
||||
left join sys_dict_data dd on ed.event_type and dd.Type_Id ='c37861896dafab0883321e1d508caa51'
|
||||
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(pl.Create_Time,'%y%m%d') >= date_format(#{startTime},'%y%m%d')
|
||||
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(pl.Create_Time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')
|
||||
and date_format(ed.create_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectLoadTypeCount" resultType="java.util.Map">
|
||||
select count(ed.event_id) "count",
|
||||
ed.measurement_point_id "id"
|
||||
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 ed.measurement_point_id
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user