| | |
| | | <where> |
| | | e.event_status != 3 AND e.event_category = 2 |
| | | <if test="pagePublicityEventDTO.communityId!=null"> |
| | | AND egd.grid_community_id = #{pagePublicityEventDTO.communityId} |
| | | AND egd.grid_community_id = ${pagePublicityEventDTO.communityId} |
| | | </if> |
| | | |
| | | <if test="pagePublicityEventDTO.revokeType!=null"> |
| | |
| | | <where> |
| | | e.event_status != 3 AND e.event_category = 1 |
| | | <if test="pageEventManageDTO.communityId!=null"> |
| | | AND egd.grid_community_id = #{pageEventManageDTO.communityId} |
| | | AND egd.grid_community_id = ${pageEventManageDTO.communityId} |
| | | </if> |
| | | <if test='pageEventManageDTO.keyWord != null and pageEventManageDTO.keyWord != ""'> |
| | | AND ( |
| | |
| | | AND ( e.revoke_type = #{pagePublicityEventCommunityDTO.revokeType} OR e.revoke_type is null ) |
| | | </if> |
| | | <if test="pagePublicityEventCommunityDTO.communityId!=null"> |
| | | AND egd.grid_community_id = #{pagePublicityEventCommunityDTO.communityId} |
| | | AND egd.grid_community_id = ${pagePublicityEventCommunityDTO.communityId} |
| | | </if> |
| | | <if test="pagePublicityEventCommunityDTO.eventDealStatus!=null"> |
| | | AND e.event_deal_status = #{pagePublicityEventCommunityDTO.eventDealStatus} |
| | |
| | | <where> |
| | | and event_status = 2 |
| | | <if test='eventListDTO.communityId != null'> |
| | | and egd.grid_community_id = #{eventListDTO.communityId} |
| | | and egd.grid_community_id = ${eventListDTO.communityId} |
| | | </if> |
| | | |
| | | <if test='eventListDTO.startTime != null and eventListDTO.startTime != ""'> |
| | |
| | | <where> |
| | | and cmpct.label IS NOT NULL |
| | | <if test='specialPopulationDTO.communityId != null'> |
| | | and cmpct.community_id = #{specialPopulationDTO.communityId} |
| | | and cmpct.community_id = ${specialPopulationDTO.communityId} |
| | | </if> |
| | | <if test="specialPopulationDTO.keyWord!=null and specialPopulationDTO.keyWord!= """> |
| | | AND (cmp.name like concat(#{specialPopulationDTO.keyWord},'%') or cmp.card_no_str like concat(#{specialPopulationDTO.keyWord},'%')) |
| | |
| | | `event` AS e1 |
| | | LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id |
| | | WHERE |
| | | egd1.grid_community_id = #{communityId} |
| | | egd1.grid_community_id = ${communityId} |
| | | AND e1.event_category = 1 |
| | | AND e1.event_process_status = 1 |
| | | AND e1.event_status = 2 |
| | |
| | | `event` AS e2 |
| | | LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id |
| | | WHERE |
| | | egd2.grid_community_id = #{communityId} |
| | | egd2.grid_community_id = ${communityId} |
| | | AND e2.event_category = 2 |
| | | AND e2.event_status = 2 |
| | | ) AS propagandaNum, |
| | |
| | | WHERE |
| | | e3.event_status = 2 |
| | | AND e3.create_at LIKE CONCAT(#{nowDate},'%')) as currentNum, |
| | | (select count(id) from com_act_easy_photo where community_id = #{communityId} and del_tag = 0 and create_at LIKE CONCAT(#{nowDate},'%')) as sspCurrentNum |
| | | (select count(id) from com_act_easy_photo where community_id = ${communityId} and del_tag = 0 and create_at LIKE CONCAT(#{nowDate},'%')) as sspCurrentNum |
| | | |
| | | FROM |
| | | `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | | WHERE |
| | | egd.grid_community_id = #{communityId} |
| | | egd.grid_community_id = ${communityId} |
| | | AND e.event_category = 1 |
| | | AND e.event_process_status = 2 |
| | | AND e.event_deal_status = 4 |
| | |
| | | `event` AS e1 |
| | | LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id |
| | | WHERE |
| | | egd1.grid_community_id = #{communityId} |
| | | egd1.grid_community_id = ${communityId} |
| | | AND e1.event_process_status = 2 |
| | | ORDER BY |
| | | e1.create_at DESC |
| | |
| | | `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | | WHERE |
| | | egd.grid_community_id = #{communityId} |
| | | egd.grid_community_id = ${communityId} |
| | | AND e.event_process_status = 2 |
| | | ORDER BY |
| | | e.create_at ASC |
| | |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | | LEFT JOIN sys_user AS su ON su.user_id = e.grid_member_id |
| | | WHERE |
| | | egd.grid_community_id = #{communityId} |
| | | egd.grid_community_id = ${communityId} |
| | | AND e.event_status = 2 |
| | | AND e.event_deal_status in (1,2,3,4,6,8) |
| | | ORDER BY |
| | |
| | | `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | | WHERE |
| | | egd.grid_community_id = #{communityId} and e.event_status = 2 AND e.create_at <![CDATA[<=]]> #{end}) AS eventTotal, |
| | | (select count(id) from com_act_easy_photo where community_id = #{communityId} and del_tag = 0 and create_at <![CDATA[<=]]> #{end}) as sspTotal, |
| | | (select count(id) from com_act_easy_photo where community_id = #{communityId} and del_tag = 0 and #{start} <![CDATA[<=]]> create_at AND create_at <![CDATA[<=]]> #{end}) as sspAdd, |
| | | (select count(id) from com_act_easy_photo where community_id = #{communityId} and handle_status = 2 and del_tag = 0 and #{start} <![CDATA[<=]]> create_at AND create_at <![CDATA[<=]]> #{end}) as sspSolve, |
| | | egd.grid_community_id = ${communityId} and e.event_status = 2 AND e.create_at <![CDATA[<=]]> #{end}) AS eventTotal, |
| | | (select count(id) from com_act_easy_photo where community_id = ${communityId} and del_tag = 0 and create_at <![CDATA[<=]]> #{end}) as sspTotal, |
| | | (select count(id) from com_act_easy_photo where community_id = ${communityId} and del_tag = 0 and #{start} <![CDATA[<=]]> create_at AND create_at <![CDATA[<=]]> #{end}) as sspAdd, |
| | | (select count(id) from com_act_easy_photo where community_id = ${communityId} and handle_status = 2 and del_tag = 0 and #{start} <![CDATA[<=]]> create_at AND create_at <![CDATA[<=]]> #{end}) as sspSolve, |
| | | ( |
| | | SELECT |
| | | COUNT( e1.id ) |
| | |
| | | `event` AS e1 |
| | | LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id |
| | | WHERE |
| | | egd1.grid_community_id = #{communityId} and e1.event_status = 2 AND #{start} <![CDATA[<=]]> e1.create_at AND e1.create_at <![CDATA[<=]]> #{end}) AS eventAdd, |
| | | egd1.grid_community_id = ${communityId} and e1.event_status = 2 AND #{start} <![CDATA[<=]]> e1.create_at AND e1.create_at <![CDATA[<=]]> #{end}) AS eventAdd, |
| | | ( |
| | | SELECT |
| | | COUNT( e2.id ) |
| | |
| | | `event` AS e2 |
| | | LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id |
| | | WHERE |
| | | egd2.grid_community_id = #{communityId} and e2.event_process_status = 2 AND #{start} <![CDATA[<=]]> e2.create_at AND e2.create_at <![CDATA[<=]]> #{end}) AS eventSolve |
| | | egd2.grid_community_id = ${communityId} and e2.event_process_status = 2 AND #{start} <![CDATA[<=]]> e2.create_at AND e2.create_at <![CDATA[<=]]> #{end}) AS eventSolve |
| | | FROM |
| | | DUAL |
| | | </select> |
| | |
| | | e1.event_category = 1 |
| | | AND e1.event_process_status = 2 |
| | | AND e1.event_type = 2 |
| | | AND egd1.grid_community_id = #{communityId} |
| | | AND egd1.grid_community_id = ${communityId} |
| | | ) AS ggTotal,( |
| | | SELECT |
| | | count( e2.id ) |
| | |
| | | e2.event_category = 1 |
| | | AND e2.event_process_status = 2 |
| | | AND e2.event_type = 3 |
| | | AND egd2.grid_community_id = #{communityId} |
| | | AND egd2.grid_community_id = ${communityId} |
| | | ) AS mdTotal,( |
| | | SELECT |
| | | count( e3.id ) |
| | |
| | | e3.event_category = 1 |
| | | AND e3.event_process_status = 2 |
| | | AND e3.event_type = 4 |
| | | AND egd3.grid_community_id = #{communityId} |
| | | AND egd3.grid_community_id = ${communityId} |
| | | ) AS bwdTotal,( |
| | | SELECT |
| | | count( e4.id ) |
| | |
| | | e4.event_category = 1 |
| | | AND e4.event_process_status = 2 |
| | | AND e4.event_type = 5 |
| | | AND egd4.grid_community_id = #{communityId} |
| | | AND egd4.grid_community_id = ${communityId} |
| | | ) AS tfTotal,( |
| | | SELECT |
| | | count( e5.id ) |
| | |
| | | e5.event_category = 1 |
| | | AND e5.event_process_status = 2 |
| | | AND e5.event_type = 6 |
| | | AND egd5.grid_community_id = #{communityId} |
| | | AND egd5.grid_community_id = ${communityId} |
| | | ) AS tsTotal, |
| | | (select count(id) from com_act_easy_photo as caep where community_id = #{communityId} and del_tag = 0 and status = 4) as sspTotal |
| | | (select count(id) from com_act_easy_photo as caep where community_id = ${communityId} and del_tag = 0 and status = 4) as sspTotal |
| | | FROM |
| | | `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | |
| | | e.event_category = 1 |
| | | AND e.event_process_status = 2 |
| | | AND e.event_type = 1 |
| | | AND egd.grid_community_id = #{communityId} |
| | | AND egd.grid_community_id = ${communityId} |
| | | </select> |
| | | |
| | | <select id="getNoComplete" resultType="com.panzhihua.common.model.vos.screen.EventTypeWorkVO"> |
| | |
| | | AND e1.event_process_status = 1 |
| | | AND e1.event_status = 2 |
| | | AND e1.event_type = 2 |
| | | AND egd1.grid_community_id = #{communityId} |
| | | AND egd1.grid_community_id = ${communityId} |
| | | ) AS ggTotal,( |
| | | SELECT |
| | | count( e2.id ) |
| | |
| | | AND e2.event_process_status = 1 |
| | | AND e2.event_status = 2 |
| | | AND e2.event_type = 3 |
| | | AND egd2.grid_community_id = #{communityId} |
| | | AND egd2.grid_community_id = ${communityId} |
| | | ) AS mdTotal,( |
| | | SELECT |
| | | count( e3.id ) |
| | |
| | | AND e3.event_process_status = 1 |
| | | AND e3.event_status = 2 |
| | | AND e3.event_type = 4 |
| | | AND egd3.grid_community_id = #{communityId} |
| | | AND egd3.grid_community_id = ${communityId} |
| | | ) AS bwdTotal,( |
| | | SELECT |
| | | count( e4.id ) |
| | |
| | | AND e4.event_process_status = 1 |
| | | AND e4.event_status = 2 |
| | | AND e4.event_type = 5 |
| | | AND egd4.grid_community_id = #{communityId} |
| | | AND egd4.grid_community_id = ${communityId} |
| | | ) AS tfTotal,( |
| | | SELECT |
| | | count( e5.id ) |
| | |
| | | AND e5.event_process_status = 1 |
| | | AND e5.event_status = 2 |
| | | AND e5.event_type = 6 |
| | | AND egd5.grid_community_id = #{communityId} |
| | | AND egd5.grid_community_id = ${communityId} |
| | | ) AS tsTotal, |
| | | (select count(id) from com_act_easy_photo as caep where community_id = #{communityId} and del_tag = 0 and status in (1,2)) as sspTotal |
| | | (select count(id) from com_act_easy_photo as caep where community_id = ${communityId} and del_tag = 0 and status in (1,2)) as sspTotal |
| | | FROM |
| | | `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | |
| | | AND e.event_process_status = 1 |
| | | AND e.event_status = 2 |
| | | AND e.event_type = 1 |
| | | AND egd.grid_community_id = #{communityId} |
| | | AND egd.grid_community_id = ${communityId} |
| | | </select> |
| | | |
| | | <select id="getSSPEventTotal" resultType="Map"> |
| | | SELECT |
| | | count( id ) as noEventSSPTotal, |
| | | ( SELECT count( id ) FROM com_act_easy_photo WHERE handle_status = 2 and del_tag = 0 AND community_id = #{communityId} ) AS eventSSPTotal |
| | | ( SELECT count( id ) FROM com_act_easy_photo WHERE handle_status = 2 and del_tag = 0 AND community_id = ${communityId} ) AS eventSSPTotal |
| | | FROM |
| | | com_act_easy_photo |
| | | WHERE |
| | | handle_status = 1 and del_tag = 0 |
| | | AND community_id = #{communityId} |
| | | AND community_id = ${communityId} |
| | | </select> |
| | | |
| | | <select id="getEventListByCommunityId" parameterType="Long" |
| | |
| | | WHERE |
| | | e.event_category = 1 |
| | | AND e.event_status = 2 |
| | | AND egd.grid_community_id = #{communityId} |
| | | AND egd.grid_community_id = ${communityId} |
| | | AND e.event_deal_status IN (1,2,3,4) |
| | | union all |
| | | select id,7 as type,lng_lat as latLng,handle_status as status from com_act_easy_photo as caep where community_id = #{communityId} and lng_lat is not null |
| | | select id,7 as type,lng_lat as latLng,handle_status as status from com_act_easy_photo as caep where community_id = ${communityId} and lng_lat is not null |
| | | </select> |
| | | |
| | | <select id="getCivilScreenVillageList" parameterType="Long" resultType="com.panzhihua.common.model.vos.community.screen.civil.CivilVillageStatisticsVO"> |
| | | SELECT `NAME`, user_sum, lng, lat, village_images, village_id FROM com_mng_village AS cmv WHERE community_id = #{communityId} |
| | | SELECT `NAME`, user_sum, lng, lat, village_images, village_id FROM com_mng_village AS cmv WHERE community_id = ${communityId} |
| | | </select> |
| | | |
| | | <select id="getVillagePopulationTotal" parameterType="Long" resultType="com.panzhihua.common.model.vos.screen.ScreenDrawEventPopulationTotalVO"> |
| | |
| | | ELSE 2 END `status` |
| | | 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, 5, 6 ) AND e.event_status = 2 AND egd.grid_community_id = #{communityId} |
| | | WHERE e.event_category = 1 AND e.event_type IN ( 1, 2, 3, 5, 6 ) AND e.event_status = 2 AND egd.grid_community_id = ${communityId} |
| | | UNION ALL SELECT |
| | | CASE |
| | | WHEN classify_id = 4 THEN 1 |
| | |
| | | CASE |
| | | WHEN handle_status = 2 THEN 1 |
| | | ELSE 2 END `status` |
| | | FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8) |
| | | FROM com_act_easy_photo WHERE community_id = ${communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8) |
| | | </select> |
| | | <select id="getVillagePopulationTotalNew" |
| | | resultType="com.panzhihua.common.model.vos.screen.ScreenDrawEventPopulationTotalVO"> |