| | |
| | | + "<if test='comMngPopulationVO.ageStartTime != null and comMngPopulationVO.ageEndTime != null and comMngPopulationVO.ageStartTime != comMngPopulationVO.ageEndTime'>" |
| | | + "AND cmp.birthday BETWEEN #{comMngPopulationVO.ageEndTimeEnd} and #{comMngPopulationVO.ageStartTime}" |
| | | + " </if> " |
| | | + "<if test='comMngPopulationVO.searchKey != null and comMngPopulationVO.searchKey != "" '>" |
| | | + "AND (cmp.name like concat('%',#{comMngPopulationVO.searchKey},'%') or cmp.card_no_str like concat('%',#{comMngPopulationVO.searchKey},'%') or cmp.phone like concat('%',#{comMngPopulationVO.searchKey},'%') " |
| | | + " </if> " |
| | | + "<if test='comMngPopulationVO.nativePlace != null and comMngPopulationVO.nativePlace != ""'>" |
| | | + "AND cmp.native_place LIKE concat(#{comMngPopulationVO.nativePlace},'%') " + " </if> " |
| | | + "<if test='comMngPopulationVO.nation != null and comMngPopulationVO.nation != ""'>" |
| | |
| | | + "</script>") |
| | | IPage<ComMngPopulationVO> pagePopulation(Page page, |
| | | @Param("comMngPopulationVO") ComMngPopulationDTO comMngPopulationVO); |
| | | |
| | | /** |
| | | * 导出老人列表 |
| | | * @param comMngPopulationVO |
| | | * @return |
| | | */ |
| | | List<ComMngPopulationVO> exportOld(@Param("comMngPopulationVO") ComMngPopulationDTO comMngPopulationVO); |
| | | |
| | | /** |
| | | * 分页查询特殊群体列表 |
| | |
| | | @Select("SELECT " + "(SELECT COUNT(aa.age) FROM " |
| | | + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE cmpct.community_id = ${communityId}) as aa where aa.age<= 18) as age16," |
| | | + "(SELECT COUNT(aa.age) FROM " |
| | | + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = #{communityId}) AS aa WHERE aa.age > 19 and aa.age<= 30) AS age27," |
| | | + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age > 19 and aa.age<= 30) AS age27," |
| | | + "(SELECT COUNT(aa.age) FROM " |
| | | + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age > 31 and aa.age<= 40) AS age35," |
| | | + "(SELECT COUNT(aa.age) FROM " |