| | |
| | | + "FROM " + " event_grid_data AS egd " + "WHERE " + " egd.grid_community_id = #{communityId}") |
| | | List<EventGridStatisticsVO> getEventScreenGridData(@Param("communityId") Long communityId); |
| | | |
| | | @Select("<script> " + "SELECT " + " event_type AS type, " + " e.id AS eventId, " + " happent_lat_lng AS latLng " |
| | | @Select("<script> " + "(SELECT " + " event_type AS type, " + " e.id AS eventId, " + " happent_lat_lng AS latLng,e.create_at as createAt " |
| | | + "FROM " + " `event` AS e " + " LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id " + "WHERE " |
| | | + " e.event_category = 1 " + " AND e.event_type IN ( 1, 2, 3, 4, 5, 6 ) " + " AND e.event_status = 2 " |
| | | + " AND egd.grid_community_id = #{screenEventDTO.communityId} " |
| | |
| | | + " AND e.event_process_status = #{screenEventDTO.eventProcessStatus} " + " </if> " |
| | | + "<if test='screenEventDTO.redCard != null'>" + " AND e.red_card = #{screenEventDTO.redCard} " + " </if> " |
| | | + "<if test='screenEventDTO.yellowCard != null'>" + " AND e.yellow_card = #{screenEventDTO.yellowCard} " |
| | | + " </if> " + "UNION ALL SELECT " + " IFNULL( NULL, 7 ) AS type, " + " id AS eventId, " + " lng_lat AS latLng " |
| | | + " </if> )" + "UNION ALL (SELECT " + " IFNULL( NULL, 7 ) AS type, " + " id AS eventId, " + " lng_lat AS latLng,create_at as createAt, " |
| | | + "FROM " + " com_act_easy_photo " + "WHERE " + " community_id = #{screenEventDTO.communityId} " |
| | | + "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != ""'>" |
| | | + " AND create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " + " </if> " |
| | | + "<if test='screenEventDTO.endTime != null and screenEventDTO.endTime != ""'>" |
| | | + " AND create_at <![CDATA[<=]]> #{screenEventDTO.endTime} " + " </if> " |
| | | + "<if test='screenEventDTO.eventProcessStatus != null'>" |
| | | + " AND handle_status = #{screenEventDTO.eventProcessStatus} " + " </if> " + " </script>") |
| | | + " AND handle_status = #{screenEventDTO.eventProcessStatus} " + " </if> )" + "order by createAt desc </script>") |
| | | List<EventGridIncidentStatisticsVO> |
| | | getEventScreenEventList(@Param("screenEventDTO") BigScreenEventDTO screenEventDTO); |
| | | |