以人找房、以房找人接口提交 --renpc

This commit is contained in:
Renpc-kilig 2023-10-27 17:56:35 +08:00
parent 9a268ce8e6
commit 3b73d23372
10 changed files with 883 additions and 3 deletions

View File

@ -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.*;

View File

@ -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<PopulationDTO> findHouse() {
Map<String, Object> params = requestParams();
return populationService.findHouse(params);
}
@ApiOperation(value = "以房找人", notes = "以房找人接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("findPopulation")
public List<HouseUserDTO> findPopulation() {
Map<String, Object> params = requestParams();
return populationService.findPopulation(params);
}
}

View File

@ -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");
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -184,5 +184,4 @@ public interface IHouseService {
* @return
*/
Integer count(Map<String, Object> params);
}

View File

@ -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<String, Object> params);
Boolean hasUser(Map<String, Object> params);
/**
* 以人找房
* @param params
* @return
*/
List<PopulationDTO> findHouse(Map<String, Object> params);
/**
* 以房找人
* @param params
* @return
*/
List<HouseUserDTO> findPopulation(Map<String, Object> params);
}

View File

@ -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<PopulationDTO> findHouse(Map<String, Object> params) {
List<PopulationDTO> 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<HouseUserDTO> findPopulation(Map<String, Object> params) {
List<PopulationDTO> overList = new ArrayList<>();
List<HouseDTO> houseDTOList = houseService.list(params);
if(null != houseDTOList) {
for (HouseDTO houseDTO : houseDTOList) {
params.put("keywords", houseDTO.getHouseId());
List<PopulationDTO> populationDTOList = list(params);
if(null != populationDTOList) {
overList.addAll(populationDTOList);
}
}
}
List<HouseUserDTO> 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;
}
}

View File

@ -226,8 +226,9 @@
t1.is_delete = 0
<if test="keywords != null and keywords != ''">
AND (
<!-- 这里添加其他条件 -->
t1.id LIKE CONCAT('%', #{keywords}, '%')
t1.card_num LIKE CONCAT('%', #{keywords}, '%')
OR t1.phone LIKE CONCAT('%', #{keywords}, '%')
OR t1.name LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="startTime != null and startTime != ''">

View File

@ -0,0 +1,69 @@
<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<base th:href="${#request.getContextPath() + '/'}">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<style>
*{padding:0;margin:0;}
.container{position: absolute;top:1000%;left:50%;transform: translate(-50%,-50%);}
.title{text-align: center;font-size: 28px;color: #000;margin-bottom: 20px;}
.search{overflow: hidden;white-space: nowrap;text-align: center;min-width:800px;}
.search input{width: 700px;height: 40px;padding: 0 10px;box-sizing: border-box;border: 1px solid #DDD;vertical-align: top;outline: none;font-size: 16px;float: left;}
.search button{border: none;outline: none;cursor: pointer;width: 90px;height: 40px;color: #fff;font-size: 16px;background: #4e6ef2;vertical-align: top;float: left;}
.tip{text-align: center;font-size: 14px;margin-top: 20px;color: #CCC;}
</style>
</head>
<body>
<div id="LAY-app" class="layui-fluid">
<div class="container">
<div class="title">以人找房</div>
<div class="search">
<input type="text" id="kw"/>
<button @click="searchData">搜索</button>
</div>
<div class="tip">请输入居民身份证号查询</div>
</div>
</div>
<script type="text/javascript" src="assets/js/vue.min.js"></script>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script src="assets/js/vendor/safety/jutils.min.js"></script>
<script src="assets/js/vendor/safety/echarts.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'animate-numbers', 'table'], function() {
var $ = layui.$;
var table = layui.table;
new Vue({
el: '#LAY-app',
data: {},
methods: {
searchData: function() {
var keywords = $('#kw').val();
top.dialog.open({
url: top.restAjax.path('route/house/list-check?keywords={keywords}', [keywords]),
title: "查看房屋信息",
width: '80%',
height: '80%',
onClose: function() {
}
});
}
},
mounted: function() {
}
})
});
</script>
</body>
</html>