| | |
| | | <if test="violationsTypeId !=null"> |
| | | and uv.grade_id = #{violationsTypeId} |
| | | </if> |
| | | <if test="videoId !=null"> |
| | | and uv.video_point_id = #{videoId} |
| | | </if> |
| | | </where> |
| | | |
| | | order by id desc |
| | | </select> |
| | | |
| | | <select id="listIllegalBuildingsPage" resultType="com.ycl.vo.casePool.CasePoolIllegalBuildingVO"> |
| | |
| | | and ubc.category=#{type} |
| | | </if> |
| | | </where> |
| | | |
| | | order by ubc.id desc |
| | | </select> |
| | | |
| | | |
| | |
| | | </select> |
| | | |
| | | <select id="dayCount" resultType="java.lang.Integer"> |
| | | select count(1) |
| | | from ums_base_case |
| | | where to_days(create_time) = TO_DAYS(now()); |
| | | SELECT |
| | | count(1) |
| | | FROM |
| | | ums_base_case |
| | | WHERE |
| | | create_time BETWEEN CONCAT( CURDATE(), ' 00:00:00' ) |
| | | AND CONCAT( CURDATE(), ' 23:59:59' ); |
| | | </select> |
| | | <select id="weekCount" resultType="java.lang.Integer"> |
| | | select count(1) |
| | | from ums_base_case |
| | | WHERE YEARWEEK(date_format(create_time, '%Y-%m-%d')) = YEARWEEK(now());; |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | ums_base_case |
| | | WHERE |
| | | YEARWEEK( |
| | | date_format( create_time, '%Y-%m-%d' ), 1) = YEARWEEK( |
| | | now(), 1); |
| | | </select> |
| | | <select id="dispatchCount" resultType="java.lang.Integer"> |
| | | select count(1) |
| | |
| | | t1.alarm_time, |
| | | t1.longitude, |
| | | t1.latitude, |
| | | -- ( CASE WHEN t1.category = 1 THEN "违规" WHEN t1.category = 2 THEN "违建" ELSE "其他" END ) AS type, |
| | | -- ( CASE WHEN t1.event_source = 1 THEN "视频巡查" WHEN t1.event_source = 2 THEN "网格巡查" ELSE "其他" END ) AS |
| | | alarmAdvice, |
| | | dd.name AS type, |
| | | ( CASE WHEN t1.event_source = 1 THEN "视频巡查" WHEN t1.event_source = 2 THEN "网格巡查" ELSE "其他" END ) AS source, |
| | | t1.site AS address, |
| | |
| | | FROM |
| | | ums_violations t1 |
| | | LEFT JOIN ums_data_dictionary t2 |
| | | ON t1.category_id = t2.id |
| | | ON t1.grade_id = t2.id |
| | | GROUP BY |
| | | t1.category_id |
| | | t1.grade_id |
| | | ORDER BY COUNT(1) desc |
| | | </select> |
| | | |
| | | <select id="selectLastMonthCount" resultType="java.lang.Long"> |