|
|
|
@ -35,9 +35,7 @@ import com.elink.esua.epdc.dto.BaseResidentInformationExportDto; |
|
|
|
import com.elink.esua.epdc.dto.HousingInformationDTO; |
|
|
|
import com.elink.esua.epdc.dto.PopulationInfoOverviewDTO; |
|
|
|
import com.elink.esua.epdc.dto.PopulationInformationDTO; |
|
|
|
import com.elink.esua.epdc.dto.epdc.form.EpdcScreenGridRankingFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.epdc.form.EpdcScreenSelectPeopleDetailFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.epdc.form.EpdcScreenSelectPeopleFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.epdc.form.*; |
|
|
|
import com.elink.esua.epdc.dto.epdc.result.*; |
|
|
|
import com.elink.esua.epdc.entity.HouseResidentEntity; |
|
|
|
import com.elink.esua.epdc.entity.HousingInformationEntity; |
|
|
|
@ -55,7 +53,7 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
|
import java.util.*; |
|
|
|
|
|
|
|
/** |
|
|
|
* 人口信息表 |
|
|
|
* 人口信息表 |
|
|
|
* |
|
|
|
* @author qu qu@elink-cn.com |
|
|
|
* @since v1.0.0 2020-08-19 |
|
|
|
@ -90,8 +88,8 @@ public class PopulationInformationServiceImpl extends BaseServiceImpl<Population |
|
|
|
return baseDao.selectListOfPopulationInformationDTO(params); |
|
|
|
} |
|
|
|
|
|
|
|
private QueryWrapper<PopulationInformationEntity> getWrapper(Map<String, Object> params){ |
|
|
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
|
|
|
private QueryWrapper<PopulationInformationEntity> getWrapper(Map<String, Object> params) { |
|
|
|
String id = (String) params.get(FieldConstant.ID_HUMP); |
|
|
|
|
|
|
|
QueryWrapper<PopulationInformationEntity> wrapper = new QueryWrapper<>(); |
|
|
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|
|
|
@ -110,19 +108,19 @@ public class PopulationInformationServiceImpl extends BaseServiceImpl<Population |
|
|
|
//校验身份证信息
|
|
|
|
//1.获取表单身份证的人口信息
|
|
|
|
PopulationInformationEntity infoByIdentityNo = getInfoByIdentityNo(dto.getResidentsIdentityNo()); |
|
|
|
if(infoByIdentityNo!=null){ |
|
|
|
Map<String,Object> params = new HashMap<>(); |
|
|
|
params.put("RESIDENT_ID",infoByIdentityNo.getId()); |
|
|
|
if (infoByIdentityNo != null) { |
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
params.put("RESIDENT_ID", infoByIdentityNo.getId()); |
|
|
|
List<HouseResidentEntity> houseResidentEntities = houseResidentDao.selectByMap(params); |
|
|
|
if(houseResidentEntities.size()>0){ |
|
|
|
if (houseResidentEntities.size() > 0) { |
|
|
|
//2.此人有房屋信息,且为第一次提交则此时提示前端
|
|
|
|
if("0".equals(dto.getIsSubmit())){ |
|
|
|
if ("0".equals(dto.getIsSubmit())) { |
|
|
|
StringBuffer sb = new StringBuffer(); |
|
|
|
for (HouseResidentEntity houseResidentEntity : houseResidentEntities) { |
|
|
|
HousingInformationEntity housingInformationEntity = housingInformationService.selectById(houseResidentEntity.getHouseId()); |
|
|
|
sb.append(",\"").append(housingInformationEntity.getHouseAddress()).append("\""); |
|
|
|
} |
|
|
|
String result ="您在地址为"+sb.substring(1)+"下已有房产信息,点击确认则新增此房产且更新居民信息!"; |
|
|
|
String result = "您在地址为" + sb.substring(1) + "下已有房产信息,点击确认则新增此房产且更新居民信息!"; |
|
|
|
return new Result().ok(result.substring(1)); |
|
|
|
} |
|
|
|
//2.第二次提交,则更新户主信息且新增关联信息
|
|
|
|
@ -153,27 +151,27 @@ public class PopulationInformationServiceImpl extends BaseServiceImpl<Population |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result update(PopulationInformationDTO dto) { |
|
|
|
PopulationInformationEntity infoByIdentityNo = selectById(dto.getId()); |
|
|
|
if(dto.getResidentsIdentityNo().equals(infoByIdentityNo.getResidentsIdentityNo())){ |
|
|
|
if (dto.getResidentsIdentityNo().equals(infoByIdentityNo.getResidentsIdentityNo())) { |
|
|
|
PopulationInformationEntity entity = ConvertUtils.sourceToTarget(dto, PopulationInformationEntity.class); |
|
|
|
//置空其他选择信息-防止导出时数据出错
|
|
|
|
if("0".equals(dto.getPoliticsStatus())){ |
|
|
|
if ("0".equals(dto.getPoliticsStatus())) { |
|
|
|
//如果表单选择的是群众,则清空入党时间和组织关系所在地
|
|
|
|
this.setJionTimeToNull(entity.getId()); |
|
|
|
entity.setJoinTime(null); |
|
|
|
entity.setOrganizationalRelationshipLocation(""); |
|
|
|
} |
|
|
|
if("0".equals(dto.getEmploymentStatus())){ |
|
|
|
if ("0".equals(dto.getEmploymentStatus())) { |
|
|
|
//如果表单选择的是在岗,则清空失业原因,再就业优惠政,失业登记和失业登记时间
|
|
|
|
entity.setUnemploymentReason(""); |
|
|
|
entity.setReemploymentPermit(""); |
|
|
|
entity.setUnemploymentRegister(""); |
|
|
|
this.setUnemploymentRegisterTimeToNull(entity.getId()); |
|
|
|
entity.setUnemploymentRegisterTime(null); |
|
|
|
} else if("1".equals(dto.getEmploymentStatus())){ |
|
|
|
} else if ("1".equals(dto.getEmploymentStatus())) { |
|
|
|
//如果选择为失业,则置空工作单位和工作地址
|
|
|
|
entity.setCurrentEmployer(""); |
|
|
|
entity.setCurrentEmployerAddress(""); |
|
|
|
if("0".equals(dto.getUnemploymentRegister())){ |
|
|
|
if ("0".equals(dto.getUnemploymentRegister())) { |
|
|
|
//如果表单选择的是失业 且就业登记为否 则也置空失业登记时间
|
|
|
|
this.setUnemploymentRegisterTimeToNull(entity.getId()); |
|
|
|
entity.setUnemploymentRegisterTime(null); |
|
|
|
@ -188,46 +186,46 @@ public class PopulationInformationServiceImpl extends BaseServiceImpl<Population |
|
|
|
//如果选择为失业,则置空工作单位和工作地址
|
|
|
|
entity.setCurrentEmployer(""); |
|
|
|
entity.setCurrentEmployerAddress(""); |
|
|
|
if("0".equals(dto.getUnemploymentRegister())){ |
|
|
|
if ("0".equals(dto.getUnemploymentRegister())) { |
|
|
|
//如果表单选择的是失业 且就业登记为否 则也置空失业登记时间
|
|
|
|
this.setUnemploymentRegisterTimeToNull(entity.getId()); |
|
|
|
entity.setUnemploymentRegisterTime(null); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(dto.getMotorVehicleNum()==0){ |
|
|
|
if (dto.getMotorVehicleNum() == 0) { |
|
|
|
//如果机动车数量为0 清空机动车类型
|
|
|
|
entity.setMotorVehicleCategory(""); |
|
|
|
} |
|
|
|
updateById(entity); |
|
|
|
return new Result(); |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
//修改了身份证信息 - 提示信息
|
|
|
|
Map<String,Object> params = new HashMap<>(); |
|
|
|
params.put("RESIDENT_ID",infoByIdentityNo.getId()); |
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
params.put("RESIDENT_ID", infoByIdentityNo.getId()); |
|
|
|
List<HouseResidentEntity> houseResidentEntities = houseResidentDao.selectByMap(params); |
|
|
|
if(houseResidentEntities.size()>0){ |
|
|
|
if (houseResidentEntities.size() > 0) { |
|
|
|
//2.此人有房屋信息,且为第一次提交则此时提示前端
|
|
|
|
if("0".equals(dto.getIsSubmit())){ |
|
|
|
if ("0".equals(dto.getIsSubmit())) { |
|
|
|
StringBuffer sb = new StringBuffer(); |
|
|
|
for (HouseResidentEntity houseResidentEntity : houseResidentEntities) { |
|
|
|
HousingInformationEntity housingInformationEntity = housingInformationService.selectById(houseResidentEntity.getHouseId()); |
|
|
|
sb.append(",\"").append(housingInformationEntity.getHouseAddress()).append("\""); |
|
|
|
} |
|
|
|
String result ="您在地址为"+sb.substring(1)+"下已有房产信息,点击确认则新增此房产且更新居民信息!"; |
|
|
|
String result = "您在地址为" + sb.substring(1) + "下已有房产信息,点击确认则新增此房产且更新居民信息!"; |
|
|
|
return new Result().ok(result.substring(1)); |
|
|
|
} |
|
|
|
//2.第二次提交,则更新户主信息
|
|
|
|
PopulationInformationEntity entity = ConvertUtils.sourceToTarget(dto, PopulationInformationEntity.class); |
|
|
|
entity.setId(infoByIdentityNo.getId()); |
|
|
|
//置空其他选择信息-防止导出时数据出错
|
|
|
|
if("0".equals(dto.getPoliticsStatus())){ |
|
|
|
if ("0".equals(dto.getPoliticsStatus())) { |
|
|
|
//如果表单选择的是群众,则清空入党时间和组织关系所在地
|
|
|
|
this.setJionTimeToNull(entity.getId()); |
|
|
|
entity.setJoinTime(null); |
|
|
|
entity.setOrganizationalRelationshipLocation(""); |
|
|
|
} |
|
|
|
if("0".equals(dto.getEmploymentStatus())){ |
|
|
|
if ("0".equals(dto.getEmploymentStatus())) { |
|
|
|
//如果表单选择的是在岗,则清空失业原因,再就业优惠政,失业登记和失业登记时间
|
|
|
|
entity.setUnemploymentReason(""); |
|
|
|
entity.setReemploymentPermit(""); |
|
|
|
@ -235,11 +233,11 @@ public class PopulationInformationServiceImpl extends BaseServiceImpl<Population |
|
|
|
entity.setUnemploymentRegisterTime(null); |
|
|
|
this.setUnemploymentRegisterTimeToNull(entity.getId()); |
|
|
|
} |
|
|
|
if("1".equals(dto.getEmploymentStatus())){ |
|
|
|
if ("1".equals(dto.getEmploymentStatus())) { |
|
|
|
//如果选择为失业,则置空工作单位和工作地址
|
|
|
|
entity.setCurrentEmployer(""); |
|
|
|
entity.setCurrentEmployerAddress(""); |
|
|
|
if("0".equals(dto.getUnemploymentRegister())){ |
|
|
|
if ("0".equals(dto.getUnemploymentRegister())) { |
|
|
|
//如果表单选择的是失业 且就业登记为否 则也置空失业登记时间
|
|
|
|
this.setUnemploymentRegisterTimeToNull(entity.getId()); |
|
|
|
entity.setUnemploymentRegisterTime(null); |
|
|
|
@ -264,7 +262,7 @@ public class PopulationInformationServiceImpl extends BaseServiceImpl<Population |
|
|
|
public PopulationInformationDTO getHouseHeadInfo(String houseId) { |
|
|
|
PopulationInformationDTO houseHeadInfo = baseDao.getHouseHeadInfo(houseId); |
|
|
|
//处理机动车类型
|
|
|
|
if(houseHeadInfo!=null && StringUtils.isNotBlank(houseHeadInfo.getMotorVehicleCategory())){ |
|
|
|
if (houseHeadInfo != null && StringUtils.isNotBlank(houseHeadInfo.getMotorVehicleCategory())) { |
|
|
|
String[] motorVehicleCategoryStrings = houseHeadInfo.getMotorVehicleCategory().split(","); |
|
|
|
houseHeadInfo.setMotorVehicleCategoryList(Arrays.asList(motorVehicleCategoryStrings)); |
|
|
|
} |
|
|
|
@ -315,95 +313,88 @@ public class PopulationInformationServiceImpl extends BaseServiceImpl<Population |
|
|
|
int pageIndex = (dto.getPageIndex() - NumConstant.ONE) * dto.getPageSize(); |
|
|
|
dto.setPageIndex(pageIndex); |
|
|
|
List<EpdcScreenSelectPeopleResultDTO> list = baseDao.selectListPeople(dto); |
|
|
|
return new PageData<>(list,baseDao.selectCountListPeople(dto)); |
|
|
|
return new PageData<>(list, baseDao.selectCountListPeople(dto)); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result<EpdcScreenSelectPeopleDetailResultDTO> selectPeopleDetail(EpdcScreenSelectPeopleDetailFormDTO dto) { |
|
|
|
EpdcScreenSelectPeopleDetailResultDTO epdcScreenSelectPeopleDetailResultDTO = new EpdcScreenSelectPeopleDetailResultDTO(); |
|
|
|
//根据身份标识寻找对应人员信息
|
|
|
|
if(PopulationIdentify.HOUSE_HEAD.equals(dto.getIdentifyFlag())) { |
|
|
|
if(StringUtils.isBlank(dto.getPopulationId())){ |
|
|
|
if (PopulationIdentify.HOUSE_HEAD.equals(dto.getIdentifyFlag())) { |
|
|
|
if (StringUtils.isBlank(dto.getPopulationId())) { |
|
|
|
return new Result<EpdcScreenSelectPeopleDetailResultDTO>().error("查询产权人信息失败:人口ID为空"); |
|
|
|
} |
|
|
|
//如果是户主,人口信息从人口表拿
|
|
|
|
PopulationInformationEntity populationInformationEntity = this.selectById(dto.getPopulationId()); |
|
|
|
epdcScreenSelectPeopleDetailResultDTO.setName(populationInformationEntity.getResidentsName()); |
|
|
|
epdcScreenSelectPeopleDetailResultDTO.setSex("0".equals(populationInformationEntity.getResidentsSex())?"女":"男"); |
|
|
|
if(IdentityNoUtils.IdentityNoVerification(populationInformationEntity.getResidentsIdentityNo())==null){ |
|
|
|
epdcScreenSelectPeopleDetailResultDTO.setAge(IdentityNoUtils.getAge(populationInformationEntity.getResidentsIdentityNo())+""); |
|
|
|
}else { |
|
|
|
epdcScreenSelectPeopleDetailResultDTO.setAge(""); |
|
|
|
} |
|
|
|
epdcScreenSelectPeopleDetailResultDTO.setPhone(populationInformationEntity.getResidentsPhone()); |
|
|
|
//房屋信息
|
|
|
|
List<HousingInformationDTO> housingInformationDTOList = housingInformationService.getHouseInfoByHouseHeadID(dto.getPopulationId()); |
|
|
|
List<HousingInfo> housingInfoList = ConvertUtils.sourceToTarget(housingInformationDTOList, HousingInfo.class); |
|
|
|
housingInfoList.forEach(housingInfo -> { |
|
|
|
setHouseUse(housingInfo.getHouseUse(),housingInfo); |
|
|
|
}); |
|
|
|
epdcScreenSelectPeopleDetailResultDTO.setHousingInfo(housingInfoList); |
|
|
|
//居住人信息
|
|
|
|
List<FamilyMember> familyMemberList = new ArrayList<>(); |
|
|
|
Set<String> houseHeadIds = new HashSet<>(1); |
|
|
|
houseHeadIds.add(dto.getPopulationId()); |
|
|
|
List<BaseResidentInformationExportDto> baseResidentInformationExportDtos = housingInformationService.selectBaseResidentInformationExcelList(houseHeadIds); |
|
|
|
FamilyMember familyMember = new FamilyMember(); |
|
|
|
baseResidentInformationExportDtos.forEach(a -> { |
|
|
|
familyMember.setName(a.getResidentsName()); |
|
|
|
switch (a.getHouseHeadRelation()){ |
|
|
|
case HouseHeadRelationConstant.CHILDREN : |
|
|
|
familyMember.setRelation("子女"); |
|
|
|
break; |
|
|
|
case HouseHeadRelationConstant.HUSBAND_AND_WIFE : |
|
|
|
familyMember.setRelation("夫妻"); |
|
|
|
break; |
|
|
|
case HouseHeadRelationConstant.PARENT : |
|
|
|
familyMember.setRelation("父母"); |
|
|
|
break; |
|
|
|
case HouseHeadRelationConstant.OTHER : |
|
|
|
familyMember.setRelation("其他"); |
|
|
|
break; |
|
|
|
default: |
|
|
|
familyMember.setRelation(""); |
|
|
|
break; |
|
|
|
} |
|
|
|
familyMemberList.add(familyMember); |
|
|
|
}); |
|
|
|
epdcScreenSelectPeopleDetailResultDTO.setFamilyMember(familyMemberList); |
|
|
|
//根据户主ID组装信息
|
|
|
|
setHouseHeadInfo(dto.getPopulationId(),epdcScreenSelectPeopleDetailResultDTO); |
|
|
|
return new Result<EpdcScreenSelectPeopleDetailResultDTO>().ok(epdcScreenSelectPeopleDetailResultDTO); |
|
|
|
} else if(PopulationIdentify.HOUSE_RESIDENT.equals(dto.getIdentifyFlag())) { |
|
|
|
if(StringUtils.isBlank(dto.getPopulationId())){ |
|
|
|
return new Result<EpdcScreenSelectPeopleDetailResultDTO>().error("查询产权人信息失败:人口ID为空"); |
|
|
|
} |
|
|
|
//居住人,人口信息从人口表拿
|
|
|
|
PopulationInformationEntity populationInformationEntity = this.selectById(dto.getPopulationId()); |
|
|
|
if(populationInformationEntity==null){ |
|
|
|
return new Result<EpdcScreenSelectPeopleDetailResultDTO>().error("未查找到此人信息!"); |
|
|
|
} else if (PopulationIdentify.HOUSE_RESIDENT.equals(dto.getIdentifyFlag())) { |
|
|
|
if (StringUtils.isBlank(dto.getPopulationId())) { |
|
|
|
return new Result<EpdcScreenSelectPeopleDetailResultDTO>().error("查询居住人信息失败:人口ID为空"); |
|
|
|
} |
|
|
|
epdcScreenSelectPeopleDetailResultDTO.setName(populationInformationEntity.getResidentsName()); |
|
|
|
epdcScreenSelectPeopleDetailResultDTO.setSex("0".equals(populationInformationEntity.getResidentsSex())?"女":"男"); |
|
|
|
epdcScreenSelectPeopleDetailResultDTO.setAge(""); |
|
|
|
epdcScreenSelectPeopleDetailResultDTO.setPhone(""); |
|
|
|
//房屋信息 - 继承户主的房屋信息
|
|
|
|
//查询该居住人的户主ID
|
|
|
|
Map<String,Object> params = new HashMap<>(); |
|
|
|
params.put("RESIDENT_ID",dto.getPopulationId()); |
|
|
|
params.put("IS_HOUSE_HEAD","0"); |
|
|
|
//查找居住人对应的户主细腻
|
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
params.put("RESIDENT_ID", dto.getPopulationId()); |
|
|
|
List<HouseResidentEntity> houseResidentEntityList = houseResidentDao.selectByMap(params); |
|
|
|
String houseHeadId = houseResidentEntityList.get(0).getHouseHeadId(); |
|
|
|
//房屋信息
|
|
|
|
List<HousingInformationDTO> housingInformationDTOList = housingInformationService.getHouseInfoByHouseHeadID(houseHeadId); |
|
|
|
List<HousingInfo> housingInfoList = ConvertUtils.sourceToTarget(housingInformationDTOList, HousingInfo.class); |
|
|
|
housingInfoList.forEach(housingInfo -> { |
|
|
|
setHouseUse(housingInfo.getHouseUse(),housingInfo); |
|
|
|
}); |
|
|
|
epdcScreenSelectPeopleDetailResultDTO.setHousingInfo(housingInfoList); |
|
|
|
if(houseResidentEntityList==null || houseResidentEntityList.size()==0){ |
|
|
|
return new Result<EpdcScreenSelectPeopleDetailResultDTO>().error("根据居住人查询户主失败"); |
|
|
|
} |
|
|
|
HouseResidentEntity houseResidentEntity = houseResidentEntityList.get(0); |
|
|
|
//根据户主ID组装信息
|
|
|
|
setHouseHeadInfo(houseResidentEntity.getHouseHeadId(),epdcScreenSelectPeopleDetailResultDTO); |
|
|
|
return new Result<EpdcScreenSelectPeopleDetailResultDTO>().ok(epdcScreenSelectPeopleDetailResultDTO); |
|
|
|
} |
|
|
|
return new Result<EpdcScreenSelectPeopleDetailResultDTO>().error("查询错误:身份标识参数无法匹配"); |
|
|
|
} |
|
|
|
|
|
|
|
private void setHouseHeadInfo(String houseHeadId,EpdcScreenSelectPeopleDetailResultDTO epdcScreenSelectPeopleDetailResultDTO ){ |
|
|
|
//如果是户主,人口信息从人口表拿
|
|
|
|
PopulationInformationEntity populationInformationEntity = this.selectById(houseHeadId); |
|
|
|
epdcScreenSelectPeopleDetailResultDTO.setName(populationInformationEntity.getResidentsName()); |
|
|
|
epdcScreenSelectPeopleDetailResultDTO.setSex("0".equals(populationInformationEntity.getResidentsSex()) ? "女" : "男"); |
|
|
|
if (IdentityNoUtils.IdentityNoVerification(populationInformationEntity.getResidentsIdentityNo()) == null) { |
|
|
|
epdcScreenSelectPeopleDetailResultDTO.setAge(IdentityNoUtils.getAge(populationInformationEntity.getResidentsIdentityNo()) + ""); |
|
|
|
} else { |
|
|
|
epdcScreenSelectPeopleDetailResultDTO.setAge(""); |
|
|
|
} |
|
|
|
epdcScreenSelectPeopleDetailResultDTO.setPhone(populationInformationEntity.getResidentsPhone()); |
|
|
|
//房屋信息
|
|
|
|
List<HousingInformationDTO> housingInformationDTOList = housingInformationService.getHouseInfoByHouseHeadID(houseHeadId); |
|
|
|
List<HousingInfo> housingInfoList = ConvertUtils.sourceToTarget(housingInformationDTOList, HousingInfo.class); |
|
|
|
housingInfoList.forEach(housingInfo -> { |
|
|
|
setHouseUse(housingInfo.getHouseUse(), housingInfo); |
|
|
|
}); |
|
|
|
epdcScreenSelectPeopleDetailResultDTO.setHousingInfo(housingInfoList); |
|
|
|
//居住人信息
|
|
|
|
List<FamilyMember> familyMemberList = new ArrayList<>(); |
|
|
|
Set<String> houseHeadIds = new HashSet<>(1); |
|
|
|
houseHeadIds.add(houseHeadId); |
|
|
|
List<BaseResidentInformationExportDto> baseResidentInformationExportDtos = housingInformationService.selectBaseResidentInformationExcelList(houseHeadIds); |
|
|
|
FamilyMember familyMember = new FamilyMember(); |
|
|
|
baseResidentInformationExportDtos.forEach(a -> { |
|
|
|
familyMember.setName(a.getResidentsName()); |
|
|
|
familyMember.setCurrentAddress(a.getCurrentAddress()); |
|
|
|
switch (a.getHouseHeadRelation()) { |
|
|
|
case HouseHeadRelationConstant.CHILDREN: |
|
|
|
familyMember.setRelation("子女"); |
|
|
|
break; |
|
|
|
case HouseHeadRelationConstant.HUSBAND_AND_WIFE: |
|
|
|
familyMember.setRelation("夫妻"); |
|
|
|
break; |
|
|
|
case HouseHeadRelationConstant.PARENT: |
|
|
|
familyMember.setRelation("父母"); |
|
|
|
break; |
|
|
|
case HouseHeadRelationConstant.OTHER: |
|
|
|
familyMember.setRelation("其他"); |
|
|
|
break; |
|
|
|
default: |
|
|
|
familyMember.setRelation(""); |
|
|
|
break; |
|
|
|
} |
|
|
|
familyMemberList.add(familyMember); |
|
|
|
}); |
|
|
|
epdcScreenSelectPeopleDetailResultDTO.setFamilyMember(familyMemberList); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result<EpdcScreenHouseUseResultDTO> housingUse() { |
|
|
|
EpdcScreenHouseUseResultDTO epdcScreenHouseUseResultDTO = baseDao.selectHouseUseDataForScreen(); |
|
|
|
@ -424,15 +415,38 @@ public class PopulationInformationServiceImpl extends BaseServiceImpl<Population |
|
|
|
return new PageData<>(list, baseDao.selectCountListGridRanking(dto)); |
|
|
|
} |
|
|
|
|
|
|
|
private void setHouseUse(String houseUse,HousingInfo housingInfo){ |
|
|
|
switch (houseUse){ |
|
|
|
case HouseUseConstant.RENT : |
|
|
|
@Override |
|
|
|
public PageData<EpdcScreenHouseInfoByPeopleResultDTO> selectHouseByPeople(EpdcScreenHouseInfoByPeopleFormDTO dto) { |
|
|
|
int pageIndex = (dto.getPageIndex() - NumConstant.ONE) * dto.getPageSize(); |
|
|
|
dto.setPageIndex(pageIndex); |
|
|
|
List<EpdcScreenHouseInfoByPeopleResultDTO> list = baseDao.selectHouseByPeople(dto); |
|
|
|
return new PageData<>(list, baseDao.selectCountHouseByPeople(dto)); } |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<EpdcScreenPopulationInfoByHouseResultDTO> selectPeopleByHouse(EpdcScreenPopulationInfoByHouseFormDTO dto) { |
|
|
|
int pageIndex = (dto.getPageIndex() - NumConstant.ONE) * dto.getPageSize(); |
|
|
|
dto.setPageIndex(pageIndex); |
|
|
|
List<EpdcScreenPopulationInfoByHouseResultDTO> list = baseDao.selectPeopleByHouse(dto); |
|
|
|
return new PageData<>(list, baseDao.selectCountPeopleByHouse(dto)); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddress(EpdcScreenResidentInfoByCurrentAddressFormDTO dto) { |
|
|
|
int pageIndex = (dto.getPageIndex() - NumConstant.ONE) * dto.getPageSize(); |
|
|
|
dto.setPageIndex(pageIndex); |
|
|
|
List<EpdcScreenResidentInfoByCurrentAddressResultDTO> list = baseDao.selectPeopleByCurrentAddress(dto); |
|
|
|
return new PageData<>(list, baseDao.selectCountPeopleByCurrentAddress(dto)); |
|
|
|
} |
|
|
|
|
|
|
|
private void setHouseUse(String houseUse, HousingInfo housingInfo) { |
|
|
|
switch (houseUse) { |
|
|
|
case HouseUseConstant.RENT: |
|
|
|
housingInfo.setHouseUse("租赁"); |
|
|
|
break; |
|
|
|
case HouseUseConstant.SINCE_THE_LIVING : |
|
|
|
case HouseUseConstant.SINCE_THE_LIVING: |
|
|
|
housingInfo.setHouseUse("自住"); |
|
|
|
break; |
|
|
|
case HouseUseConstant.BUSINESS : |
|
|
|
case HouseUseConstant.BUSINESS: |
|
|
|
housingInfo.setHouseUse("经营"); |
|
|
|
break; |
|
|
|
default: |
|
|
|
|