|
|
|
@ -26,10 +26,7 @@ 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.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.commons.tools.utils.*; |
|
|
|
import com.elink.esua.epdc.config.StreamUtils; |
|
|
|
import com.elink.esua.epdc.constant.HouseUseConstant; |
|
|
|
import com.elink.esua.epdc.constant.PopulationDictConstant; |
|
|
|
@ -451,9 +448,6 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
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()); |
|
|
|
@ -504,18 +498,6 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
* @Param [populationInformationEntity] |
|
|
|
**/ |
|
|
|
private void validateHouseHeadInfo(PopulationInformationEntity populationInformationEntity, BasePopulationInformationExcel basePopulationInformationExcel) { |
|
|
|
//赋值失业登记时间
|
|
|
|
if (StringUtils.isNotBlank(basePopulationInformationExcel.getUnemploymentRegisterTime())) { |
|
|
|
if(IdentityNoUtils.isStrDate(basePopulationInformationExcel.getUnemploymentRegisterTime())){ |
|
|
|
populationInformationEntity.setUnemploymentRegisterTime(DateUtil.parse(basePopulationInformationExcel.getUnemploymentRegisterTime())); |
|
|
|
} |
|
|
|
} |
|
|
|
//赋值入党时间
|
|
|
|
if (StringUtils.isNotBlank(basePopulationInformationExcel.getJoinTime())) { |
|
|
|
if(IdentityNoUtils.isStrDate(basePopulationInformationExcel.getJoinTime())){ |
|
|
|
populationInformationEntity.setJoinTime(DateUtil.parse(basePopulationInformationExcel.getJoinTime())); |
|
|
|
} |
|
|
|
} |
|
|
|
//如果状态为群众。清空excel中多余的入党时间和组织关系所在地
|
|
|
|
if ("0".equals(basePopulationInformationExcel.getPoliticsStatus())) { |
|
|
|
if(StringUtils.isNotBlank(populationInformationEntity.getId())){ |
|
|
|
@ -758,21 +740,6 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
basePopulationInformationExcel.setHouseAddress(houseAddress); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(buyingTime)) { |
|
|
|
if (!IdentityNoUtils.isStrDate(buyingTime)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("日期格式应为yyyy-MM-dd HH:mm:ss"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} else { |
|
|
|
if (DateUtil.parse(buyingTime).after(new Date())) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("购房时间不能大于当前时间"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} |
|
|
|
} |
|
|
|
basePopulationInformationExcel.setBuyingTime(buyingTime); |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(propertyOwner)) { |
|
|
|
@ -791,29 +758,17 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
} |
|
|
|
basePopulationInformationExcel.setPropertyOwner(propertyOwner); |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(propertyOwnerIdentityNo)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("产权人身份证号为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
}else if(StringUtils.isNotBlank((propertyOwnerIdentityNo))){ |
|
|
|
if(propertyOwnerIdentityNo.length()>32){ |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("产权人身份证号不能大于32个字符"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} |
|
|
|
if(StringUtils.isNotBlank((propertyOwnerIdentityNo))){ |
|
|
|
if(propertyOwnerIdentityNo.length()>32){ |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("产权人身份证号不能大于32个字符"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} |
|
|
|
basePopulationInformationExcel.setPropertyOwnerIdentityNo(propertyOwnerIdentityNo); |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(propertyOwnerMobile)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("产权人电话为空"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
}else if(StringUtils.isNotBlank((propertyOwnerMobile))){ |
|
|
|
if(StringUtils.isNotBlank((propertyOwnerMobile))){ |
|
|
|
if(propertyOwnerMobile.length()>32){ |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
@ -1009,21 +964,6 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
} |
|
|
|
if ("党员".equals(politicsStatus)) { |
|
|
|
if (StringUtils.isNotBlank(joinTime)) { |
|
|
|
if (!IdentityNoUtils.isStrDate(joinTime)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("日期格式应为yyyy-MM-dd HH:mm:ss"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} else { |
|
|
|
if (DateUtil.parse(joinTime).after(new Date())) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("入党时间不能大于当前时间"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} |
|
|
|
} |
|
|
|
basePopulationInformationExcel.setJoinTime(joinTime); |
|
|
|
} |
|
|
|
if(StringUtils.isNotBlank((organizationalRelationshipLocation))){ |
|
|
|
@ -1245,21 +1185,6 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
} |
|
|
|
if(StringUtils.isNotBlank(unemploymentRegister) && "1".equals(unemploymentRegister)){ |
|
|
|
if (StringUtils.isNotBlank(unemploymentRegisterTime)) { |
|
|
|
if (!IdentityNoUtils.isStrDate(unemploymentRegisterTime)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("日期格式应为yyyy-MM-dd HH:mm:ss"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} else { |
|
|
|
if (DateUtil.parse(unemploymentRegisterTime).after(new Date())) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoDto.setErrorInfo("失业登记时间不能大于当前时间"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} |
|
|
|
} |
|
|
|
basePopulationInformationExcel.setUnemploymentRegisterTime(unemploymentRegisterTime); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -1331,8 +1256,9 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform |
|
|
|
errorLineInfoDto.setErrorInfo("机动车类型数据不匹配"); |
|
|
|
errorLineInfoDto.setSheetName("房屋信息和户主信息"); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
}else { |
|
|
|
basePopulationInformationExcel.setMotorVehicleCategory(motorVehicleCategoryEnd.substring(0,motorVehicleCategoryEnd.lastIndexOf(","))); |
|
|
|
} |
|
|
|
basePopulationInformationExcel.setMotorVehicleCategory(motorVehicleCategoryEnd.substring(0,motorVehicleCategoryEnd.lastIndexOf(","))); |
|
|
|
} |
|
|
|
if(StringUtils.isNotBlank(dogStatus)){ |
|
|
|
basePopulationInformationExcel.setDogStatus(dogStatus); |
|
|
|
|