|
|
@ -26,7 +26,10 @@ import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
import com.elink.esua.epdc.commons.tools.constant.FieldConstant; |
|
|
|
import com.elink.esua.epdc.commons.tools.exception.RenException; |
|
|
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.*; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.IdentityNoUtils; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
|
|
|
import com.elink.esua.epdc.config.StreamUtils; |
|
|
|
import com.elink.esua.epdc.constant.HouseUseConstant; |
|
|
|
import com.elink.esua.epdc.constant.PopulationDictConstant; |
|
|
@ -51,7 +54,6 @@ import org.springframework.web.multipart.MultipartFile; |
|
|
|
import java.io.File; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.util.*; |
|
|
|
import java.util.concurrent.ConcurrentHashMap; |
|
|
|
|
|
|
|
/** |
|
|
|
* 房屋信息表 |
|
|
@ -140,14 +142,16 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
} |
|
|
|
} |
|
|
|
if (HouseUseConstant.RENT.equals(dto.getHouseUse())) { |
|
|
|
//判断身份证是否合法
|
|
|
|
String result = IdentityNoUtils.IdentityNoVerification(dto.getTenantIdentityNo()); |
|
|
|
if (result != null) { |
|
|
|
return new Result().error("承租人人身份证不合法:"+result); |
|
|
|
if (StringUtils.isNotBlank(dto.getTenantIdentityNo())) { |
|
|
|
//判断身份证是否合法
|
|
|
|
String result = IdentityNoUtils.IdentityNoVerification(dto.getTenantIdentityNo()); |
|
|
|
if (result != null) { |
|
|
|
return new Result().error("承租人人身份证不合法:"+result); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
HousingInformationEntity entity = ConvertUtils.sourceToTarget(dto, HousingInformationEntity.class); |
|
|
|
|
|
|
|
//赋值部门信息
|
|
|
|
setDept(entity); |
|
|
|
insert(entity); |
|
|
@ -167,11 +171,14 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
} |
|
|
|
} |
|
|
|
if (HouseUseConstant.RENT.equals(dto.getHouseUse())) { |
|
|
|
//判断身份证是否合法
|
|
|
|
String result = IdentityNoUtils.IdentityNoVerification(dto.getTenantIdentityNo()); |
|
|
|
if (result != null) { |
|
|
|
return new Result().error("承租人人身份证不合法:"+result); |
|
|
|
if (StringUtils.isNotBlank(dto.getTenantIdentityNo())) { |
|
|
|
//判断身份证是否合法
|
|
|
|
String result = IdentityNoUtils.IdentityNoVerification(dto.getTenantIdentityNo()); |
|
|
|
if (result != null) { |
|
|
|
return new Result().error("承租人人身份证不合法:"+result); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
HousingInformationEntity entity = ConvertUtils.sourceToTarget(dto, HousingInformationEntity.class); |
|
|
|
//赋值部门信息
|
|
|
@ -365,7 +372,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
return new Result().ok(epdcResidentErrorResultDTOS); |
|
|
|
} |
|
|
|
if(basePopulationInformationExcels!=null && basePopulationInformationExcels.size()>0){ |
|
|
|
populationIdNoAndIdMap = savePopulationList(basePopulationInformationExcels, parentAndAllDeptDTO); |
|
|
|
populationIdNoAndIdMap = savePopulationListEnd(basePopulationInformationExcels, parentAndAllDeptDTO); |
|
|
|
} |
|
|
|
if(baseResidentInformationExcels!=null && baseResidentInformationExcels.size()>0){ |
|
|
|
saveResidentList(baseResidentInformationExcels,populationIdNoAndIdMap); |
|
|
@ -425,14 +432,69 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 校验完成后新增人口信息 |
|
|
|
* @Author songyunpeng |
|
|
|
* @Date 2020/8/31 |
|
|
|
* @Param [basePopulationInformationExcels] |
|
|
|
* @return void |
|
|
|
* @Description 校验完成后新增人口信息 |
|
|
|
**/ |
|
|
|
private Map<String,String> savePopulationListEnd(List<BasePopulationInformationExcel> basePopulationInformationExcels,ParentAndAllDeptDTO parentAndAllDeptDTO) { |
|
|
|
Map<String,String> populationIdNoAndIdMap = new HashMap<>(); |
|
|
|
for (BasePopulationInformationExcel basePopulationInformationExcel : basePopulationInformationExcels) { |
|
|
|
//插入房屋信息
|
|
|
|
HousingInformationEntity housingInformationEntity = ConvertUtils.sourceToTarget(basePopulationInformationExcel,HousingInformationEntity.class); |
|
|
|
if(basePopulationInformationExcel.getBuyingTime()!=null){ |
|
|
|
housingInformationEntity.setBuyingTime(DateUtil.parse(basePopulationInformationExcel.getBuyingTime())); |
|
|
|
} |
|
|
|
housingInformationEntity.setGridId(parentAndAllDeptDTO.getGridId()); |
|
|
|
housingInformationEntity.setAllDeptNames(parentAndAllDeptDTO.getAllDeptNames()); |
|
|
|
housingInformationEntity.setAllDeptIds(parentAndAllDeptDTO.getAllDeptIds()); |
|
|
|
housingInformationEntity.setParentDeptNames(parentAndAllDeptDTO.getParentDeptNames()); |
|
|
|
housingInformationEntity.setParentDeptIds(parentAndAllDeptDTO.getParentDeptIds()); |
|
|
|
baseDao.insert(housingInformationEntity); |
|
|
|
if(HouseUseConstant.RENT.equals(housingInformationEntity.getHouseUse())){ |
|
|
|
//房屋租赁信息
|
|
|
|
HouseRentInfoEntity houseRentInfoEntity = ConvertUtils.sourceToTarget(basePopulationInformationExcel,HouseRentInfoEntity.class); |
|
|
|
houseRentInfoEntity.setHouseId(housingInformationEntity.getId()); |
|
|
|
houseRentInfoService.insert(houseRentInfoEntity); |
|
|
|
}else if(HouseUseConstant.BUSINESS.equals(housingInformationEntity.getHouseUse())){ |
|
|
|
//房屋经营信息
|
|
|
|
HouseBusinessInfoEntity houseBusinessInfoEntity = ConvertUtils.sourceToTarget(basePopulationInformationExcel,HouseBusinessInfoEntity.class); |
|
|
|
houseBusinessInfoEntity.setHouseId(housingInformationEntity.getId()); |
|
|
|
houseBusinessInfoService.insert(houseBusinessInfoEntity); |
|
|
|
} |
|
|
|
//插入户主信息
|
|
|
|
PopulationInformationEntity populationInformationEntity = ConvertUtils.sourceToTarget(basePopulationInformationExcel,PopulationInformationEntity.class); |
|
|
|
PopulationInformationEntity oldPopulationInformationEntity= populationInformationService.getInfoByIdentityNo(populationInformationEntity.getResidentsIdentityNo()); |
|
|
|
//校验户主信息
|
|
|
|
validateHouseHeadInfo(populationInformationEntity,basePopulationInformationExcel); |
|
|
|
if(oldPopulationInformationEntity!=null){ |
|
|
|
//身份证在列表已存在,则更新户主信息
|
|
|
|
populationInformationEntity.setId(oldPopulationInformationEntity.getId()); |
|
|
|
populationInformationService.updateById(populationInformationEntity); |
|
|
|
}else { |
|
|
|
//校验户主信息
|
|
|
|
populationInformationService.insert(populationInformationEntity); |
|
|
|
} |
|
|
|
//插入房屋人员关联关系表
|
|
|
|
HouseResidentEntity houseResidentEntity = new HouseResidentEntity(); |
|
|
|
houseResidentEntity.setHouseId(housingInformationEntity.getId()); |
|
|
|
houseResidentEntity.setResidentId(populationInformationEntity.getId()); |
|
|
|
houseResidentEntity.setIsHouseHead("1"); |
|
|
|
houseResidentDao.insert(houseResidentEntity); |
|
|
|
populationIdNoAndIdMap.put(basePopulationInformationExcel.getResidentsIdentityNo(),populationInformationEntity.getId()); |
|
|
|
} |
|
|
|
return populationIdNoAndIdMap; |
|
|
|
} |
|
|
|
/** |
|
|
|
* @return void |
|
|
|
* @Description 校验完成后新增人口信息 - 因为不填写产权证而废弃 |
|
|
|
* @Author songyunpeng |
|
|
|
* @Date 2020/8/31 |
|
|
|
* @Param [basePopulationInformationExcels] |
|
|
|
**/ |
|
|
|
@Deprecated |
|
|
|
private Map<String,String> savePopulationList(List<BasePopulationInformationExcel> basePopulationInformationExcels, ParentAndAllDeptDTO parentAndAllDeptDTO) { |
|
|
|
//插入房屋信息
|
|
|
|
List<HousingInformationEntity> housingInformationEntityList = new ArrayList<>(); |
|
|
@ -561,6 +623,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
return populationIdNoAndIdMap; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* @return void |
|
|
|
* @Description 校验excel新增时户主的一些信息 |
|
|
@ -610,7 +674,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(basePopulationInformationExcel.getMotorVehicleNum()==0){ |
|
|
|
if(basePopulationInformationExcel.getMotorVehicleNum()!=null && basePopulationInformationExcel.getMotorVehicleNum()==0){ |
|
|
|
//如果机动车数量为0 清空机动车类型
|
|
|
|
populationInformationEntity.setMotorVehicleCategory(""); |
|
|
|
} |
|
|
@ -737,11 +801,9 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
* @Param [basePopulationInformationExcels, populationInformationDTOS] |
|
|
|
**/ |
|
|
|
private List<EpdcPopulationErrorResultDTO> checkPopulationExcel(List<BasePopulationInformationExcel> basePopulationInformationExcels, List<SysPopulationSimpleDictDTO> sysPopulationSimpleDictDTOS) { |
|
|
|
List<HousingInformationDTO> housingInformationDTOS = list(new HashMap<>()); |
|
|
|
// 不匹配信息
|
|
|
|
List<EpdcPopulationErrorResultDTO> errorLineInfoList = new ArrayList<>(); |
|
|
|
EpdcPopulationErrorResultDTO errorLineInfoDto; |
|
|
|
Map<String, String> isPropertyOwnerCard = new ConcurrentHashMap<>(); |
|
|
|
for (int i = 0; i < basePopulationInformationExcels.size(); i++) { |
|
|
|
BasePopulationInformationExcel basePopulationInformationExcel = basePopulationInformationExcels.get(i); |
|
|
|
String houseAddress = basePopulationInformationExcel.getHouseAddress()==null?null:basePopulationInformationExcel.getHouseAddress().trim(); |
|
|
@ -750,7 +812,6 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
String propertyOwner = basePopulationInformationExcel.getPropertyOwner()==null?null:basePopulationInformationExcel.getPropertyOwner().trim(); |
|
|
|
String propertyOwnerIdentityNo = basePopulationInformationExcel.getPropertyOwnerIdentityNo()==null?null:basePopulationInformationExcel.getPropertyOwnerIdentityNo().trim(); |
|
|
|
String propertyOwnerMobile = basePopulationInformationExcel.getPropertyOwnerMobile()==null?null:basePopulationInformationExcel.getPropertyOwnerMobile().trim(); |
|
|
|
String propertyOwnerCard = basePopulationInformationExcel.getPropertyOwnerCard()==null?null:basePopulationInformationExcel.getPropertyOwnerCard().trim(); |
|
|
|
String houseUse = basePopulationInformationExcel.getHouseUse()==null?null:basePopulationInformationExcel.getHouseUse().trim(); |
|
|
|
String tenantName = basePopulationInformationExcel.getTenantName()==null?null:basePopulationInformationExcel.getTenantName().trim(); |
|
|
|
String tenantIdentityNo = basePopulationInformationExcel.getTenantIdentityNo()==null?null:basePopulationInformationExcel.getTenantIdentityNo().trim(); |
|
|
@ -793,13 +854,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
}else if(StringUtils.isNotBlank((houseAddress))){ |
|
|
|
basePopulationInformationExcel.setHouseAddress(houseAddress); |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(buyingTime)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("购房时间为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} else if (StringUtils.isNotBlank(buyingTime)) { |
|
|
|
if (StringUtils.isNotBlank(buyingTime)) { |
|
|
|
if (!IdentityNoUtils.isStrDate(buyingTime)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
@ -816,14 +871,6 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
} |
|
|
|
} |
|
|
|
basePopulationInformationExcel.setBuyingTime(buyingTime); |
|
|
|
|
|
|
|
} |
|
|
|
if (houseArea == null) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("房屋面积为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(propertyOwner)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
@ -852,33 +899,6 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
}else if(StringUtils.isNotBlank((propertyOwnerMobile))){ |
|
|
|
basePopulationInformationExcel.setPropertyOwnerMobile(propertyOwnerMobile); |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(propertyOwnerCard)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("产权证为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} else if (StringUtils.isNotBlank(propertyOwnerCard)) { |
|
|
|
for (HousingInformationDTO housingInformationDTO : housingInformationDTOS) { |
|
|
|
if (housingInformationDTO.getPropertyOwnerCard().equals(propertyOwnerCard)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("产权证已存在"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} |
|
|
|
} |
|
|
|
if (isPropertyOwnerCard.containsKey(propertyOwnerCard)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("产权证在EXCEL已存在"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} |
|
|
|
isPropertyOwnerCard.put(propertyOwnerCard, (i + 2) + ""); |
|
|
|
basePopulationInformationExcel.setPropertyOwnerCard(propertyOwnerCard); |
|
|
|
} |
|
|
|
|
|
|
|
if (StringUtils.isBlank(houseUse)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
@ -934,22 +954,10 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
|
|
|
|
} |
|
|
|
} else if (HouseUseConstant.BUSINESS.equals(houseUse)) { |
|
|
|
if (StringUtils.isBlank(enterpriseName)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("企业名称为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
}else if(StringUtils.isNotBlank((enterpriseName))){ |
|
|
|
if(StringUtils.isNotBlank((enterpriseName))){ |
|
|
|
basePopulationInformationExcel.setEnterpriseName(enterpriseName); |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(legalRepresentative)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("法人为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
}else if(StringUtils.isNotBlank((legalRepresentative))){ |
|
|
|
if(StringUtils.isNotBlank((legalRepresentative))){ |
|
|
|
basePopulationInformationExcel.setLegalRepresentative(legalRepresentative); |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(enterprisePhone)) { |
|
|
@ -961,13 +969,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
}else if(StringUtils.isNotBlank((enterprisePhone))){ |
|
|
|
basePopulationInformationExcel.setEnterprisePhone(enterprisePhone); |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(socialUniformCode)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("社会统一代码为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
}else if(StringUtils.isNotBlank((socialUniformCode))){ |
|
|
|
if(StringUtils.isNotBlank((socialUniformCode))){ |
|
|
|
basePopulationInformationExcel.setSocialUniformCode(socialUniformCode); |
|
|
|
} |
|
|
|
} |
|
|
@ -980,22 +982,9 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
}else if(StringUtils.isNotBlank((residentsName))){ |
|
|
|
basePopulationInformationExcel.setResidentsName(residentsName); |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(residentsNation)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("民族为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
}else if(StringUtils.isNotBlank((residentsNation))){ |
|
|
|
if(StringUtils.isNotBlank((residentsNation))){ |
|
|
|
basePopulationInformationExcel.setResidentsNation(residentsNation); |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(educationLevel)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("文化程度为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(educationLevel)) { |
|
|
|
boolean isMatch = false; |
|
|
|
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|
|
@ -1017,13 +1006,6 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(politicsStatus)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("政治面貌为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(politicsStatus)) { |
|
|
|
boolean isMatch = false; |
|
|
|
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|
|
@ -1046,13 +1028,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
} |
|
|
|
} |
|
|
|
if ("党员".equals(politicsStatus)) { |
|
|
|
if (StringUtils.isBlank(joinTime)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("入党时间为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} else if (StringUtils.isNotBlank(joinTime)) { |
|
|
|
if (StringUtils.isNotBlank(joinTime)) { |
|
|
|
if (!IdentityNoUtils.isStrDate(joinTime)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
@ -1070,13 +1046,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
} |
|
|
|
basePopulationInformationExcel.setJoinTime(joinTime); |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(organizationalRelationshipLocation)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("组织关系所在地为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
}else if(StringUtils.isNotBlank((organizationalRelationshipLocation))){ |
|
|
|
if(StringUtils.isNotBlank((organizationalRelationshipLocation))){ |
|
|
|
basePopulationInformationExcel.setOrganizationalRelationshipLocation(organizationalRelationshipLocation); |
|
|
|
} |
|
|
|
} |
|
|
@ -1110,13 +1080,6 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
}else if(StringUtils.isNotBlank((residentsPhone))){ |
|
|
|
basePopulationInformationExcel.setResidentsPhone(residentsPhone); |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(bodyStatus)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("户主身体状况为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(bodyStatus)) { |
|
|
|
boolean isMatch = false; |
|
|
|
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|
|
@ -1138,13 +1101,6 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(maritalStatus)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("户主婚姻状况为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(maritalStatus)) { |
|
|
|
boolean isMatch = false; |
|
|
|
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|
|
@ -1167,13 +1123,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if (StringUtils.isBlank(accountType)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("户主户口类型为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} else if (StringUtils.isNotBlank(accountType)) { |
|
|
|
if (StringUtils.isNotBlank(accountType)) { |
|
|
|
boolean isMatch = false; |
|
|
|
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|
|
|
if (PopulationDictConstant.ACCOUNT_TYPE.equals(sysPopulationSimpleDictDTO.getDicType())) { |
|
|
@ -1195,13 +1145,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if (StringUtils.isBlank(militaryService)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("户主是否服兵役为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
}else if(StringUtils.isNotBlank((militaryService))){ |
|
|
|
if(StringUtils.isNotBlank((militaryService))){ |
|
|
|
basePopulationInformationExcel.setMilitaryService(militaryService); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(militaryService) && !"0".equals(militaryService) && !"1".equals(militaryService)) { |
|
|
@ -1211,22 +1155,10 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(householdRegistrationPlace)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("户主户籍地为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
}else if(StringUtils.isNotBlank((householdRegistrationPlace))){ |
|
|
|
if(StringUtils.isNotBlank((householdRegistrationPlace))){ |
|
|
|
basePopulationInformationExcel.setHouseholdRegistrationPlace(householdRegistrationPlace); |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(employmentStatus)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("户主是否就业为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} else if (StringUtils.isNotBlank(employmentStatus)) { |
|
|
|
if (StringUtils.isNotBlank(employmentStatus)) { |
|
|
|
boolean isMatch = false; |
|
|
|
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|
|
|
if (PopulationDictConstant.EMPLOYMENT_STATUS.equals(sysPopulationSimpleDictDTO.getDicType())) { |
|
|
@ -1248,32 +1180,14 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
} |
|
|
|
} |
|
|
|
if ("在岗".equals(employmentStatus)) { |
|
|
|
if (StringUtils.isBlank(currentEmployer)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("户主现工作单位为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
}else if(StringUtils.isNotBlank((currentEmployer))){ |
|
|
|
if(StringUtils.isNotBlank((currentEmployer))){ |
|
|
|
basePopulationInformationExcel.setCurrentEmployer(currentEmployer); |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(currentEmployerAddress)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("户主现单位地址为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
}else if(StringUtils.isNotBlank((currentEmployerAddress))){ |
|
|
|
if(StringUtils.isNotBlank((currentEmployerAddress))){ |
|
|
|
basePopulationInformationExcel.setCurrentEmployerAddress(currentEmployerAddress); |
|
|
|
} |
|
|
|
} else if ("失业".equals(employmentStatus)) { |
|
|
|
if (StringUtils.isBlank(unemploymentReason)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("户主失业原因为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} else if (StringUtils.isNotBlank(unemploymentReason)) { |
|
|
|
if (StringUtils.isNotBlank(unemploymentReason)) { |
|
|
|
boolean isMatch = false; |
|
|
|
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|
|
|
if (PopulationDictConstant.UNEMPLOYMENT_REASON.equals(sysPopulationSimpleDictDTO.getDicType())) { |
|
|
@ -1294,13 +1208,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(reemploymentPermit)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("户主是否有再就业优惠证为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
}else if(StringUtils.isNotBlank((reemploymentPermit))){ |
|
|
|
if(StringUtils.isNotBlank((reemploymentPermit))){ |
|
|
|
basePopulationInformationExcel.setReemploymentPermit(reemploymentPermit); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(reemploymentPermit) && !"0".equals(reemploymentPermit) && !"1".equals(reemploymentPermit)) { |
|
|
@ -1310,13 +1218,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(unemploymentRegister)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("户主是否失业登记为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
}else if(StringUtils.isNotBlank((unemploymentRegister))){ |
|
|
|
if(StringUtils.isNotBlank((unemploymentRegister))){ |
|
|
|
basePopulationInformationExcel.setUnemploymentRegister(unemploymentRegister); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(unemploymentRegister) && !"0".equals(unemploymentRegister) && !"1".equals(unemploymentRegister)) { |
|
|
@ -1327,13 +1229,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} |
|
|
|
if(StringUtils.isNotBlank(unemploymentRegister) && "1".equals(unemploymentRegister)){ |
|
|
|
if (StringUtils.isBlank(unemploymentRegisterTime)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("户主失业登记时间为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} else if (StringUtils.isNotBlank(unemploymentRegisterTime)) { |
|
|
|
if (StringUtils.isNotBlank(unemploymentRegisterTime)) { |
|
|
|
if (!IdentityNoUtils.isStrDate(unemploymentRegisterTime)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
@ -1353,13 +1249,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(familyCategory)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("户主家庭类别为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} else if (StringUtils.isNotBlank(familyCategory)) { |
|
|
|
if (StringUtils.isNotBlank(familyCategory)) { |
|
|
|
boolean isMatch = false; |
|
|
|
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|
|
|
if (PopulationDictConstant.FAMILY_CATEGORY.equals(sysPopulationSimpleDictDTO.getDicType())) { |
|
|
@ -1380,13 +1270,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(helpStatus)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("户主家庭救助情况为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} else if (StringUtils.isNotBlank(helpStatus)) { |
|
|
|
if (StringUtils.isNotBlank(helpStatus)) { |
|
|
|
boolean isMatch = false; |
|
|
|
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|
|
|
if (PopulationDictConstant.HELP_STATUS.equals(sysPopulationSimpleDictDTO.getDicType())) { |
|
|
@ -1408,20 +1292,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} |
|
|
|
} |
|
|
|
if (motorVehicleNum == null) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("机动车台数为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} |
|
|
|
if (motorVehicleNum != null && motorVehicleNum.intValue() > 0 && StringUtils.isBlank(motorVehicleCategory)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("机动车类型为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} else if (StringUtils.isNotBlank(motorVehicleCategory)) { |
|
|
|
if (StringUtils.isNotBlank(motorVehicleCategory)) { |
|
|
|
//处理多选类型
|
|
|
|
String[] motorVehicleCategoryStrings = motorVehicleCategory.split(","); |
|
|
|
Integer matchNum = 0; |
|
|
@ -1448,13 +1319,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
} |
|
|
|
basePopulationInformationExcel.setMotorVehicleCategory(motorVehicleCategoryEnd.substring(0,motorVehicleCategoryEnd.lastIndexOf(","))); |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(dogStatus)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("宠物犬情况为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
}else if(StringUtils.isNotBlank(dogStatus)){ |
|
|
|
if(StringUtils.isNotBlank(dogStatus)){ |
|
|
|
basePopulationInformationExcel.setDogStatus(dogStatus); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(dogStatus) && !"0".equals(dogStatus) && !"1".equals(dogStatus)) { |
|
|
|