| | |
| | | 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.ComMngPopulationDO; |
| | | import com.panzhihua.service_community.model.dos.ComMngPopulationHouseDO; |
| | | import org.apache.ibatis.annotations.Insert; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | |
| | | @Mapper |
| | | public interface ComMngPopulationHouseDAO extends BaseMapper<ComMngPopulationHouseDO> { |
| | | |
| | | @Select("select cmphu.house_id,cmph.address,cmph.status from com_mng_population_house_user cmphu " + |
| | | @Select("select cmphu.house_id,cmph.address,cmph.status,cmphu.popul_id,cmphu.popul_id,cmphu.relation_id,cmphu.relation from com_mng_population_house_user cmphu " + |
| | | " left join com_mng_population_house as cmph on cmph.id = cmphu.house_id " + |
| | | " where cmphu.popul_id = #{populId}") |
| | | List<ComMngHouseVo> getPopulHouseListByPopulId(@Param("populId")Long populId); |
| | | |
| | | @Select("<script> " + |
| | | "select id as houseId,cmv.alley from com_mng_population_house as cmph left join com_mng_village as cmv on cmv.village_id = cmph.village_id where cmph.community_id = #{communityId}" + |
| | | "<if test='villageId != null'>" + |
| | | "<if test='villageId != null and villageId != ""'>" + |
| | | "and cmv.village_id = #{villageId}" + |
| | | " </if> " + |
| | | " </script>") |
| | |
| | | " AND cmv.alley = #{populationHouseAdminDTO.road} " + |
| | | " </if> " + |
| | | "<if test='populationHouseAdminDTO.doorNo != null and populationHouseAdminDTO.doorNo != "" '>" + |
| | | " AND cmv.houseNum = #{populationHouseAdminDTO.doorNo} " + |
| | | " AND cmv.house_num = #{populationHouseAdminDTO.doorNo} " + |
| | | " </if> " + |
| | | "<if test='populationHouseAdminDTO.floor != null and populationHouseAdminDTO.floor != "" '>" + |
| | | " AND cmph.floor = #{populationHouseAdminDTO.floor} " + |
| | |
| | | " </if> " + |
| | | "<if test='populationHouseAdminDTO.villageId != null'>" + |
| | | " and cmph.village_id = #{populationHouseAdminDTO.villageId} " + |
| | | " </if> " + |
| | | "<if test='populationHouseAdminDTO.address != null and populationHouseAdminDTO.address != "" '>" + |
| | | " AND cmph.address = #{populationHouseAdminDTO.address} " + |
| | | " </if> " + |
| | | " </where>" + |
| | | " order by update_at desc" + |
| | |
| | | " cmphu.id as housePopulationId, " + |
| | | " cmp.sex, " + |
| | | " cmp.`name`, " + |
| | | " cmp.phone, " + |
| | | " IFNULL( cmp.phone, '暂无' ) as phone, " + |
| | | " cmp.card_no, " + |
| | | " cmp.label, " + |
| | | " cmp.address, " + |
| | |
| | | " </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); |
| | | |
| | | @Insert("<script> " + |
| | | "insert into com_mng_population_house(`id`,`street_id`,`community_id`,`village_id`" + |
| | | ",`alley`,`house_num`,`unit_no`,`floor`,`house_no`,`code`,`address`,`status`" + |
| | | ",`purpose`,`control_status`,`is_empty`,`construct_purpose`,`construct_area`" + |
| | | ",`path`,`create_at`) values " + |
| | | "<foreach collection=\"houseList\" item=\"item\" index=\"index\" separator=\",\">\n" + |
| | | " (#{item.id},#{item.streetId},#{item.communityId},#{item.villageId}" + |
| | | ",#{item.alley},#{item.houseNum},#{item.unitNo},#{item.floor}" + |
| | | ",#{item.houseNo},#{item.code},#{item.address},#{item.status}" + |
| | | ",#{item.purpose},#{item.controlStatus},#{item.isEmpty},#{item.constructPurpose}" + |
| | | ",#{item.constructArea},#{item.path},now())" + |
| | | " </foreach>" + |
| | | " </script>") |
| | | void insertAll(@Param("houseList") List<ComMngPopulationHouseDO> houseList); |
| | | } |