huanghongfa
2021-07-22 02f18587bd8860b305e2c688e20465be166bb48c
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationHouseDAO.java
@@ -9,6 +9,7 @@
import com.panzhihua.common.model.vos.grid.ComMngVillageBuildingHouseDetailVO;
import com.panzhihua.common.model.vos.grid.ComMngVillageBuildingHouseVO;
import com.panzhihua.common.model.vos.grid.PopulationListVO;
import com.panzhihua.common.model.vos.grid.admin.ComMngSubordinateVO;
import com.panzhihua.common.model.vos.user.ComMngHouseVo;
import com.panzhihua.service_community.model.dos.ComMngPopulationHouseDO;
import org.apache.ibatis.annotations.Mapper;
@@ -141,7 +142,7 @@
            " AND cmv.alley = #{populationHouseAdminDTO.road}  " +
            " </if> " +
            "<if test='populationHouseAdminDTO.doorNo != null and populationHouseAdminDTO.doorNo != &quot;&quot; '>" +
            " AND cmv.houseNum = #{populationHouseAdminDTO.doorNo}  " +
            " AND cmv.house_num = #{populationHouseAdminDTO.doorNo}  " +
            " </if> " +
            "<if test='populationHouseAdminDTO.floor != null and populationHouseAdminDTO.floor != &quot;&quot; '>" +
            " AND cmph.floor = #{populationHouseAdminDTO.floor}  " +
@@ -154,6 +155,9 @@
            " </if> " +
            "<if test='populationHouseAdminDTO.villageId != null'>" +
            " and cmph.village_id = #{populationHouseAdminDTO.villageId} " +
            " </if> " +
            "<if test='populationHouseAdminDTO.address != null and populationHouseAdminDTO.address != &quot;&quot; '>" +
            " AND cmph.address = #{populationHouseAdminDTO.address}  " +
            " </if> " +
            " </where>" +
            " order by update_at desc" +
@@ -221,7 +225,7 @@
            " cmphu.id as housePopulationId, " +
            " cmp.sex, " +
            " cmp.`name`, " +
            " cmp.phone, " +
            " IFNULL( cmp.phone, '暂无' ) as phone, " +
            " cmp.card_no, " +
            " cmp.label, " +
            " cmp.address, " +
@@ -242,4 +246,12 @@
            " </script>")
    List<PopulationListVO> getGridVillageBuildingPopulationList(@Param("houseId") Long houseId,@Param("relation") Integer relation,@Param("relationId") Integer relationId);
    @Select("select id as houseId,floor from com_mng_population_house where village_id = #{villageId} order by create_at asc")
    List<ComMngSubordinateVO> getHouseLevelByFloors(@Param("villageId") Long villageId);
    @Select("select id as houseId,unit_no from com_mng_population_house where village_id = #{villageId} and floor = #{floor} order by create_at asc")
    List<ComMngSubordinateVO> getHouseLevelByUnitNos(@Param("villageId") Long villageId,@Param("floor") String floor);
    @Select("select id as houseId,house_no from com_mng_population_house where village_id = #{villageId} and floor = #{floor} and unit_no = #{unitNo} order by create_at asc")
    List<ComMngSubordinateVO> getHouseLevelByHouseNos(@Param("villageId") Long villageId,@Param("floor") String floor,@Param("unitNo") String unitNo);
}