|
@@ -8,7 +8,8 @@
|
|
|
select
|
|
|
count( event_status_value in ('forest_event_status_1','forest_event_status_7') OR NULL ) newReport,
|
|
|
count( event_status_value = 'forest_event_status_2' OR NULL) readySure,
|
|
|
- count( event_status_value = 'forest_event_status_5' OR event_status_value = 'forest_event_status_6' OR NULL ) readyFinish,
|
|
|
+ count( event_status_value = 'forest_event_status_5' OR event_status_value = 'forest_event_status_6' OR NULL )
|
|
|
+ readyFinish,
|
|
|
count( report_source in ('reporting_source_1','reporting_source_4') OR NULL ) aiTotal,
|
|
|
count( report_source in ('reporting_source_2','reporting_source_3') OR NULL ) otherTotal
|
|
|
from (select a.* from (
|
|
@@ -53,8 +54,10 @@
|
|
|
|
|
|
<select id="selectDeptEventCount" parameterType="VisuForestCloudMapVO"
|
|
|
resultType="VisuForestCloudMapDeptEventCountBO">
|
|
|
- select t.deptId,replace( group_concat( dept_name order by find_in_set( d.dept_id, t.ancestors ) ), ',', '' ) deptName,t.eventCount from (
|
|
|
- select a.dept_id deptId,count(*) eventCount,concat( replace( c.ancestors, '0,100', '' ), ',', c.dept_id ) ancestors from (
|
|
|
+ select t.deptId,replace( group_concat( dept_name order by find_in_set( d.dept_id, t.ancestors ) ), ',', '' )
|
|
|
+ deptName,t.eventCount from (
|
|
|
+ select a.dept_id deptId,count(*) eventCount,concat( replace( c.ancestors, '0,100', '' ), ',', c.dept_id )
|
|
|
+ ancestors from (
|
|
|
<if test="isHgj != null and isHgj == 'false'">
|
|
|
select distinct e.event_code,de.dept_id from centerevent_t_eventcatalogue e
|
|
|
left join centerevent_t_dept_event de on de.event_code = e.event_code
|
|
@@ -427,19 +430,58 @@
|
|
|
order by create_time desc
|
|
|
</select>
|
|
|
|
|
|
- <select id="getEventFileAll" resultType="VisuForestCloudMapEventListBO">
|
|
|
- select event_code eventCode,attach_path picturePath,bus_source pictureSource,file_type pictureType from (
|
|
|
- select SUBSTRING_INDEX(GROUP_CONCAT(id order by create_time),',',1) id,event_code
|
|
|
- from centerevent_t_fire_log
|
|
|
+ <select id="getHousingConstructionEventCount" parameterType="VisuForestCloudMapVO" resultType="map">
|
|
|
+ select label_1,IFNULL(label_2,0) label_2, IFNULL(label_3,0) label_3,IFNULL(label_4,0) label_4 from (
|
|
|
+ select count(*) label_1 from centerevent_t_eventcatalogue
|
|
|
+ where event_status_value in ('forest_event_status_7','forest_event_status_2','forest_event_status_5','forest_event_status_6' )
|
|
|
+ <if test="day != null and day != ''">
|
|
|
+ and DATE_FORMAT(create_time,'%Y-%m-%d') = #{day}
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null and createBy != ''">
|
|
|
+ and create_by in ( ${createBy} )
|
|
|
+ </if> and event_type = 1
|
|
|
+ ) a, (
|
|
|
+ select sum(event_type_xl in ( '1201','1202','1203','1204','1205' )) label_2, sum(event_type_xl in ( '802' )) label_3, sum(event_type_xl in ( '1206','1207' )) label_4
|
|
|
+ from (
|
|
|
+ select event_type_xl from centerevent_t_eventcatalogue
|
|
|
+ where 1=1
|
|
|
+ <if test="day != null and day != ''">
|
|
|
+ and DATE_FORMAT(create_time,'%Y-%m-%d') = #{day}
|
|
|
+ </if>
|
|
|
+ <if test="deptId != null and deptId != ''">
|
|
|
+ and create_by = #{deptId}
|
|
|
+ </if>
|
|
|
+ and event_type in (12,8)) t
|
|
|
+ ) b
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getHousingConstructionEventList" parameterType="VisuForestCloudMapVO"
|
|
|
+ resultType="VisuForestCloudMapEventListBO">
|
|
|
+ select event_code eventCode,event_name eventName,longitude,latitude,reportor,event_status
|
|
|
+ eventStatus,event_status_value eventStatusValue,create_time createTime,urge_count urgeCount,event_type_xl
|
|
|
+ eventType,report_source reportSource
|
|
|
+ from centerevent_t_eventcatalogue
|
|
|
<where>
|
|
|
- <if test="eventStatus != null and eventStatus.size > 0">
|
|
|
- and event_code in
|
|
|
- <foreach item="item" collection="eventStatus" open="(" separator="," close=")">
|
|
|
- #{item}
|
|
|
+ <if test="day != null and day != ''">
|
|
|
+ and DATE_FORMAT(create_time,'%Y-%m-%d') = #{day}
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null and createBy != ''">
|
|
|
+ and create_by in ( ${createBy} )
|
|
|
+ </if>
|
|
|
+ <if test="eventTypeIdDl != null and eventTypeIdDl.length > 0">
|
|
|
+ and event_status_value in (
|
|
|
+ 'forest_event_status_7','forest_event_status_2','forest_event_status_5','forest_event_status_6' )
|
|
|
+ and event_type in
|
|
|
+ <foreach item="eventTypeIdDl" collection="eventTypeIdDl" open="(" separator="," close=")">
|
|
|
+ #{eventTypeIdDl}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="eventTypeId != null and eventTypeId.length > 0">
|
|
|
+ and event_type_xl in
|
|
|
+ <foreach item="eventTypeId" collection="eventTypeId" open="(" separator="," close=")">
|
|
|
+ #{eventTypeId}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
</where>
|
|
|
- group by event_code) l
|
|
|
- left join ${database_data}.centerdata_t_attach f on f.bus_id = l.id
|
|
|
</select>
|
|
|
</mapper>
|