| | |
| | | List<Map<String, Object>> selectWarningDayCountByMap(Map<String, Object> param); |
| | | |
| | | List<WarningDetail> selectByTime(@Param("startTime") String startTime, @Param("endTime") String endTime); |
| | | |
| | | List<WarningDetail> selectByTimeForYj(@Param("startTime") String startTime, @Param("endTime") String endTime); |
| | | |
| | | List<WarningDetail> selectByTimeForBj(@Param("startTime") String startTime, @Param("endTime") String endTime); |
| | | } |
| | |
| | | String startTime = ymdhms.format(begin); |
| | | String endTime = ymdhms.format(end); |
| | | |
| | | List<WarningDetail> rs = warningDetailMapper.selectByTime(startTime, endTime); |
| | | if (null == rs || rs.isEmpty()) { |
| | | return null; |
| | | } |
| | | List<WarningDetail> rs = new ArrayList<>(); |
| | | List<WarningDetail> rsYj = warningDetailMapper.selectByTimeForYj(startTime, endTime); |
| | | if (null != rsYj && rsYj.size() > 0) rs.addAll(rsYj); |
| | | |
| | | List<WarningDetail> rsBj = warningDetailMapper.selectByTimeForBj(startTime, endTime); |
| | | if (null != rsBj && rsBj.size() > 0) rs.addAll(rsBj); |
| | | |
| | | List<WarningVo> list = new ArrayList<>(); |
| | | for (WarningDetail wd : rs) { |
| | |
| | | <foreach collection="ids" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | AND c > (SELECT jcbj FROM alert_config LIMIT 1) |
| | | AND c >= (SELECT jcbj FROM alert_config LIMIT 1) |
| | | </select> |
| | | |
| | | <select id="getWarningAnalyse" resultMap="SuYuan2dResult"> |
| | |
| | | <foreach collection="ids" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | and c > (select jcyj from alert_config limit 1) and c <= (select jcbj from alert_config limit 1) |
| | | and c >= (select jcyj from alert_config limit 1) and c < (select jcbj from alert_config limit 1) |
| | | </select> |
| | | |
| | | <select id="getMonitorData" resultMap="SuYuanMonitorDataResult"> |
| | |
| | | where create_time between #{startTime} and #{endTime} |
| | | order by create_time; |
| | | </select> |
| | | |
| | | <select id="selectByTimeForYj" resultMap="WarningDetailResult"> |
| | | with rs as (select jcyj, jcbj from alert_config limit 1) |
| | | select id, table_name, su_yuan_id, location_name, 1 "type", create_time, value |
| | | from warning_detail |
| | | where create_time between #{startTime} and #{endTime} |
| | | and value >= (select jcyj from rs) and value < (select jcbj from rs) |
| | | order by value; |
| | | </select> |
| | | |
| | | <select id="selectByTimeForBj" resultMap="WarningDetailResult"> |
| | | with rs as (select jcyj, jcbj from alert_config limit 1) |
| | | select id, table_name, su_yuan_id, location_name, 0 "type", create_time, value |
| | | from warning_detail |
| | | where create_time between #{startTime} and #{endTime} |
| | | and value >= (select jcbj from rs) |
| | | order by value; |
| | | </select> |
| | | |
| | | <insert id="batchInsert"> |
| | | INSERT INTO warning_detail (table_name, su_yuan_id, location_name, type, create_time, value)VALUES |