From 3b73d233720337ce51ec40d67834360e44acf771 Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Fri, 27 Oct 2023 17:56:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A5=E4=BA=BA=E6=89=BE=E6=88=BF=E3=80=81?= =?UTF-8?q?=E4=BB=A5=E6=88=BF=E6=89=BE=E4=BA=BA=E6=8E=A5=E5=8F=A3=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=20--renpc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/api/house/HouseController.java | 1 + .../api/population/PopulationController.java | 18 + .../route/house/HouseRouteController.java | 5 + .../pojo/dtos/population/HouseUserDTO.java | 688 ++++++++++++++++++ .../pojo/dtos/population/PopulationDTO.java | 20 + .../service/house/IHouseService.java | 1 - .../population/IPopulationService.java | 16 + .../impl/PopulationServiceImpl.java | 63 ++ .../mapper/population/population-mapper.xml | 5 +- .../resources/templates/house/find-house.html | 69 ++ 10 files changed, 883 insertions(+), 3 deletions(-) create mode 100644 src/main/java/com/cm/population/pojo/dtos/population/HouseUserDTO.java create mode 100644 src/main/resources/templates/house/find-house.html diff --git a/src/main/java/com/cm/population/controller/api/house/HouseController.java b/src/main/java/com/cm/population/controller/api/house/HouseController.java index 55de270..21840f9 100644 --- a/src/main/java/com/cm/population/controller/api/house/HouseController.java +++ b/src/main/java/com/cm/population/controller/api/house/HouseController.java @@ -9,6 +9,7 @@ import com.cm.common.result.SuccessResult; import com.cm.common.result.SuccessResultData; import com.cm.common.result.SuccessResultList; import com.cm.population.pojo.dtos.house.HouseDTO; +import com.cm.population.pojo.dtos.population.PopulationDTO; import com.cm.population.pojo.vos.house.HouseVO; import com.cm.population.service.house.IHouseService; import io.swagger.annotations.*; diff --git a/src/main/java/com/cm/population/controller/api/population/PopulationController.java b/src/main/java/com/cm/population/controller/api/population/PopulationController.java index 75c5850..13cc6ee 100644 --- a/src/main/java/com/cm/population/controller/api/population/PopulationController.java +++ b/src/main/java/com/cm/population/controller/api/population/PopulationController.java @@ -8,6 +8,8 @@ import com.cm.common.result.ErrorResult; import com.cm.common.result.SuccessResult; import com.cm.common.result.SuccessResultData; import com.cm.common.result.SuccessResultList; +import com.cm.population.pojo.dtos.house.HouseDTO; +import com.cm.population.pojo.dtos.population.HouseUserDTO; import com.cm.population.pojo.dtos.population.PopulationDTO; import com.cm.population.pojo.vos.population.PopulationVO; import com.cm.population.service.population.IPopulationService; @@ -116,4 +118,20 @@ public class PopulationController extends AbstractController { return new SuccessResultData<>(populationService.hasUser(params)); } + @ApiOperation(value = "以人找房", notes = "以人找房接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("findHouse") + public List findHouse() { + Map params = requestParams(); + return populationService.findHouse(params); + } + + @ApiOperation(value = "以房找人", notes = "以房找人接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("findPopulation") + public List findPopulation() { + Map params = requestParams(); + return populationService.findPopulation(params); + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/population/controller/route/house/HouseRouteController.java b/src/main/java/com/cm/population/controller/route/house/HouseRouteController.java index dc4e480..8e6fc39 100644 --- a/src/main/java/com/cm/population/controller/route/house/HouseRouteController.java +++ b/src/main/java/com/cm/population/controller/route/house/HouseRouteController.java @@ -40,4 +40,9 @@ public class HouseRouteController extends AbstractController { return new ModelAndView("house/list-popu"); } + @GetMapping("find-house") + public ModelAndView findHouse() { + return new ModelAndView("house/find-house"); + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/population/pojo/dtos/population/HouseUserDTO.java b/src/main/java/com/cm/population/pojo/dtos/population/HouseUserDTO.java new file mode 100644 index 0000000..c56d04f --- /dev/null +++ b/src/main/java/com/cm/population/pojo/dtos/population/HouseUserDTO.java @@ -0,0 +1,688 @@ +package com.cm.population.pojo.dtos.population; + +import com.cm.population.pojo.dtos.house.HouseDTO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * + * @ClassName: PopulationInfoDTO + * @Description: 基础人口信息 + * @Author: CodeFactory + * @Date: 2023-10-24 11:55:46 + * @Version: 3.0 + **/ +@ApiModel +public class HouseUserDTO { + + @ApiModelProperty(name = "populationInfoId", value = "人口ID") + private String populationInfoId; + @ApiModelProperty(name = "name", value = "姓名") + private String name; + @ApiModelProperty(name = "idcard", value = "证件") + private String idcard; + @ApiModelProperty(name = "idcardType", value = "证件类型") + private String idcardType; + @ApiModelProperty(name = "birthday", value = "生日") + private String birthday; + @ApiModelProperty(name = "sex", value = "性别") + private String sex; + @ApiModelProperty(name = "nation", value = "民族") + private String nation; + @ApiModelProperty(name = "education", value = "文化程度") + private String education; + @ApiModelProperty(name = "description", value = "就读院校及专业(需注明学历)") + private String description; + @ApiModelProperty(name = "organization", value = "所属党派") + private String organization; + @ApiModelProperty(name = "religion", value = "宗教信仰") + private String religion; + @ApiModelProperty(name = "marriageStatus", value = "婚姻状况") + private String marriageStatus; + @ApiModelProperty(name = "marriageChangeTime", value = "婚变日期") + private String marriageChangeTime; + @ApiModelProperty(name = "marriageFirstTime", value = "初婚日期") + private String marriageFirstTime; + @ApiModelProperty(name = "socialSecurity", value = "社会保险情况") + private String socialSecurity; + @ApiModelProperty(name = "healthStatus", value = "健康状况") + private String healthStatus; + @ApiModelProperty(name = "department", value = "工作单位") + private String department; + @ApiModelProperty(name = "pastion", value = "工作职务") + private String pastion; + @ApiModelProperty(name = "pastionTitle", value = "专业技术职称") + private String pastionTitle; + @ApiModelProperty(name = "expertise", value = "专长") + private String expertise; + @ApiModelProperty(name = "phone", value = "联系电话") + private String phone; + @ApiModelProperty(name = "fatherId", value = "父亲ID") + private String fatherId; + @ApiModelProperty(name = "fatherName", value = "父亲姓名") + private String fatherName; + @ApiModelProperty(name = "fatherIdcard", value = "父亲证件") + private String fatherIdcard; + @ApiModelProperty(name = "fatherPhone", value = "父亲电话") + private String fatherPhone; + @ApiModelProperty(name = "motherId", value = "母亲ID") + private String motherId; + @ApiModelProperty(name = "motherName", value = "母亲姓名") + private String motherName; + @ApiModelProperty(name = "motherIdcard", value = "母亲证件") + private String motherIdcard; + @ApiModelProperty(name = "motherPhone", value = "母亲电话") + private String motherPhone; + @ApiModelProperty(name = "relationship", value = "与户主关系") + private String relationship; + @ApiModelProperty(name = "domicileAddress", value = "户籍地址") + private String domicileAddress; + @ApiModelProperty(name = "originAddress", value = "籍贯地址") + private String originAddress; + @ApiModelProperty(name = "flowTime", value = "流动日期") + private String flowTime; + @ApiModelProperty(name = "flowReason", value = "流动原因") + private String flowReason; + @ApiModelProperty(name = "flowReasontext", value = "其他流动原因") + private String flowReasontext; + @ApiModelProperty(name = "isOldage", value = "是否为老年人(是或否)") + private String isOldage; + @ApiModelProperty(name = "oldageType", value = "老人类别") + private String oldageType; + @ApiModelProperty(name = "oldageDepartment", value = "离退休钱单位") + private String oldageDepartment; + @ApiModelProperty(name = "oldageLift", value = "生活照料情况") + private String oldageLift; + @ApiModelProperty(name = "oldageHealthStatus", value = "健康状况") + private String oldageHealthStatus; + @ApiModelProperty(name = "oldageSelfcare", value = "生活自理能力") + private String oldageSelfcare; + @ApiModelProperty(name = "oldageLive", value = "居住状况") + private String oldageLive; + @ApiModelProperty(name = "isDisability", value = "是否为残疾人(是或否)") + private String isDisability; + @ApiModelProperty(name = "disabilityType", value = "残疾类别") + private String disabilityType; + @ApiModelProperty(name = "disabilityLevel", value = "残疾等级") + private String disabilityLevel; + @ApiModelProperty(name = "disabilityNumber", value = "残疾证号") + private String disabilityNumber; + @ApiModelProperty(name = "disabilityCarnumber", value = "残疾车牌号") + private String disabilityCarnumber; + @ApiModelProperty(name = "disabilityAddress", value = "居住地址") + private String disabilityAddress; + @ApiModelProperty(name = "disabilityIncome", value = "收入情况") + private String disabilityIncome; + @ApiModelProperty(name = "disabilityHouse", value = "住房来源") + private String disabilityHouse; + @ApiModelProperty(name = "disabilityTime", value = "办证时间") + private String disabilityTime; + @ApiModelProperty(name = "disabilityGuardian", value = "监护人或配偶姓名") + private String disabilityGuardian; + @ApiModelProperty(name = "disabilityGuardianPhone", value = "监护人联系电话") + private String disabilityGuardianPhone; + @ApiModelProperty(name = "disabilityGuardianRelation", value = "监护人关系") + private String disabilityGuardianRelation; + @ApiModelProperty(name = "isMilitary", value = "是否为军人(是或否)") + private String isMilitary; + @ApiModelProperty(name = "militaryTime", value = "批准退出现役日期") + private String militaryTime; + @ApiModelProperty(name = "militaryPosition", value = "退出现役时职级") + private String militaryPosition; + @ApiModelProperty(name = "isSuccour", value = "是否为社会救助(是或否)") + private String isSuccour; + @ApiModelProperty(name = "succourDibao", value = "低保户") + private String succourDibao; + @ApiModelProperty(name = "succourHelp", value = "医疗救助") + private String succourHelp; + @ApiModelProperty(name = "succourDifficulty", value = "困难职工") + private String succourDifficulty; + @ApiModelProperty(name = "succourSubsidy", value = "老龄补贴") + private String succourSubsidy; + @ApiModelProperty(name = "isParty", value = "是否为党员(是或否)") + private String isParty; + @ApiModelProperty(name = "partyOrganization", value = "党组织名称") + private String partyOrganization; + @ApiModelProperty(name = "partyTime", value = "入党时间") + private String partyTime; + @ApiModelProperty(name = "othertext", value = "其他说明") + private String othertext; + @ApiModelProperty(name = "houseDTO", value = "房屋详情") + private HouseDTO houseDTO; + + public String getPopulationInfoId() { + return populationInfoId == null ? "" : populationInfoId.trim(); + } + + public void setPopulationInfoId(String populationInfoId) { + this.populationInfoId = populationInfoId; + } + + public String getName() { + return name == null ? "" : name.trim(); + } + + public void setName(String name) { + this.name = name; + } + + public String getIdcard() { + return idcard == null ? "" : idcard.trim(); + } + + public void setIdcard(String idcard) { + this.idcard = idcard; + } + + public String getIdcardType() { + return idcardType == null ? "" : idcardType.trim(); + } + + public void setIdcardType(String idcardType) { + this.idcardType = idcardType; + } + + public String getBirthday() { + return birthday == null ? "" : birthday.trim(); + } + + public void setBirthday(String birthday) { + this.birthday = birthday; + } + + public String getSex() { + return sex == null ? "" : sex.trim(); + } + + public void setSex(String sex) { + this.sex = sex; + } + + public String getNation() { + return nation == null ? "" : nation.trim(); + } + + public void setNation(String nation) { + this.nation = nation; + } + + public String getEducation() { + return education == null ? "" : education.trim(); + } + + public void setEducation(String education) { + this.education = education; + } + + public String getDescription() { + return description == null ? "" : description.trim(); + } + + public void setDescription(String description) { + this.description = description; + } + + public String getOrganization() { + return organization == null ? "" : organization.trim(); + } + + public void setOrganization(String organization) { + this.organization = organization; + } + + public String getReligion() { + return religion == null ? "" : religion.trim(); + } + + public void setReligion(String religion) { + this.religion = religion; + } + + public String getMarriageStatus() { + return marriageStatus == null ? "" : marriageStatus.trim(); + } + + public void setMarriageStatus(String marriageStatus) { + this.marriageStatus = marriageStatus; + } + + public String getMarriageChangeTime() { + return marriageChangeTime == null ? "" : marriageChangeTime.trim(); + } + + public void setMarriageChangeTime(String marriageChangeTime) { + this.marriageChangeTime = marriageChangeTime; + } + + public String getMarriageFirstTime() { + return marriageFirstTime == null ? "" : marriageFirstTime.trim(); + } + + public void setMarriageFirstTime(String marriageFirstTime) { + this.marriageFirstTime = marriageFirstTime; + } + + public String getSocialSecurity() { + return socialSecurity == null ? "" : socialSecurity.trim(); + } + + public void setSocialSecurity(String socialSecurity) { + this.socialSecurity = socialSecurity; + } + + public String getHealthStatus() { + return healthStatus == null ? "" : healthStatus.trim(); + } + + public void setHealthStatus(String healthStatus) { + this.healthStatus = healthStatus; + } + + public String getDepartment() { + return department == null ? "" : department.trim(); + } + + public void setDepartment(String department) { + this.department = department; + } + + public String getPastion() { + return pastion == null ? "" : pastion.trim(); + } + + public void setPastion(String pastion) { + this.pastion = pastion; + } + + public String getPastionTitle() { + return pastionTitle == null ? "" : pastionTitle.trim(); + } + + public void setPastionTitle(String pastionTitle) { + this.pastionTitle = pastionTitle; + } + + public String getExpertise() { + return expertise == null ? "" : expertise.trim(); + } + + public void setExpertise(String expertise) { + this.expertise = expertise; + } + + public String getPhone() { + return phone == null ? "" : phone.trim(); + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public String getFatherId() { + return fatherId == null ? "" : fatherId.trim(); + } + + public void setFatherId(String fatherId) { + this.fatherId = fatherId; + } + + public String getFatherName() { + return fatherName == null ? "" : fatherName.trim(); + } + + public void setFatherName(String fatherName) { + this.fatherName = fatherName; + } + + public String getFatherIdcard() { + return fatherIdcard == null ? "" : fatherIdcard.trim(); + } + + public void setFatherIdcard(String fatherIdcard) { + this.fatherIdcard = fatherIdcard; + } + + public String getFatherPhone() { + return fatherPhone == null ? "" : fatherPhone.trim(); + } + + public void setFatherPhone(String fatherPhone) { + this.fatherPhone = fatherPhone; + } + + public String getMotherId() { + return motherId == null ? "" : motherId.trim(); + } + + public void setMotherId(String motherId) { + this.motherId = motherId; + } + + public String getMotherName() { + return motherName == null ? "" : motherName.trim(); + } + + public void setMotherName(String motherName) { + this.motherName = motherName; + } + + public String getMotherIdcard() { + return motherIdcard == null ? "" : motherIdcard.trim(); + } + + public void setMotherIdcard(String motherIdcard) { + this.motherIdcard = motherIdcard; + } + + public String getMotherPhone() { + return motherPhone == null ? "" : motherPhone.trim(); + } + + public void setMotherPhone(String motherPhone) { + this.motherPhone = motherPhone; + } + + public String getRelationship() { + return relationship == null ? "" : relationship.trim(); + } + + public void setRelationship(String relationship) { + this.relationship = relationship; + } + + public String getDomicileAddress() { + return domicileAddress == null ? "" : domicileAddress.trim(); + } + + public void setDomicileAddress(String domicileAddress) { + this.domicileAddress = domicileAddress; + } + + public String getOriginAddress() { + return originAddress == null ? "" : originAddress.trim(); + } + + public void setOriginAddress(String originAddress) { + this.originAddress = originAddress; + } + + public String getFlowTime() { + return flowTime == null ? "" : flowTime.trim(); + } + + public void setFlowTime(String flowTime) { + this.flowTime = flowTime; + } + + public String getFlowReason() { + return flowReason == null ? "" : flowReason.trim(); + } + + public void setFlowReason(String flowReason) { + this.flowReason = flowReason; + } + + public String getFlowReasontext() { + return flowReasontext == null ? "" : flowReasontext.trim(); + } + + public void setFlowReasontext(String flowReasontext) { + this.flowReasontext = flowReasontext; + } + + public String getIsOldage() { + return isOldage == null ? "" : isOldage.trim(); + } + + public void setIsOldage(String isOldage) { + this.isOldage = isOldage; + } + + public String getOldageType() { + return oldageType == null ? "" : oldageType.trim(); + } + + public void setOldageType(String oldageType) { + this.oldageType = oldageType; + } + + public String getOldageDepartment() { + return oldageDepartment == null ? "" : oldageDepartment.trim(); + } + + public void setOldageDepartment(String oldageDepartment) { + this.oldageDepartment = oldageDepartment; + } + + public String getOldageLift() { + return oldageLift == null ? "" : oldageLift.trim(); + } + + public void setOldageLift(String oldageLift) { + this.oldageLift = oldageLift; + } + + public String getOldageHealthStatus() { + return oldageHealthStatus == null ? "" : oldageHealthStatus.trim(); + } + + public void setOldageHealthStatus(String oldageHealthStatus) { + this.oldageHealthStatus = oldageHealthStatus; + } + + public String getOldageSelfcare() { + return oldageSelfcare == null ? "" : oldageSelfcare.trim(); + } + + public void setOldageSelfcare(String oldageSelfcare) { + this.oldageSelfcare = oldageSelfcare; + } + + public String getOldageLive() { + return oldageLive == null ? "" : oldageLive.trim(); + } + + public void setOldageLive(String oldageLive) { + this.oldageLive = oldageLive; + } + + public String getIsDisability() { + return isDisability == null ? "" : isDisability.trim(); + } + + public void setIsDisability(String isDisability) { + this.isDisability = isDisability; + } + + public String getDisabilityType() { + return disabilityType == null ? "" : disabilityType.trim(); + } + + public void setDisabilityType(String disabilityType) { + this.disabilityType = disabilityType; + } + + public String getDisabilityLevel() { + return disabilityLevel == null ? "" : disabilityLevel.trim(); + } + + public void setDisabilityLevel(String disabilityLevel) { + this.disabilityLevel = disabilityLevel; + } + + public String getDisabilityNumber() { + return disabilityNumber == null ? "" : disabilityNumber.trim(); + } + + public void setDisabilityNumber(String disabilityNumber) { + this.disabilityNumber = disabilityNumber; + } + + public String getDisabilityCarnumber() { + return disabilityCarnumber == null ? "" : disabilityCarnumber.trim(); + } + + public void setDisabilityCarnumber(String disabilityCarnumber) { + this.disabilityCarnumber = disabilityCarnumber; + } + + public String getDisabilityAddress() { + return disabilityAddress == null ? "" : disabilityAddress.trim(); + } + + public void setDisabilityAddress(String disabilityAddress) { + this.disabilityAddress = disabilityAddress; + } + + public String getDisabilityIncome() { + return disabilityIncome == null ? "" : disabilityIncome.trim(); + } + + public void setDisabilityIncome(String disabilityIncome) { + this.disabilityIncome = disabilityIncome; + } + + public String getDisabilityHouse() { + return disabilityHouse == null ? "" : disabilityHouse.trim(); + } + + public void setDisabilityHouse(String disabilityHouse) { + this.disabilityHouse = disabilityHouse; + } + + public String getDisabilityTime() { + return disabilityTime == null ? "" : disabilityTime.trim(); + } + + public void setDisabilityTime(String disabilityTime) { + this.disabilityTime = disabilityTime; + } + + public String getDisabilityGuardian() { + return disabilityGuardian == null ? "" : disabilityGuardian.trim(); + } + + public void setDisabilityGuardian(String disabilityGuardian) { + this.disabilityGuardian = disabilityGuardian; + } + + public String getDisabilityGuardianPhone() { + return disabilityGuardianPhone == null ? "" : disabilityGuardianPhone.trim(); + } + + public void setDisabilityGuardianPhone(String disabilityGuardianPhone) { + this.disabilityGuardianPhone = disabilityGuardianPhone; + } + + public String getDisabilityGuardianRelation() { + return disabilityGuardianRelation == null ? "" : disabilityGuardianRelation.trim(); + } + + public void setDisabilityGuardianRelation(String disabilityGuardianRelation) { + this.disabilityGuardianRelation = disabilityGuardianRelation; + } + + public String getIsMilitary() { + return isMilitary == null ? "" : isMilitary.trim(); + } + + public void setIsMilitary(String isMilitary) { + this.isMilitary = isMilitary; + } + + public String getMilitaryTime() { + return militaryTime == null ? "" : militaryTime.trim(); + } + + public void setMilitaryTime(String militaryTime) { + this.militaryTime = militaryTime; + } + + public String getMilitaryPosition() { + return militaryPosition == null ? "" : militaryPosition.trim(); + } + + public void setMilitaryPosition(String militaryPosition) { + this.militaryPosition = militaryPosition; + } + + public String getIsSuccour() { + return isSuccour == null ? "" : isSuccour.trim(); + } + + public void setIsSuccour(String isSuccour) { + this.isSuccour = isSuccour; + } + + public String getSuccourDibao() { + return succourDibao == null ? "" : succourDibao.trim(); + } + + public void setSuccourDibao(String succourDibao) { + this.succourDibao = succourDibao; + } + + public String getSuccourHelp() { + return succourHelp == null ? "" : succourHelp.trim(); + } + + public void setSuccourHelp(String succourHelp) { + this.succourHelp = succourHelp; + } + + public String getSuccourDifficulty() { + return succourDifficulty == null ? "" : succourDifficulty.trim(); + } + + public void setSuccourDifficulty(String succourDifficulty) { + this.succourDifficulty = succourDifficulty; + } + + public String getSuccourSubsidy() { + return succourSubsidy == null ? "" : succourSubsidy.trim(); + } + + public void setSuccourSubsidy(String succourSubsidy) { + this.succourSubsidy = succourSubsidy; + } + + public String getIsParty() { + return isParty == null ? "" : isParty.trim(); + } + + public void setIsParty(String isParty) { + this.isParty = isParty; + } + + public String getPartyOrganization() { + return partyOrganization == null ? "" : partyOrganization.trim(); + } + + public void setPartyOrganization(String partyOrganization) { + this.partyOrganization = partyOrganization; + } + + public String getPartyTime() { + return partyTime == null ? "" : partyTime.trim(); + } + + public void setPartyTime(String partyTime) { + this.partyTime = partyTime; + } + + public String getOthertext() { + return othertext == null ? "" : othertext.trim(); + } + + public void setOthertext(String othertext) { + this.othertext = othertext; + } + + public HouseDTO getHouseDTO() { + return houseDTO; + } + + public void setHouseDTO(HouseDTO houseDTO) { + this.houseDTO = houseDTO; + } +} diff --git a/src/main/java/com/cm/population/pojo/dtos/population/PopulationDTO.java b/src/main/java/com/cm/population/pojo/dtos/population/PopulationDTO.java index 03efe3f..e1d4322 100644 --- a/src/main/java/com/cm/population/pojo/dtos/population/PopulationDTO.java +++ b/src/main/java/com/cm/population/pojo/dtos/population/PopulationDTO.java @@ -1,5 +1,7 @@ package com.cm.population.pojo.dtos.population; +import com.cm.population.pojo.dtos.house.HouseDTO; +import com.cm.population.pojo.dtos.populationinfo.PopulationInfoDTO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -38,6 +40,10 @@ public class PopulationDTO { private String gmtModified; @ApiModelProperty(name = "isDelete", value = "") private Integer isDelete; + @ApiModelProperty(name = "houseDTO", value = "房屋详情") + private HouseDTO houseDTO; + @ApiModelProperty(name = "populationInfoDTO", value = "人口详情") + private PopulationInfoDTO populationInfoDTO; public String getPopulationId() { return populationId == null ? "" : populationId.trim(); @@ -135,5 +141,19 @@ public class PopulationDTO { this.isDelete = isDelete; } + public HouseDTO getHouseDTO() { + return houseDTO; + } + public void setHouseDTO(HouseDTO houseDTO) { + this.houseDTO = houseDTO; + } + + public PopulationInfoDTO getPopulationInfoDTO() { + return populationInfoDTO; + } + + public void setPopulationInfoDTO(PopulationInfoDTO populationInfoDTO) { + this.populationInfoDTO = populationInfoDTO; + } } diff --git a/src/main/java/com/cm/population/service/house/IHouseService.java b/src/main/java/com/cm/population/service/house/IHouseService.java index eb33674..d2ddaa4 100644 --- a/src/main/java/com/cm/population/service/house/IHouseService.java +++ b/src/main/java/com/cm/population/service/house/IHouseService.java @@ -184,5 +184,4 @@ public interface IHouseService { * @return */ Integer count(Map params); - } \ No newline at end of file diff --git a/src/main/java/com/cm/population/service/population/IPopulationService.java b/src/main/java/com/cm/population/service/population/IPopulationService.java index f93743f..faa1a95 100644 --- a/src/main/java/com/cm/population/service/population/IPopulationService.java +++ b/src/main/java/com/cm/population/service/population/IPopulationService.java @@ -3,6 +3,8 @@ package com.cm.population.service.population; import com.cm.common.pojo.ListPage; import com.cm.common.result.SuccessResultList; import com.cm.population.pojo.bos.population.PopulationBO; +import com.cm.population.pojo.dtos.house.HouseDTO; +import com.cm.population.pojo.dtos.population.HouseUserDTO; import com.cm.population.pojo.dtos.population.PopulationDTO; import com.cm.population.pojo.pos.population.PopulationPO; import com.cm.population.pojo.vos.population.PopulationVO; @@ -186,4 +188,18 @@ public interface IPopulationService { Integer count(Map params); Boolean hasUser(Map params); + + /** + * 以人找房 + * @param params + * @return + */ + List findHouse(Map params); + + /** + * 以房找人 + * @param params + * @return + */ + List findPopulation(Map params); } \ No newline at end of file diff --git a/src/main/java/com/cm/population/service/population/impl/PopulationServiceImpl.java b/src/main/java/com/cm/population/service/population/impl/PopulationServiceImpl.java index 5a81608..8b2ae58 100644 --- a/src/main/java/com/cm/population/service/population/impl/PopulationServiceImpl.java +++ b/src/main/java/com/cm/population/service/population/impl/PopulationServiceImpl.java @@ -7,13 +7,19 @@ import com.cm.common.utils.HashMapUtil; import com.cm.common.utils.UUIDUtil; import com.cm.population.dao.population.IPopulationDao; import com.cm.population.pojo.bos.population.PopulationBO; +import com.cm.population.pojo.dtos.house.HouseDTO; +import com.cm.population.pojo.dtos.population.HouseUserDTO; import com.cm.population.pojo.dtos.population.PopulationDTO; +import com.cm.population.pojo.dtos.populationinfo.PopulationInfoDTO; import com.cm.population.pojo.pos.population.PopulationPO; import com.cm.population.pojo.vos.population.PopulationVO; +import com.cm.population.service.house.IHouseService; import com.cm.population.service.population.IPopulationService; +import com.cm.population.service.populationinfo.IPopulationInfoService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -32,6 +38,10 @@ public class PopulationServiceImpl extends AbstractService implements IPopulatio @Autowired private IPopulationDao populationDao; + @Autowired + private IHouseService houseService; + @Autowired + private IPopulationInfoService populationInfoService; @Override public void save(PopulationVO populationVO) { @@ -203,4 +213,57 @@ public class PopulationServiceImpl extends AbstractService implements IPopulatio return false; } + @Override + public List findHouse(Map params) { + List populationDTOList = list(params); + if(null != populationDTOList) { + for (PopulationDTO populationDTO : populationDTOList) { + // 获取房屋详情 + HouseDTO houseDTO = houseService.get(populationDTO.getHouseId()); + if(null != houseDTO) { + populationDTO.setHouseDTO(houseDTO); + } + + // 获取人口详情 + PopulationInfoDTO populationInfoDTO = populationInfoService.get(populationDTO.getPopulationInfoId()); + if(null != populationInfoDTO) { + populationDTO.setPopulationInfoDTO(populationInfoDTO); + } + } + } + return populationDTOList; + } + + @Override + public List findPopulation(Map params) { + List overList = new ArrayList<>(); + List houseDTOList = houseService.list(params); + if(null != houseDTOList) { + for (HouseDTO houseDTO : houseDTOList) { + params.put("keywords", houseDTO.getHouseId()); + List populationDTOList = list(params); + if(null != populationDTOList) { + overList.addAll(populationDTOList); + } + } + } + + List houseUserDTOList = new ArrayList<>(); + // 获取人口详情 + for (PopulationDTO populationDTO : overList) { + PopulationInfoDTO populationInfoDTO = populationInfoService.get(populationDTO.getPopulationInfoId()); + HouseUserDTO houseUserDTO = new HouseUserDTO(); + BeanUtils.copyProperties(populationInfoDTO, houseUserDTO); + + // 获取房屋详情 + HouseDTO houseDTO = houseService.get(populationDTO.getHouseId()); + if(null != houseDTO) { + houseUserDTO.setHouseDTO(houseDTO); + } + houseUserDTOList.add(houseUserDTO); + } + + return houseUserDTOList; + } + } \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/population/population-mapper.xml b/src/main/resources/mybatis/mapper/population/population-mapper.xml index 87b5ba4..9f981b6 100644 --- a/src/main/resources/mybatis/mapper/population/population-mapper.xml +++ b/src/main/resources/mybatis/mapper/population/population-mapper.xml @@ -226,8 +226,9 @@ t1.is_delete = 0 AND ( - - t1.id LIKE CONCAT('%', #{keywords}, '%') + t1.card_num LIKE CONCAT('%', #{keywords}, '%') + OR t1.phone LIKE CONCAT('%', #{keywords}, '%') + OR t1.name LIKE CONCAT('%', #{keywords}, '%') ) diff --git a/src/main/resources/templates/house/find-house.html b/src/main/resources/templates/house/find-house.html new file mode 100644 index 0000000..175753c --- /dev/null +++ b/src/main/resources/templates/house/find-house.html @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + +
+
+
以人找房
+ +
请输入居民身份证号查询
+
+
+ + + + + + + \ No newline at end of file