| | |
| | | </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 |
| | |
| | | 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> |
| | |
| | | AND grid_id = #{statisticsDTO.gridId} |
| | | </if> |
| | | <if test='statisticsDTO.startTime != null and statisticsDTO.startTime != ""'> |
| | | AND create_at <![CDATA[ >= ]]> #{statisticsDTO.startTime} |
| | | AND submit_date <![CDATA[ >= ]]> #{statisticsDTO.startTime} |
| | | </if> |
| | | <if test='statisticsDTO.endTime != null and statisticsDTO.endTime != ""'> |
| | | AND create_at <![CDATA[ <= ]]> #{statisticsDTO.endTime} |
| | | AND submit_date <![CDATA[ <= ]]> #{statisticsDTO.endTime} |
| | | </if> |
| | | ) AS eventZFTotal, |
| | | ( |
| | |
| | | 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> |