zbj//大屏获取暂降事件最新50条数据
This commit is contained in:
@@ -18,4 +18,5 @@ public interface LargeScreenMapper {
|
||||
|
||||
List<Map<String, Object>> getTimeCount(@Param("lineIds") List<String> lineIds, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
|
||||
List<Map<String, Object>> eventLists(@Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
}
|
||||
|
||||
@@ -53,4 +53,24 @@
|
||||
</if>
|
||||
group by day
|
||||
</select>
|
||||
|
||||
<select id="eventLists" resultType="java.util.Map">
|
||||
SELECT
|
||||
ed.create_time "time",pl.`Name` "name",sdd.`Name` reason,sdd.`Name` "type",ed.feature_amplitude amplitude,ed.duration
|
||||
from r_mp_event_detail ed
|
||||
left join pq_line pl on pl.id = ed.measurement_point_id
|
||||
left join sys_dict_data sdd on sdd.id = ed.advance_reason
|
||||
left join sys_dict_data sdd2 on sdd.id = ed.advance_type
|
||||
<where>
|
||||
<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>
|
||||
</where>
|
||||
order by time desc
|
||||
limit 50
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user