From c355cd9ca0e9c1cee4687867fa87e6fe65bd3a77 Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期三, 19 五月 2021 13:18:11 +0800 Subject: [PATCH] 实有人口优化 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java | 27 ++++++++++++++++++++++++--- 1 files changed, 24 insertions(+), 3 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 91d0028..bbb6de0 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 @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.panzhihua.common.model.dtos.community.ComMngPopulationDTO; import com.panzhihua.common.model.dtos.user.PageInputUserDTO; +import com.panzhihua.common.model.vos.area.AreaAddressVO; import com.panzhihua.common.model.vos.community.ComActMessageVO; import com.panzhihua.common.model.vos.community.ComMngPopulationVO; import com.panzhihua.common.model.vos.community.PageComActMessageVO; @@ -97,8 +98,10 @@ @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}") List<ComMngFamilyInfoVO> listFamilyByUserId(Long userId); - @Select("select id,`name`,phone,relation from com_mng_population where road = #{comMngPopulationDO.road} and door_no = #{comMngPopulationDO.doorNo} and floor = #{comMngPopulationDO.floor} and unit_no = #{comMngPopulationDO.unitNo} and house_no = #{comMngPopulationDO.houseNo} and id != #{comMngPopulationDO.id}") - List<ComHouseMemberVo> listHouseMermberByUserId(@Param("comMngPopulationDO") ComMngPopulationDO comMngPopulationDO); + @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 " + + " left join com_mng_population cmp on cmp.id = cmphu.popul_id " + + " where cmphu.house_id = #{houseId} and cmphu.popul_id != #{populId}") + List<ComHouseMemberVo> listHouseMermberByUserId(@Param("houseId") Long houseId, @Param("populId") Long populId); @Select("<script> " + "SELECT\n" + @@ -130,6 +133,7 @@ "cmp.out_or_local, \n" + "cmp.census_register, \n" + "cmp.healthy, \n" + + "cmp.birthday, \n" + "cmp.is_rent \n" + "FROM \n" + "com_mng_population AS cmp " + @@ -142,10 +146,19 @@ " and cmp.act_id = #{comMngPopulationVO.actId} " + " </if> " + "<if test='comMngPopulationVO.road != null and comMngPopulationVO.road != ""'>" + - "AND cmp.road LIKE concat(#{comMngPopulationVO.road},'%') " + + "AND cmp.road = #{comMngPopulationVO.road} " + " </if> " + "<if test='comMngPopulationVO.doorNo != null and comMngPopulationVO.doorNo != ""'>" + "AND cmp.door_no = #{comMngPopulationVO.doorNo} " + + " </if> " + + "<if test='comMngPopulationVO.floor != null and comMngPopulationVO.floor != ""'>" + + "AND cmp.floor = #{comMngPopulationVO.floor} " + + " </if> " + + "<if test='comMngPopulationVO.unitNo != null and comMngPopulationVO.unitNo != ""'>" + + "AND cmp.unit_no = #{comMngPopulationVO.unitNo} " + + " </if> " + + "<if test='comMngPopulationVO.houseNo != null and comMngPopulationVO.houseNo != ""'>" + + "AND cmp.house_no = #{comMngPopulationVO.houseNo} " + " </if> " + "<if test='comMngPopulationVO.alley != null and comMngPopulationVO.alley != ""'>" + "AND cmv.alley LIKE concat(#{comMngPopulationVO.alley},'%') " + @@ -175,6 +188,7 @@ "AND cmp.remark = #{comMngPopulationVO.remark} " + " </if> " + " </where>" + + " order by cmp.create_at desc" + "</script>") IPage<ComMngPopulationVO> pagePopulation(Page page, @Param("comMngPopulationVO") ComMngPopulationDTO comMngPopulationVO); @@ -202,4 +216,11 @@ @Select("update sys_user set card_photo_front=#{vo.cardPhotoFront},card_photo_back=#{vo.cardPhotoBack},family_book=#{vo.familyBook} where user_id=#{vo.userId}") void updateSysUserElectronicFile(@Param("vo") UserElectronicFileVO vo); + + @Select("<script> " + + "select (select province_name from com_mng_struct_area_province where province_adcode = #{provinceCode}) as province," + + "(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); } -- Gitblit v1.7.1