| | |
| | | "cmp.act_id, " + |
| | | "cmp.village_id, " + |
| | | "cmp.sex, " + |
| | | "cmp.age, " + |
| | | "cmp.card_no, " + |
| | | "cmp.road, " + |
| | | "cmp.door_no, " + |
| | |
| | | "cmp.native_place, " + |
| | | "cmp.nation, " + |
| | | "cmp.label, " + |
| | | "cmp.relation, " + |
| | | "cmp.marriage, " + |
| | | "cmp.culture_level, " + |
| | | "cmp.out_or_local, " + |
| | |
| | | "cmp.healthy, " + |
| | | "cmp.birthday, " + |
| | | "cmp.update_at, " + |
| | | "cmp.address, " + |
| | | "cmp.is_rent " + |
| | | "FROM " + |
| | | "com_mng_population AS cmp " + |
| | |
| | | "<where>" + |
| | | "<if test='comMngPopulationVO.name != null and comMngPopulationVO.name != ""'>" + |
| | | "AND cmp.`name` LIKE concat(#{comMngPopulationVO.name},'%') " + |
| | | " </if> " + |
| | | "<if test='comMngPopulationVO.label != null and comMngPopulationVO.label != ""'>" + |
| | | "AND cmp.label LIKE concat('%',#{comMngPopulationVO.label},'%') " + |
| | | " </if> " + |
| | | "<if test='comMngPopulationVO.actId != null'>" + |
| | | " and cmp.act_id = #{comMngPopulationVO.actId} " + |
| | |
| | | "<if test='comMngPopulationVO.remark != null and comMngPopulationVO.remark != ""'>" + |
| | | "AND cmp.remark = #{comMngPopulationVO.remark} " + |
| | | " </if> " + |
| | | "<if test='comMngPopulationVO.address != null and comMngPopulationVO.address != ""'>" + |
| | | "AND cmp.address like concat('%', #{comMngPopulationVO.address}, '%') " + |
| | | " </if> " + |
| | | " </where>" + |
| | | " order by cmp.create_at desc" + |
| | | "</script>") |
| | |
| | | "</script>") |
| | | IPage<InputUserInfoVO> specialInputUser(Page page, @Param("pageInputUserDTO") PageInputUserDTO pageInputUserDTO); |
| | | |
| | | @Select("<script> " + |
| | | "select id,tag_name,community_id,create_at,sys_flag from com_mng_user_tag where community_id = #{comMngUserTagDTO.communityId}" + |
| | | "<if test='comMngUserTagDTO.tagName != null and comMngUserTagDTO.tagName != ""'>" + |
| | | " AND tag_name LIKE concat(#{comMngUserTagDTO.tagName},'%') " + |
| | | " </if> " + |
| | | " order by create_at desc " + |
| | | "</script>") |
| | | IPage<ComMngTagVO> specialInputUserTags(Page page, @Param("comMngUserTagDTO") PageInputUserDTO comMngUserTagDTO); |
| | | |
| | | @Select("select user_id,card_photo_front,card_photo_back,family_book from sys_user where id_card=#{idCard}") |
| | | UserElectronicFileVO getSysUserElectronicFile(@Param("idCard") String idCard); |
| | | |
| | |
| | | "(select city_name from com_mng_struct_area_city where city_adcode = #{cityCode}) as city," + |
| | | "(select district_name from com_mng_struct_area_district where district_adcode = #{districtCode}) as district" + |
| | | "</script>") |
| | | AreaAddressVO getAreaAddress(@Param("provinceCode") String provinceCode,@Param("cityCode") String cityCode,@Param("districtCode") String districtCode); |
| | | AreaAddressVO getAreaAddress(@Param("provinceCode") String provinceCode, @Param("cityCode") String cityCode, @Param("districtCode") String districtCode); |
| | | |
| | | @Select("select count(id) as populationTotal " + |
| | | ",(select count(id) from com_mng_population where act_id = #{communityId} and out_or_local = 1) as localTotal " + |
| | |
| | | " egd.grid_community_id = #{screenEventDTO.communityId} " + |
| | | " </script>") |
| | | EventLeftTopStatisticsVO getEventScreenLeftTop(@Param("screenEventDTO") BigScreenEventDTO screenEventDTO); |
| | | |
| | | |
| | | @Select("SELECT " + |
| | | " DATE_FORMAT( e.create_at, '%m' ) months " + |
| | |
| | | " LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id " + |
| | | "WHERE " + |
| | | " egd.grid_community_id = #{screenEventDTO.communityId} " + |
| | | " AND event_category = 1 " + |
| | | " AND event_type = 1 " + |
| | | " AND event_status = 2 " + |
| | | "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != ""'>" + |
| | | " AND e.create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " + |
| | |
| | | " </if> " + |
| | | " </script>") |
| | | EventLeftDownStatisticsVO getEventScreenLeftDown(@Param("screenEventDTO") BigScreenEventDTO screenEventDTO); |
| | | |
| | | |
| | | @Select("SELECT " + |
| | | " su.nick_name AS userName, " + |
| | |
| | | " AND e.create_at <![CDATA[<=]]> #{screenEventDTO.endTime} " + |
| | | " </if> " + |
| | | "UNION ALL SELECT " + |
| | | " AND egd.grid_community_id = #{screenEventDTO.communityId} " + |
| | | " AND e.create_at >= DATE_SUB(CURDATE(),INTERVAL 30 DAY) UNION ALL " + |
| | | "SELECT " + |
| | | " IFNULL( NULL, 7 ) AS type, " + |
| | | " id AS eventId, " + |
| | | " lng_lat AS latLng " + |
| | |
| | | " com_act_easy_photo " + |
| | | "WHERE " + |
| | | " community_id = #{screenEventDTO.communityId} " + |
| | | " AND del_tag = 0 " + |
| | | " AND lng_lat IS NOT NULL " + |
| | | "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != ""'>" + |
| | | " AND create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " + |
| | | " </if> " + |
| | |
| | | " </script>") |
| | | List<EventGridIncidentStatisticsVO> getEventScreenEventList(@Param("screenEventDTO") BigScreenEventDTO screenEventDTO); |
| | | |
| | | |
| | | @Select("SELECT " + |
| | | " count( id ) AS specialTotal, " + |
| | | " ( SELECT count( id ) FROM com_mng_population WHERE label IS NOT NULL AND act_id = #{communityId} AND create_at < #{lastMonth} ) AS toMonthSpecialTotal " + |
| | |
| | | "WHERE " + |
| | | " label IS NOT NULL " + |
| | | " AND act_id = #{communityId}") |
| | | CivilPopulationStatisticsVO getCivilScreenPopulation(@Param("communityId") Long communityId,@Param("lastMonth") Date lastMonth); |
| | | CivilPopulationStatisticsVO getCivilScreenPopulation(@Param("communityId") Long communityId, @Param("lastMonth") Date lastMonth); |
| | | |
| | | @Select("SELECT `NAME`, " + |
| | | " user_sum, " + |
| | |
| | | CivilVillageStatisticsVO getCivilScreenVillageStatistics(@Param("villageId") Long villageId); |
| | | |
| | | |
| | | @Select("SELECT COUNT(id) AS man,(SELECT COUNT(id) FROM com_mng_population WHERE sex = 2 AND act_id = #{communityId}) AS woman FROM com_mng_population WHERE sex = 1 AND act_id = #{communityId}") |
| | | @Select("SELECT COUNT(id) AS man,(SELECT COUNT(id) FROM com_mng_population WHERE sex = 2 AND act_id = #{communityId}) AS woman FROM com_mng_population WHERE sex = 1 AND act_id = #{communityId}") |
| | | Map<String, Long> countBySex(@Param("communityId") Long communityId); |
| | | |
| | | @Select( |
| | |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, birthday, CURDATE()) ) AS age FROM com_mng_population WHERE act_id = #{communityId}) AS aa WHERE aa.age > 45 and aa.age<= 55) AS age55," + |
| | | "(SELECT COUNT(aa.age) FROM " + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, birthday, CURDATE()) ) AS age FROM com_mng_population WHERE act_id = #{communityId}) AS aa WHERE aa.age > 55) AS age55over") |
| | | Map<String, Long> countByAge(@Param("communityId")Long communityId); |
| | | Map<String, Long> countByAge(@Param("communityId") Long communityId); |
| | | |
| | | @Select("SELECT COUNT(id)AS xx," + |
| | | "(SELECT COUNT(id) FROM com_mng_population WHERE culture_level = 2 AND act_id = #{communityId}) as cz," + |
| | |
| | | "(SELECT COUNT(id) FROM com_mng_population WHERE culture_level = 8 AND act_id = #{communityId}) as bs," + |
| | | "(SELECT COUNT(id) FROM com_mng_population WHERE culture_level = 9 AND act_id = #{communityId}) as qt" + |
| | | " FROM com_mng_population WHERE culture_level = 1 AND act_id = #{communityId}") |
| | | Map<String, Long> countByCulture(@Param("communityId")Long communityId); |
| | | Map<String, Long> countByCulture(@Param("communityId") Long communityId); |
| | | |
| | | @Select("select count(user_id) from sys_user where community_id = #{communityId} and type = 1") |
| | | Long countUsedCommunityPopulation(@Param("communityId")Long communityId); |
| | | Long countUsedCommunityPopulation(@Param("communityId") Long communityId); |
| | | |
| | | @Select( |
| | | "SELECT " + |
| | |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, birthday, CURDATE()) ) AS age FROM com_mng_population WHERE act_id = #{communityId}) AS aa WHERE aa.age > 45 and aa.age<= 55) AS age55," + |
| | | "(SELECT COUNT(aa.age) FROM " + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, birthday, CURDATE()) ) AS age FROM com_mng_population WHERE act_id = #{communityId}) AS aa WHERE aa.age > 55) AS age55over") |
| | | Map<String, Long> indexCountByAge(@Param("communityId")Long communityId); |
| | | Map<String, Long> indexCountByAge(@Param("communityId") Long communityId); |
| | | |
| | | |
| | | @Select("SELECT " + |
| | |
| | | " LEFT JOIN sys_user AS su ON su.user_id = caep.sponsor_id " + |
| | | "WHERE " + |
| | | " id = #{eventId}") |
| | | EventNewStatisticsVO getEventScreenSSPDateil(@Param("eventId")Long eventId); |
| | | EventNewStatisticsVO getEventScreenSSPDateil(@Param("eventId") Long eventId); |
| | | |
| | | @Select("SELECT " + |
| | | " su.nick_name AS userName, " + |
| | |
| | | "AND population.eventStatus = #{populationListDTO.eventStatus} " + |
| | | " </if> " + |
| | | " </script>") |
| | | IPage<ComMngPopulationListVO> getGridPopulationAdminList(Page page,@Param("populationListDTO") ComMngPopulationListDTO populationListDTO); |
| | | IPage<ComMngPopulationListVO> getGridPopulationAdminList(Page page, @Param("populationListDTO") ComMngPopulationListDTO populationListDTO); |
| | | |
| | | @Select("select relation from com_mng_population_house_user where house_id = #{houseId} and popul_id = #{populationId}") |
| | | Integer getPopulationRelationByHouseId(@Param("houseId") Long houseId, @Param("populationId") Long populationId); |
| | |
| | | "</foreach>" + |
| | | " </if> " + |
| | | " </script>") |
| | | IPage<EventSpecialPopulationVO> getBuildingHousePopulationList(Page page,@Param("populationDTO") PageComMngPopulationDTO populationDTO); |
| | | IPage<EventSpecialPopulationVO> getBuildingHousePopulationList(Page page, @Param("populationDTO") PageComMngPopulationDTO populationDTO); |
| | | |
| | | @Select("<script> " + |
| | | "SELECT " + |
| | |
| | | " AND label like concat ('%',#{villagePopulationDTO.label},'%') " + |
| | | " </if> " + |
| | | " </script>") |
| | | IPage<ComMngVillagePopulationListVO> getVillagePopulationAdmin(Page page,@Param("villagePopulationDTO") PageComMngVillagePopulationDTO villagePopulationDTO); |
| | | IPage<ComMngVillagePopulationListVO> getVillagePopulationAdmin(Page page, @Param("villagePopulationDTO") PageComMngVillagePopulationDTO villagePopulationDTO); |
| | | |
| | | } |
| | | |