huanghongfa
2021-07-30 b200b681bc401bb11c133a79273ba78cb6ebedf8
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventMapper.xml
@@ -604,26 +604,6 @@
            </if>) AS educationNum,
         (
         SELECT
            count( id )
         FROM
            `event`
         WHERE
            event_category = 1
            AND event_type = 6
            AND event_status = 2
            AND event_process_status = 2
            AND process_date BETWEEN DATE_FORMAT( CURDATE(), '%Y-%m-%d %H:%i:%s' )
         AND NOW()
         <if test="gridId!=null">
            AND grid_id = #{gridId}
         </if>
         ) AS todaySpecialTotal,
         ( SELECT count( id ) FROM `event` WHERE event_category = 1 AND event_type = 6 AND event_status = 2 AND event_process_status = 2
            <if test="gridId!=null">
               AND grid_id = #{gridId}
            </if>) AS specialTotal,
         (
         SELECT
            count( cmph.id )
         FROM
            com_mng_population_house AS cmph
@@ -640,7 +620,7 @@
      event_visiting_tasks
      WHERE
      event_status = 2 AND submit_date BETWEEN DATE_FORMAT( CURDATE(), '%Y-%m-%d %H:%i:%s' )
      AND NOW()
      AND DATE_SUB( DATE_ADD(CURDATE(), INTERVAL 1 DAY),INTERVAL 1 SECOND)
      <if test="gridId!=null">
         AND grid_id = #{gridId}
      </if>
@@ -864,10 +844,10 @@
               AND grid_id = #{statisticsDTO.gridId}
            </if>
            <if test='statisticsDTO.startTime != null and statisticsDTO.startTime != &quot;&quot;'>
               AND create_at <![CDATA[ >= ]]> #{statisticsDTO.startTime}
               AND submit_date <![CDATA[ >= ]]> #{statisticsDTO.startTime}
            </if>
            <if test='statisticsDTO.endTime != null and statisticsDTO.endTime != &quot;&quot;'>
               AND create_at <![CDATA[ <= ]]> #{statisticsDTO.endTime}
               AND submit_date <![CDATA[ <= ]]> #{statisticsDTO.endTime}
            </if>
         ) AS eventZFTotal,
         (
@@ -1351,4 +1331,18 @@
         village_id = #{villageId}
   </select>
   <select id="getMemberBuildName" resultType="Map">
      SELECT
         cmb.`name`,egmbr.village_id
      FROM
         event_grid_member_building_relation AS egmbr
         LEFT JOIN com_mng_building AS cmb ON cmb.id = egmbr.building_id
      WHERE
         egmbr.grid_member_id = #{userId}
   </select>
   <select id="getPopulationByLabelCount" resultType="Integer">
      select count(id) from com_mng_population where label is not null and village_id = #{villageId} and floor = #{floor}
   </select>
</mapper>