| | |
| | | @Param("comMngPopulationVO") ComMngPopulationDTO comMngPopulationVO); |
| | | |
| | | /** |
| | | * 导出老人列表 |
| | | * @param comMngPopulationVO |
| | | * @return |
| | | */ |
| | | List<ComMngPopulationVO> exportOld(@Param("comMngPopulationVO") ComMngPopulationDTO comMngPopulationVO); |
| | | |
| | | /** |
| | | * 分页查询特殊群体列表 |
| | | * @param page 分页参数 |
| | | * @param pageInputUserDTO 请求参数 |
| | |
| | | @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 " |