|
|
@ -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())) { |
|
|
|
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); |
|
|
|
|
|
|
|
} |
|
|
|
HousingInformationEntity entity = ConvertUtils.sourceToTarget(dto, HousingInformationEntity.class); |
|
|
|
//赋值部门信息
|
|
|
|
setDept(entity); |
|
|
|
insert(entity); |
|
|
@ -167,12 +171,15 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
} |
|
|
|
} |
|
|
|
if (HouseUseConstant.RENT.equals(dto.getHouseUse())) { |
|
|
|
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); |
|
|
@ -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); |
|
|
@ -420,14 +427,69 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @return void |
|
|
|
* @Description 校验完成后新增人口信息 |
|
|
|
* @Author songyunpeng |
|
|
|
* @Date 2020/8/31 |
|
|
|
* @Param [basePopulationInformationExcels] |
|
|
|
* @return void |
|
|
|
**/ |
|
|
|
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<>(); |
|
|
@ -556,6 +618,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
return populationIdNoAndIdMap; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* @return void |
|
|
|
* @Description 校验excel新增时户主的一些信息 |
|
|
@ -605,7 +669,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(basePopulationInformationExcel.getMotorVehicleNum()==0){ |
|
|
|
if(basePopulationInformationExcel.getMotorVehicleNum()!=null && basePopulationInformationExcel.getMotorVehicleNum()==0){ |
|
|
|
//如果机动车数量为0 清空机动车类型
|
|
|
|
populationInformationEntity.setMotorVehicleCategory(""); |
|
|
|
} |
|
|
@ -732,11 +796,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(); |
|
|
@ -745,7 +807,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(); |
|
|
@ -788,13 +849,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) + ""); |
|
|
@ -811,14 +866,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(); |
|
|
@ -847,33 +894,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) + ""); |
|
|
@ -929,22 +949,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)) { |
|
|
@ -956,13 +964,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); |
|
|
|
} |
|
|
|
} |
|
|
@ -975,22 +977,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) { |
|
|
@ -1012,13 +1001,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) { |
|
|
@ -1041,13 +1023,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) + ""); |
|
|
@ -1065,13 +1041,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); |
|
|
|
} |
|
|
|
} |
|
|
@ -1105,13 +1075,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) { |
|
|
@ -1133,13 +1096,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) { |
|
|
@ -1162,13 +1118,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())) { |
|
|
@ -1190,13 +1140,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)) { |
|
|
@ -1206,22 +1150,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())) { |
|
|
@ -1243,32 +1175,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())) { |
|
|
@ -1289,13 +1203,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)) { |
|
|
@ -1305,13 +1213,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)) { |
|
|
@ -1322,13 +1224,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) + ""); |
|
|
@ -1348,13 +1244,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())) { |
|
|
@ -1375,13 +1265,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())) { |
|
|
@ -1403,20 +1287,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; |
|
|
@ -1443,13 +1314,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)) { |
|
|
|