101captain
2021-12-30 e9d5fb4b01c383fa5b01bf5e730d4e3da73f266e
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventMapper.xml
@@ -243,7 +243,7 @@
      <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">
@@ -448,7 +448,7 @@
      <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 != &quot;&quot;'>
            AND (
@@ -524,7 +524,7 @@
            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}
@@ -963,7 +963,7 @@
         <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 != &quot;&quot;'>
@@ -1024,7 +1024,7 @@
         <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!= &quot;&quot;">
               AND (cmp.name like concat(#{specialPopulationDTO.keyWord},'%') or cmp.card_no_str like concat(#{specialPopulationDTO.keyWord},'%'))
@@ -1044,7 +1044,7 @@
            `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
@@ -1057,7 +1057,7 @@
            `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,
@@ -1070,13 +1070,13 @@
         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
@@ -1091,7 +1091,7 @@
            `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
@@ -1101,7 +1101,7 @@
         `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
@@ -1131,7 +1131,7 @@
         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
@@ -1148,10 +1148,10 @@
      `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 )
@@ -1159,7 +1159,7 @@
      `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 )
@@ -1167,7 +1167,7 @@
      `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>
@@ -1184,7 +1184,7 @@
            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 )
@@ -1195,7 +1195,7 @@
            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 )
@@ -1206,7 +1206,7 @@
            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 )
@@ -1217,7 +1217,7 @@
            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 )
@@ -1228,9 +1228,9 @@
            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
@@ -1238,7 +1238,7 @@
         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">
@@ -1254,7 +1254,7 @@
            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 )
@@ -1266,7 +1266,7 @@
            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 )
@@ -1278,7 +1278,7 @@
            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 )
@@ -1290,7 +1290,7 @@
            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 )
@@ -1302,9 +1302,9 @@
            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
@@ -1313,18 +1313,18 @@
         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"
@@ -1340,14 +1340,14 @@
      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">
@@ -1419,7 +1419,7 @@
        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
@@ -1433,7 +1433,7 @@
        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">