From 8788a78ad30c1bb9d50d91b10e76d3ae47ed8da2 Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期一, 07 六月 2021 09:28:23 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/test_future_wangge' into test_future_wangge --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java index 9d8f013..08c2cf9 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java @@ -96,7 +96,7 @@ List<ComMngPopulationVO> listPopulation(ComMngPopulationDTO populationVO); - @Select("select id,user_id,relationship,`name`,id_card,phone,age,health,job,create_at,update_at,card_photo_front,card_photo_back,family_book from com_mng_family_info where user_id=#{userId}") + @Select("select id,user_id,relationship,`name`,id_card,phone,age,health,job,create_at,update_at,card_photo_front,card_photo_back,family_book from com_mng_family_info where user_id=#{userId} order by create_at desc ") List<ComMngFamilyInfoVO> listFamilyByUserId(Long userId); @Select("select cmphu.popul_id,cmp.name,cmp.relation,cmp.age,cmp.phone,cmp.healthy,cmp.card_no,cmp.work_company from com_mng_population_house_user cmphu " + @@ -135,6 +135,7 @@ "cmp.census_register, \n" + "cmp.healthy, \n" + "cmp.birthday, \n" + + "cmp.update_at, \n" + "cmp.is_rent \n" + "FROM \n" + "com_mng_population AS cmp " + @@ -145,6 +146,12 @@ " </if> " + "<if test='comMngPopulationVO.actId != null'>" + " and cmp.act_id = #{comMngPopulationVO.actId} " + + " </if> " + + "<if test='comMngPopulationVO.outOrLocal != null'>" + + " and cmp.out_or_local = #{comMngPopulationVO.outOrLocal} " + + " </if> " + + "<if test='comMngPopulationVO.villageId != null'>" + + " and cmp.village_id = #{comMngPopulationVO.villageId} " + " </if> " + "<if test='comMngPopulationVO.road != null and comMngPopulationVO.road != ""'>" + "AND cmp.road = #{comMngPopulationVO.road} " + @@ -167,11 +174,11 @@ "<if test='comMngPopulationVO.sex != null and comMngPopulationVO.sex != ""'>" + "AND cmp.sex = #{comMngPopulationVO.sex} " + " </if> " + - "<if test='comMngPopulationVO.ageStart != null and comMngPopulationVO.ageStart != ""'>" + - "AND cmp.age <![CDATA[ >= ]]> #{comMngPopulationVO.ageStart} " + + "<if test='comMngPopulationVO.ageStartTime != null and comMngPopulationVO.ageStartTime != ""'>" + + "AND date_format(cmp.birthday,'%Y-%m-%d') <![CDATA[ <= ]]> #{comMngPopulationVO.ageStartTime} " + " </if> " + - "<if test='comMngPopulationVO.ageEnd != null and comMngPopulationVO.ageEnd != ""'>" + - "AND cmp.age <![CDATA[ <= ]]> #{comMngPopulationVO.ageEnd} " + + "<if test='comMngPopulationVO.ageEndTime != null and comMngPopulationVO.ageEndTime != ""'>" + + "AND date_format(cmp.birthday,'%Y-%m-%d') <![CDATA[ >= ]]> #{comMngPopulationVO.ageEndTime} " + " </if> " + "<if test='comMngPopulationVO.nativePlace != null and comMngPopulationVO.nativePlace != ""'>" + "AND cmp.native_place LIKE concat(#{comMngPopulationVO.nativePlace},'%') " + @@ -228,7 +235,7 @@ @Select("select count(id) as populationTotal " + ",(select count(id) from com_mng_population where act_id = #{communityId} and out_or_local = 1) as localTotal " + ",(select count(id) from com_mng_population where act_id = #{communityId} and out_or_local = 2) as outTotal " + - ",(select count(id) from com_mng_population where act_id = #{communityId} and label is null) as specialTotal " + + ",(select count(id) from com_mng_population where act_id = #{communityId} and label is not null) as specialTotal " + " from com_mng_population as cmp where act_id = #{communityId}") ComMngPopulationTotalVO getPopulationTotalByAdmin(@Param("communityId") Long communityId); } -- Gitblit v1.7.1