@ -132,11 +132,18 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
@Override
@Transactional ( rollbackFor = Exception . class )
public Result save ( HousingInformationDTO dto ) {
if ( StringUtils . isNotBlank ( dto . getPropertyOwnerIdentityNo ( ) ) ) {
//判断产权人身份证是否合法
String result = IdentityNoUtils . IdentityNoVerification ( dto . getPropertyOwnerIdentityNo ( ) ) ;
if ( result ! = null ) {
return new Result ( ) . error ( "产权人身份证不合法:" + result ) ;
}
}
if ( HouseUseConstant . RENT . equals ( dto . getHouseUse ( ) ) ) {
//判断身份证是否合法
String result = IdentityNoUtils . IdentityNoVerification ( dto . getTenantIdentityNo ( ) ) ;
if ( result ! = null ) {
return new Result ( ) . error ( result ) ;
return new Result ( ) . error ( "承租人人身份证不合法:" + result ) ;
}
}
HousingInformationEntity entity = ConvertUtils . sourceToTarget ( dto , HousingInformationEntity . class ) ;
@ -152,11 +159,18 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
@Override
@Transactional ( rollbackFor = Exception . class )
public Result update ( HousingInformationDTO dto ) {
if ( StringUtils . isNotBlank ( dto . getPropertyOwnerIdentityNo ( ) ) ) {
//判断产权人身份证是否合法
String result = IdentityNoUtils . IdentityNoVerification ( dto . getPropertyOwnerIdentityNo ( ) ) ;
if ( result ! = null ) {
return new Result ( ) . error ( "产权人身份证不合法:" + result ) ;
}
}
if ( HouseUseConstant . RENT . equals ( dto . getHouseUse ( ) ) ) {
//判断身份证是否合法
String result = IdentityNoUtils . IdentityNoVerification ( dto . getTenantIdentityNo ( ) ) ;
if ( result ! = null ) {
return new Result ( ) . error ( result ) ;
return new Result ( ) . error ( "承租人人身份证不合法:" + result ) ;
}
}
HousingInformationEntity entity = ConvertUtils . sourceToTarget ( dto , HousingInformationEntity . class ) ;
@ -320,9 +334,9 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
if ( epdcPartyErrorResultDTOS . size ( ) > 0 ) {
return new Result ( ) . ok ( epdcPartyErrorResultDTOS ) ;
}
savePopulationList ( basePopulationInformationExcels , parentAndAllDeptDTO ) ;
if ( basePopulationInformationExcels . size ( ) > 0 ) {
savePopulationList ( basePopulationInformationExcels , parentAndAllDeptDTO ) ;
}
} else if ( numSheet = = 1 ) { //检验和新增居住人信息
List < BaseResidentInformationExcel > baseResidentInformationExcels = ExcelImportUtil . importExcel ( f , BaseResidentInformationExcel . class , importParams ) ;
// 校验数据
@ -330,8 +344,9 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
if ( epdcPartyErrorResultDTOS . size ( ) > 0 ) {
return new Result ( ) . ok ( epdcPartyErrorResultDTOS ) ;
}
saveResidentList ( baseResidentInformationExcels ) ;
if ( baseResidentInformationExcels . size ( ) > 0 ) {
saveResidentList ( baseResidentInformationExcels ) ;
}
}
}
} catch ( Exception e1 ) {
@ -359,6 +374,12 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
* * /
private void saveResidentList ( List < BaseResidentInformationExcel > baseResidentInformationExcels ) {
for ( BaseResidentInformationExcel baseResidentInformationExcel : baseResidentInformationExcels ) {
//查找户主ID
PopulationInformationEntity infoByIdentityNo = populationInformationService . getInfoByIdentityNo ( baseResidentInformationExcel . getResidentsIdentityNo ( ) ) ;
if ( infoByIdentityNo = = null ) {
//查找不到户主则跳过此人
continue ;
}
//插入居民信息
PopulationInformationEntity populationInformationEntity = ConvertUtils . sourceToTarget ( baseResidentInformationExcel , PopulationInformationEntity . class ) ;
populationInformationEntity . setResidentsIdentityNo ( null ) ;
@ -366,10 +387,9 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
//插入房屋人员关联关系表
HouseResidentEntity houseResidentEntity = ConvertUtils . sourceToTarget ( baseResidentInformationExcel , HouseResidentEntity . class ) ;
houseResidentEntity . setResidentId ( populationInformationEntity . getId ( ) ) ;
//查找户主ID
PopulationInformationEntity infoByIdentityNo = populationInformationService . getInfoByIdentityNo ( baseResidentInformationExcel . getResidentsIdentityNo ( ) ) ;
houseResidentEntity . setHouseHeadId ( infoByIdentityNo . getId ( ) ) ;
houseResidentEntity . setIsHouseHead ( "0" ) ;
houseResidentEntity . setHouseHeadRelation ( baseResidentInformationExcel . getHouseHeadRelation ( ) ) ;
houseResidentDao . insert ( houseResidentEntity ) ;
}
@ -385,10 +405,10 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
* * /
private void savePopulationList ( List < BasePopulationInformationExcel > basePopulationInformationExcels , ParentAndAllDeptDTO parentAndAllDeptDTO ) {
//插入房屋信息
List < HousingInformationEntity > housingInformationEntityList = new ArrayList < > ( ) ;
List < HousingInformationEntity > housingInformationEntityList = new ArrayList < > ( ) ;
for ( BasePopulationInformationExcel basePopulationInformationExcel : basePopulationInformationExcels ) {
HousingInformationEntity housingInformationEntity = ConvertUtils . sourceToTarget ( basePopulationInformationExcel , HousingInformationEntity . class ) ;
HousingInformationEntity housingInformationEntity = ConvertUtils . sourceToTarget ( basePopulationInformationExcel , HousingInformationEntity . class ) ;
housingInformationEntity . setGridId ( parentAndAllDeptDTO . getGridId ( ) ) ;
housingInformationEntity . setParentDeptIds ( parentAndAllDeptDTO . getParentDeptIds ( ) ) ;
housingInformationEntity . setParentDeptNames ( parentAndAllDeptDTO . getParentDeptNames ( ) ) ;
@ -407,13 +427,15 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
List < PopulationInformationEntity > insertPopulationInfo = new ArrayList < > ( ) ;
//房屋户主信息 -- 户主更新
List < HouseResidentEntity > houseResidentEntityList = new ArrayList < > ( ) ;
//房屋户主信息 -- 户主新增
List < HouseResidentEntity > insetHouseResidentEntityList = new ArrayList < > ( ) ;
a : for ( HousingInformationEntity housingInformationEntity : housingInformationEntityList ) {
//身份证校验
List < String > identifyNoValidation = new ArrayList < > ( ) ;
//存储 key:身份证 value 房子ID 身份证是可重复的
List < Map < String , String > > HouseResidentInfos = new ArrayList < > ( ) ;
a :
for ( HousingInformationEntity housingInformationEntity : housingInformationEntityList ) {
for ( BasePopulationInformationExcel basePopulationInformationExcel : basePopulationInformationExcels ) {
//以产权证为唯一标识
if ( housingInformationEntity . getPropertyOwnerCard ( ) . equals ( basePopulationInformationExcel . getPropertyOwnerCard ( ) ) ) {
if ( housingInformationEntity . getPropertyOwnerCard ( ) . equals ( basePopulationInformationExcel . getPropertyOwnerCard ( ) ) ) {
if ( HouseUseConstant . RENT . equals ( housingInformationEntity . getHouseUse ( ) ) ) {
//房屋租赁信息
HouseRentInfoEntity houseRentInfoEntity = ConvertUtils . sourceToTarget ( basePopulationInformationExcel , HouseRentInfoEntity . class ) ;
@ -431,6 +453,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
if ( oldPopulationInformationEntity ! = null ) {
//身份证在列表已存在,则更新户主信息
populationInformationEntity . setId ( oldPopulationInformationEntity . getId ( ) ) ;
//先检验下户主的一些信息
validateHouseHeadInfo ( populationInformationEntity , basePopulationInformationExcel ) ;
updatePopulationInfo . add ( populationInformationEntity ) ;
//插入房屋人员关联关系表
HouseResidentEntity houseResidentEntity = new HouseResidentEntity ( ) ;
@ -439,12 +463,20 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
houseResidentEntity . setIsHouseHead ( "1" ) ;
houseResidentEntityList . add ( houseResidentEntity ) ;
} else {
insertPopulationInfo . add ( populationInformationEntity ) ;
//插入房屋人员关联关系表 - 先不插入人的ID
HouseResidentEntity houseResidentEntity = new HouseResidentEntity ( ) ;
houseResidentEntity . setHouseId ( housingInformationEntity . getId ( ) ) ;
houseResidentEntity . setIsHouseHead ( "1" ) ;
insetHouseResidentEntityList . add ( houseResidentEntity ) ;
//先检验下户主的一些信息
validateHouseHeadInfo ( populationInformationEntity , basePopulationInformationExcel ) ;
//将新增的人员的身份证存到List,防止excel中重复的身份证增加不同的户主信息
if ( ! identifyNoValidation . contains ( populationInformationEntity . getResidentsIdentityNo ( ) ) ) {
//如果不包含,才新增进去。也就是说如果重复的身份证,只取第一条信息作为户主信息
insertPopulationInfo . add ( populationInformationEntity ) ;
}
identifyNoValidation . add ( populationInformationEntity . getResidentsIdentityNo ( ) ) ;
//方便下面新增房屋人员关系表,此时存储所有的户主身份证+房子ID
Map < String , String > houseResidentInfo = new HashMap < > ( ) ;
houseResidentInfo . put ( populationInformationEntity . getResidentsIdentityNo ( ) , housingInformationEntity . getId ( ) ) ;
HouseResidentInfos . add ( houseResidentInfo ) ;
}
continue a ;
}
@ -465,14 +497,85 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
//插入人口信息
if ( insertPopulationInfo . size ( ) > 0 ) {
populationInformationService . insertBatch ( insertPopulationInfo ) ;
//遍历存储的身份证+房子ID对应信息,组装房屋人员关系
for ( Map < String , String > houseResidentInfo : HouseResidentInfos ) {
Set < Map . Entry < String , String > > set = houseResidentInfo . entrySet ( ) ;
for ( Map . Entry < String , String > entry : set ) {
String identifyNo = entry . getKey ( ) ;
String houseId = entry . getValue ( ) ;
//根据身份证取户主ID
for ( PopulationInformationEntity populationInformationEntity : insertPopulationInfo ) {
if ( populationInformationEntity . getResidentsIdentityNo ( ) . equals ( identifyNo ) ) {
HouseResidentEntity houseResidentEntity = new HouseResidentEntity ( ) ;
houseResidentEntity . setHouseId ( houseId ) ;
houseResidentEntity . setResidentId ( populationInformationEntity . getId ( ) ) ;
houseResidentEntity . setIsHouseHead ( "1" ) ;
houseResidentEntityList . add ( houseResidentEntity ) ;
break ;
}
}
}
}
}
//插入房屋人员关系
if ( houseResidentEntityList . size ( ) > 0 ) {
houseResidentService . insertBatch ( houseResidentEntityList ) ;
}
}
/ * *
* @return void
* @Description 校验excel新增时户主的一些信息
* @Author songyunpeng
* @Date 2020 / 9 / 4
* @Param [ populationInformationEntity ]
* * /
private void validateHouseHeadInfo ( PopulationInformationEntity populationInformationEntity , BasePopulationInformationExcel basePopulationInformationExcel ) {
//赋值失业登记时间
if ( StringUtils . isNotBlank ( basePopulationInformationExcel . getUnemploymentRegisterTime ( ) ) ) {
populationInformationEntity . setUnemploymentRegisterTime ( DateUtil . parse ( basePopulationInformationExcel . getUnemploymentRegisterTime ( ) ) ) ;
}
for ( int i = 0 ; i < insertPopulationInfo . size ( ) ; i + + ) {
insetHouseResidentEntityList . get ( i ) . setResidentId ( insertPopulationInfo . get ( i ) . getId ( ) ) ;
//赋值入党时间
if ( StringUtils . isNotBlank ( basePopulationInformationExcel . getJoinTime ( ) ) ) {
populationInformationEntity . setJoinTime ( DateUtil . parse ( basePopulationInformationExcel . getJoinTime ( ) ) ) ;
}
insetHouseResidentEntityList . addAll ( houseResidentEntityList ) ;
//插入房屋人员关系表
if ( insetHouseResidentEntityList . size ( ) > 0 ) {
houseResidentService . insertBatch ( insetHouseResidentEntityList ) ;
//如果状态为群众。清空excel中多余的入党时间和组织关系所在地
if ( "0" . equals ( basePopulationInformationExcel . getPoliticsStatus ( ) ) ) {
if ( StringUtils . isNotBlank ( populationInformationEntity . getId ( ) ) ) {
//ID不为空为更新,此时手动置空入党时间
populationInformationService . setJionTimeToNull ( populationInformationEntity . getId ( ) ) ;
}
populationInformationEntity . setJoinTime ( null ) ;
populationInformationEntity . setOrganizationalRelationshipLocation ( "" ) ;
}
if ( "0" . equals ( basePopulationInformationExcel . getEmploymentStatus ( ) ) ) {
//如果选在岗,则清空失业原因,再就业优惠政,失业登记和失业登记时间
populationInformationEntity . setUnemploymentReason ( "" ) ;
populationInformationEntity . setReemploymentPermit ( "" ) ;
populationInformationEntity . setUnemploymentRegister ( "" ) ;
if ( StringUtils . isNotBlank ( populationInformationEntity . getId ( ) ) ) {
//ID不为空为更新,此时手动置空失业登记时间时间
populationInformationService . setUnemploymentRegisterTimeToNull ( populationInformationEntity . getId ( ) ) ;
}
populationInformationEntity . setUnemploymentRegisterTime ( null ) ;
} else if ( "1" . equals ( basePopulationInformationExcel . getEmploymentStatus ( ) ) ) {
//如果选择失业,也清空 工作单位 和工作单位地址
populationInformationEntity . setCurrentEmployer ( "" ) ;
populationInformationEntity . setCurrentEmployerAddress ( "" ) ;
//如果失业且失业登记为否,清空失业登记时间
if ( "0" . equals ( populationInformationEntity . getUnemploymentRegister ( ) ) ) {
if ( StringUtils . isNotBlank ( populationInformationEntity . getId ( ) ) ) {
//ID不为空为更新,此时手动置空失业登记时间时间
populationInformationService . setUnemploymentRegisterTimeToNull ( populationInformationEntity . getId ( ) ) ;
}
populationInformationEntity . setUnemploymentRegisterTime ( null ) ;
}
}
if ( basePopulationInformationExcel . getMotorVehicleNum ( ) = = 0 ) {
//如果机动车数量为0 清空机动车类型
populationInformationEntity . setMotorVehicleCategory ( "" ) ;
}
}
@ -489,35 +592,30 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
EpdcPopulationErrorResultDTO errorLineInfoDto ;
for ( int i = 0 ; i < basePopulationInformationExcels . size ( ) ; i + + ) {
BaseResidentInformationExcel baseResidentInformationExcel = basePopulationInformationExcels . get ( i ) ;
String residentsIdentityNo = baseResidentInformationExcel . getResidentsIdentityNo ( ) ;
String houseHeadRelation = baseResidentInformationExcel . getHouseHeadRelation ( ) ;
String residentsName = baseResidentInformationExcel . getResidentsName ( ) ;
String residentsSex = baseResidentInformationExcel . getResidentsSex ( ) ;
String residentsNation = baseResidentInformationExcel . getResidentsNation ( ) ;
String currentEmployer = baseResidentInformationExcel . getCurrentEmployer ( ) ;
String currentAddress = baseResidentInformationExcel . getCurrentAddress ( ) ;
String residentsIdentityNo = baseResidentInformationExcel . getResidentsIdentityNo ( ) = = null ? null : baseResidentInformationExcel . getResidentsIdentityNo ( ) . trim ( ) ;
String houseHeadRelation = baseResidentInformationExcel . getHouseHeadRelation ( ) = = null ? null : baseResidentInformationExcel . getHouseHeadRelation ( ) . trim ( ) ;
String residentsName = baseResidentInformationExcel . getResidentsName ( ) = = null ? null : baseResidentInformationExcel . getResidentsName ( ) . trim ( ) ;
String residentsSex = baseResidentInformationExcel . getResidentsSex ( ) = = null ? null : baseResidentInformationExcel . getResidentsSex ( ) . trim ( ) ;
String residentsNation = baseResidentInformationExcel . getResidentsNation ( ) = = null ? null : baseResidentInformationExcel . getResidentsNation ( ) . trim ( ) ;
String currentEmployer = baseResidentInformationExcel . getCurrentEmployer ( ) = = null ? null : baseResidentInformationExcel . getCurrentEmployer ( ) . trim ( ) ;
String currentAddress = baseResidentInformationExcel . getCurrentAddress ( ) = = null ? null : baseResidentInformationExcel . getCurrentAddress ( ) . trim ( ) ;
if ( StringUtils . isBlank ( residentsIdentityNo ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
errorLineInfoDto . setErrorLine ( ( i + 2 ) + "" ) ;
errorLineInfoDto . setErrorInfo ( "户主身份证号为空" ) ;
errorLineInfoDto . setSheetName ( "居住人信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} / * else if ( StringUtils . isNotBlank ( ( residentsIdentityNo ) ) ) {
PopulationInformationEntity infoByIdentityNo = populationInformationService . getInfoByIdentityNo ( residentsIdentityNo ) ;
if ( infoByIdentityNo = = null ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
errorLineInfoDto . setErrorLine ( ( i + 2 ) + "" ) ;
errorLineInfoDto . setErrorInfo ( "该户主不存在" ) ;
errorLineInfoDto . setSheetName ( "居住人信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
}
} * /
} else if ( StringUtils . isNotBlank ( ( residentsIdentityNo ) ) ) {
baseResidentInformationExcel . setResidentsIdentityNo ( residentsIdentityNo ) ;
}
if ( StringUtils . isBlank ( houseHeadRelation ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
errorLineInfoDto . setErrorLine ( ( i + 2 ) + "" ) ;
errorLineInfoDto . setErrorInfo ( "与户主关系为空" ) ;
errorLineInfoDto . setSheetName ( "居住人信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( houseHeadRelation ) ) ) {
baseResidentInformationExcel . setHouseHeadRelation ( houseHeadRelation ) ;
}
if ( StringUtils . isNotBlank ( houseHeadRelation ) & & ! "0" . equals ( houseHeadRelation ) & & ! "1" . equals ( houseHeadRelation ) & & ! "2" . equals ( houseHeadRelation ) & & ! "3" . equals ( houseHeadRelation ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -532,6 +630,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "姓名为空" ) ;
errorLineInfoDto . setSheetName ( "居住人信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( residentsName ) ) ) {
baseResidentInformationExcel . setResidentsName ( residentsName ) ;
}
if ( StringUtils . isBlank ( residentsSex ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -539,6 +639,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "性别为空" ) ;
errorLineInfoDto . setSheetName ( "居住人信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( residentsSex ) ) ) {
baseResidentInformationExcel . setResidentsSex ( residentsSex ) ;
}
if ( StringUtils . isNotBlank ( residentsSex ) & & ! "0" . equals ( residentsSex ) & & ! "1" . equals ( residentsSex ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -553,6 +655,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "民族为空" ) ;
errorLineInfoDto . setSheetName ( "居住人信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( residentsNation ) ) ) {
baseResidentInformationExcel . setResidentsNation ( residentsNation ) ;
}
if ( StringUtils . isBlank ( currentEmployer ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -560,6 +664,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "工作单位或学校地址为空" ) ;
errorLineInfoDto . setSheetName ( "居住人信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( currentEmployer ) ) ) {
baseResidentInformationExcel . setCurrentEmployer ( currentEmployer ) ;
}
if ( StringUtils . isBlank ( currentAddress ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -567,6 +673,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "现居住地址为空" ) ;
errorLineInfoDto . setSheetName ( "居住人信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( currentAddress ) ) ) {
baseResidentInformationExcel . setCurrentAddress ( currentAddress ) ;
}
}
@ -586,55 +694,57 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
// 不匹配信息
List < EpdcPopulationErrorResultDTO > errorLineInfoList = new ArrayList < > ( ) ;
EpdcPopulationErrorResultDTO errorLineInfoDto ;
Map < String , String > isPropertyOwnerCard = new ConcurrentHashMap < > ( ) ;
Map < String , String > isPropertyOwnerCard = new ConcurrentHashMap < > ( ) ;
for ( int i = 0 ; i < basePopulationInformationExcels . size ( ) ; i + + ) {
BasePopulationInformationExcel basePopulationInformationExcel = basePopulationInformationExcels . get ( i ) ;
String houseAddress = basePopulationInformationExcel . getHouseAddress ( ) ;
String buyingTime = basePopulationInformationExcel . getBuyingTime ( ) ;
String houseAddress = basePopulationInformationExcel . getHouseAddress ( ) = = null ? null : basePopulationInformationExcel . getHouseAddress ( ) . trim ( ) ;
String buyingTime = basePopulationInformationExcel . getBuyingTime ( ) = = null ? null : basePopulationInformationExcel . getBuyingTime ( ) . trim ( ) ;
BigDecimal houseArea = basePopulationInformationExcel . getHouseArea ( ) ;
String propertyOwner = basePopulationInformationExcel . getPropertyOwner ( ) ;
String propertyOwnerIdentityNo = basePopulationInformationExcel . getPropertyOwnerIdentityNo ( ) ;
String propertyOwnerMobile = basePopulationInformationExcel . getPropertyOwnerMobile ( ) ;
String propertyOwnerCard = basePopulationInformationExcel . getPropertyOwnerCard ( ) ;
String houseUse = basePopulationInformationExcel . getHouseUse ( ) ;
String tenantName = basePopulationInformationExcel . getTenantName ( ) ;
String tenantIdentityNo = basePopulationInformationExcel . getTenantIdentityNo ( ) ;
String tenantPhone = basePopulationInformationExcel . getTenantPhone ( ) ;
String enterpriseName = basePopulationInformationExcel . getEnterpriseName ( ) ;
String legalRepresentative = basePopulationInformationExcel . getLegalRepresentative ( ) ;
String enterprisePhone = basePopulationInformationExcel . getEnterprisePhone ( ) ;
String socialUniformCode = basePopulationInformationExcel . getSocialUniformCode ( ) ;
String residentsName = basePopulationInformationExcel . getResidentsName ( ) ;
String residentsNation = basePopulationInformationExcel . getResidentsNation ( ) ;
String educationLevel = basePopulationInformationExcel . getEducationLevel ( ) ;
String politicsStatus = basePopulationInformationExcel . getPoliticsStatus ( ) ;
String joinTime = basePopulationInformationExcel . getJoinTime ( ) ;
String organizationalRelationshipLocation = basePopulationInformationExcel . getOrganizationalRelationshipLocation ( ) ;
String residentsIdentityNo = basePopulationInformationExcel . getResidentsIdentityNo ( ) ;
String residentsPhone = basePopulationInformationExcel . getResidentsPhone ( ) ;
String bodyStatus = basePopulationInformationExcel . getBodyStatus ( ) ;
String maritalStatus = basePopulationInformationExcel . getMaritalStatus ( ) ;
String accountType = basePopulationInformationExcel . getAccountType ( ) ;
String militaryService = basePopulationInformationExcel . getMilitaryService ( ) ;
String householdRegistrationPlace = basePopulationInformationExcel . getHouseholdRegistrationPlace ( ) ;
String employmentStatus = basePopulationInformationExcel . getEmploymentStatus ( ) ;
String currentEmployer = basePopulationInformationExcel . getCurrentEmployer ( ) ;
String currentEmployerAddress = basePopulationInformationExcel . getCurrentEmployerAddress ( ) ;
String unemploymentReason = basePopulationInformationExcel . getUnemploymentReason ( ) ;
String reemploymentPermit = basePopulationInformationExcel . getReemploymentPermit ( ) ;
String unemploymentRegister = basePopulationInformationExcel . getUnemploymentRegister ( ) ;
String unemploymentRegisterTime = basePopulationInformationExcel . getUnemploymentRegisterTime ( ) ;
String familyCategory = basePopulationInformationExcel . getFamilyCategory ( ) ;
String helpStatus = basePopulationInformationExcel . getHelpStatus ( ) ;
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 ( ) ;
String tenantPhone = basePopulationInformationExcel . getTenantPhone ( ) = = null ? null : basePopulationInformationExcel . getTenantPhone ( ) . trim ( ) ;
String enterpriseName = basePopulationInformationExcel . getEnterpriseName ( ) = = null ? null : basePopulationInformationExcel . getEnterpriseName ( ) . trim ( ) ;
String legalRepresentative = basePopulationInformationExcel . getLegalRepresentative ( ) = = null ? null : basePopulationInformationExcel . getLegalRepresentative ( ) . trim ( ) ;
String enterprisePhone = basePopulationInformationExcel . getEnterprisePhone ( ) = = null ? null : basePopulationInformationExcel . getEnterprisePhone ( ) . trim ( ) ;
String socialUniformCode = basePopulationInformationExcel . getSocialUniformCode ( ) = = null ? null : basePopulationInformationExcel . getSocialUniformCode ( ) . trim ( ) ;
String residentsName = basePopulationInformationExcel . getResidentsName ( ) = = null ? null : basePopulationInformationExcel . getResidentsName ( ) . trim ( ) ;
String residentsNation = basePopulationInformationExcel . getResidentsNation ( ) = = null ? null : basePopulationInformationExcel . getResidentsNation ( ) . trim ( ) ;
String educationLevel = basePopulationInformationExcel . getEducationLevel ( ) = = null ? null : basePopulationInformationExcel . getEducationLevel ( ) . trim ( ) ;
String politicsStatus = basePopulationInformationExcel . getPoliticsStatus ( ) = = null ? null : basePopulationInformationExcel . getPoliticsStatus ( ) . trim ( ) ;
String joinTime = basePopulationInformationExcel . getJoinTime ( ) = = null ? null : basePopulationInformationExcel . getJoinTime ( ) . trim ( ) ;
String organizationalRelationshipLocation = basePopulationInformationExcel . getOrganizationalRelationshipLocation ( ) = = null ? null : basePopulationInformationExcel . getOrganizationalRelationshipLocation ( ) . trim ( ) ;
String residentsIdentityNo = basePopulationInformationExcel . getResidentsIdentityNo ( ) = = null ? null : basePopulationInformationExcel . getResidentsIdentityNo ( ) . trim ( ) ;
String residentsPhone = basePopulationInformationExcel . getResidentsPhone ( ) = = null ? null : basePopulationInformationExcel . getResidentsPhone ( ) . trim ( ) ;
String bodyStatus = basePopulationInformationExcel . getBodyStatus ( ) = = null ? null : basePopulationInformationExcel . getBodyStatus ( ) . trim ( ) ;
String maritalStatus = basePopulationInformationExcel . getMaritalStatus ( ) = = null ? null : basePopulationInformationExcel . getMaritalStatus ( ) . trim ( ) ;
String accountType = basePopulationInformationExcel . getAccountType ( ) = = null ? null : basePopulationInformationExcel . getAccountType ( ) . trim ( ) ;
String militaryService = basePopulationInformationExcel . getMilitaryService ( ) = = null ? null : basePopulationInformationExcel . getMilitaryService ( ) . trim ( ) ;
String householdRegistrationPlace = basePopulationInformationExcel . getHouseholdRegistrationPlace ( ) = = null ? null : basePopulationInformationExcel . getHouseholdRegistrationPlace ( ) . trim ( ) ;
String employmentStatus = basePopulationInformationExcel . getEmploymentStatus ( ) = = null ? null : basePopulationInformationExcel . getEmploymentStatus ( ) . trim ( ) ;
String currentEmployer = basePopulationInformationExcel . getCurrentEmployer ( ) = = null ? null : basePopulationInformationExcel . getCurrentEmployer ( ) . trim ( ) ;
String currentEmployerAddress = basePopulationInformationExcel . getCurrentEmployerAddress ( ) = = null ? null : basePopulationInformationExcel . getCurrentEmployerAddress ( ) . trim ( ) ;
String unemploymentReason = basePopulationInformationExcel . getUnemploymentReason ( ) = = null ? null : basePopulationInformationExcel . getUnemploymentReason ( ) . trim ( ) ;
String reemploymentPermit = basePopulationInformationExcel . getReemploymentPermit ( ) = = null ? null : basePopulationInformationExcel . getReemploymentPermit ( ) . trim ( ) ;
String unemploymentRegister = basePopulationInformationExcel . getUnemploymentRegister ( ) = = null ? null : basePopulationInformationExcel . getUnemploymentRegister ( ) . trim ( ) ;
String unemploymentRegisterTime = basePopulationInformationExcel . getUnemploymentRegisterTime ( ) = = null ? null : basePopulationInformationExcel . getUnemploymentRegisterTime ( ) . trim ( ) ;
String familyCategory = basePopulationInformationExcel . getFamilyCategory ( ) = = null ? null : basePopulationInformationExcel . getFamilyCategory ( ) . trim ( ) ;
String helpStatus = basePopulationInformationExcel . getHelpStatus ( ) = = null ? null : basePopulationInformationExcel . getHelpStatus ( ) . trim ( ) ;
Integer motorVehicleNum = basePopulationInformationExcel . getMotorVehicleNum ( ) ;
String motorVehicleCategory = basePopulationInformationExcel . getMotorVehicleCategory ( ) ;
String dogStatus = basePopulationInformationExcel . getDogStatus ( ) ;
String motorVehicleCategory = basePopulationInformationExcel . getMotorVehicleCategory ( ) = = null ? null : basePopulationInformationExcel . getMotorVehicleCategory ( ) . trim ( ) ;
String dogStatus = basePopulationInformationExcel . getDogStatus ( ) = = null ? null : basePopulationInformationExcel . getDogStatus ( ) . trim ( ) ;
if ( StringUtils . isBlank ( houseAddress ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
errorLineInfoDto . setErrorLine ( ( i + 2 ) + "" ) ;
errorLineInfoDto . setErrorInfo ( "房屋地址为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( houseAddress ) ) ) {
basePopulationInformationExcel . setHouseAddress ( houseAddress ) ;
}
if ( StringUtils . isBlank ( buyingTime ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -642,6 +752,24 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "购房时间为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else 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 ( houseArea = = null ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -656,6 +784,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "产权人为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( propertyOwner ) ) ) {
basePopulationInformationExcel . setPropertyOwner ( propertyOwner ) ;
}
if ( StringUtils . isBlank ( propertyOwnerIdentityNo ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -663,6 +793,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "产权人身份证号为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( propertyOwnerIdentityNo ) ) ) {
basePopulationInformationExcel . setPropertyOwnerIdentityNo ( propertyOwnerIdentityNo ) ;
}
if ( StringUtils . isBlank ( propertyOwnerMobile ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -670,6 +802,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "产权人电话为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( propertyOwnerMobile ) ) ) {
basePopulationInformationExcel . setPropertyOwnerMobile ( propertyOwnerMobile ) ;
}
if ( StringUtils . isBlank ( propertyOwnerCard ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -677,7 +811,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "产权证为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( propertyOwnerCard ) ) {
} else if ( StringUtils . isNotBlank ( propertyOwnerCard ) ) {
for ( HousingInformationDTO housingInformationDTO : housingInformationDTOS ) {
if ( housingInformationDTO . getPropertyOwnerCard ( ) . equals ( propertyOwnerCard ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -687,14 +821,15 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoList . add ( errorLineInfoDto ) ;
}
}
if ( isPropertyOwnerCard . containsKey ( propertyOwnerCard ) ) {
if ( isPropertyOwnerCard . containsKey ( propertyOwnerCard ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
errorLineInfoDto . setErrorLine ( ( i + 2 ) + "" ) ;
errorLineInfoDto . setErrorLine ( ( i + 2 ) + "" ) ;
errorLineInfoDto . setErrorInfo ( "产权证在EXCEL已存在" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
}
isPropertyOwnerCard . put ( propertyOwnerCard , ( i + 2 ) + "" ) ;
isPropertyOwnerCard . put ( propertyOwnerCard , ( i + 2 ) + "" ) ;
basePopulationInformationExcel . setPropertyOwnerCard ( propertyOwnerCard ) ;
}
if ( StringUtils . isBlank ( houseUse ) ) {
@ -703,6 +838,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "房屋用途为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( houseUse ) ) ) {
basePopulationInformationExcel . setHouseUse ( houseUse ) ;
}
if ( StringUtils . isNotBlank ( houseUse ) & & ! "0" . equals ( houseUse ) & & ! "1" . equals ( houseUse ) & & ! "2" . equals ( houseUse ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -718,6 +855,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "承租人为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( tenantName ) ) ) {
basePopulationInformationExcel . setTenantName ( tenantName ) ;
}
if ( StringUtils . isBlank ( tenantPhone ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -725,6 +864,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "承租人电话为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( tenantPhone ) ) ) {
basePopulationInformationExcel . setTenantPhone ( tenantPhone ) ;
}
if ( StringUtils . isBlank ( tenantIdentityNo ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -733,6 +874,18 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
}
if ( StringUtils . isNotBlank ( tenantIdentityNo ) ) {
String result = IdentityNoUtils . IdentityNoVerification ( tenantIdentityNo ) ;
if ( result ! = null ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
errorLineInfoDto . setErrorLine ( ( i + 2 ) + "" ) ;
errorLineInfoDto . setErrorInfo ( "承租人身份证号有误" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
}
basePopulationInformationExcel . setTenantIdentityNo ( tenantIdentityNo ) ;
}
} else if ( HouseUseConstant . BUSINESS . equals ( houseUse ) ) {
if ( StringUtils . isBlank ( enterpriseName ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -740,6 +893,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "企业名称为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( enterpriseName ) ) ) {
basePopulationInformationExcel . setEnterpriseName ( enterpriseName ) ;
}
if ( StringUtils . isBlank ( legalRepresentative ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -747,6 +902,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "法人为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( legalRepresentative ) ) ) {
basePopulationInformationExcel . setLegalRepresentative ( legalRepresentative ) ;
}
if ( StringUtils . isBlank ( enterprisePhone ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -754,6 +911,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "企业联系电话为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( enterprisePhone ) ) ) {
basePopulationInformationExcel . setEnterprisePhone ( enterprisePhone ) ;
}
if ( StringUtils . isBlank ( socialUniformCode ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -761,6 +920,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "社会统一代码为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( socialUniformCode ) ) ) {
basePopulationInformationExcel . setSocialUniformCode ( socialUniformCode ) ;
}
}
if ( StringUtils . isBlank ( residentsName ) ) {
@ -769,6 +930,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "户主姓名为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( residentsName ) ) ) {
basePopulationInformationExcel . setResidentsName ( residentsName ) ;
}
if ( StringUtils . isBlank ( residentsNation ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -776,6 +939,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "民族为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( residentsNation ) ) ) {
basePopulationInformationExcel . setResidentsNation ( residentsNation ) ;
}
if ( StringUtils . isBlank ( educationLevel ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -840,6 +1005,23 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "入党时间为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else 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 . isBlank ( organizationalRelationshipLocation ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -847,6 +1029,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "组织关系所在地为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( organizationalRelationshipLocation ) ) ) {
basePopulationInformationExcel . setOrganizationalRelationshipLocation ( organizationalRelationshipLocation ) ;
}
}
if ( StringUtils . isBlank ( residentsIdentityNo ) ) {
@ -864,10 +1048,11 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "户主身份证号码有误" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else {
} else {
basePopulationInformationExcel . setResidentsSex ( IdentityNoUtils . getSex ( residentsIdentityNo ) ) ;
basePopulationInformationExcel . setResidentsBirthday ( DateUtil . parse ( IdentityNoUtils . getBirthday ( residentsIdentityNo ) ) ) ;
}
basePopulationInformationExcel . setResidentsIdentityNo ( residentsIdentityNo ) ;
}
if ( StringUtils . isBlank ( residentsPhone ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -875,6 +1060,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "户主联系电话为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( residentsPhone ) ) ) {
basePopulationInformationExcel . setResidentsPhone ( residentsPhone ) ;
}
if ( StringUtils . isBlank ( bodyStatus ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -931,6 +1118,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
}
}
if ( StringUtils . isBlank ( accountType ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -958,6 +1146,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
}
}
if ( StringUtils . isBlank ( militaryService ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -965,6 +1154,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "户主是否服兵役为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( militaryService ) ) ) {
basePopulationInformationExcel . setMilitaryService ( militaryService ) ;
}
if ( StringUtils . isNotBlank ( militaryService ) & & ! "0" . equals ( militaryService ) & & ! "1" . equals ( militaryService ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -979,6 +1170,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "户主户籍地为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( householdRegistrationPlace ) ) ) {
basePopulationInformationExcel . setHouseholdRegistrationPlace ( householdRegistrationPlace ) ;
}
if ( StringUtils . isBlank ( employmentStatus ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -1014,6 +1207,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "户主现工作单位为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( currentEmployer ) ) ) {
basePopulationInformationExcel . setCurrentEmployer ( currentEmployer ) ;
}
if ( StringUtils . isBlank ( currentEmployerAddress ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -1021,6 +1216,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "户主现单位地址为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( currentEmployerAddress ) ) ) {
basePopulationInformationExcel . setCurrentEmployerAddress ( currentEmployerAddress ) ;
}
} else if ( "失业" . equals ( employmentStatus ) ) {
if ( StringUtils . isBlank ( unemploymentReason ) ) {
@ -1056,6 +1253,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "户主是否有再就业优惠证为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( reemploymentPermit ) ) ) {
basePopulationInformationExcel . setReemploymentPermit ( reemploymentPermit ) ;
}
if ( StringUtils . isNotBlank ( reemploymentPermit ) & & ! "0" . equals ( reemploymentPermit ) & & ! "1" . equals ( reemploymentPermit ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -1070,6 +1269,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "户主是否失业登记为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( ( unemploymentRegister ) ) ) {
basePopulationInformationExcel . setUnemploymentRegister ( unemploymentRegister ) ;
}
if ( StringUtils . isNotBlank ( unemploymentRegister ) & & ! "0" . equals ( unemploymentRegister ) & & ! "1" . equals ( unemploymentRegister ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
@ -1078,12 +1279,31 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
}
if ( StringUtils . isBlank ( unemploymentRegisterTime ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;
errorLineInfoDto . setErrorLine ( ( i + 2 ) + "" ) ;
errorLineInfoDto . setErrorInfo ( "户主失业登记时间为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
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 ( ! 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 ) ;
}
}
}
if ( StringUtils . isBlank ( familyCategory ) ) {
@ -1181,6 +1401,8 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto . setErrorInfo ( "宠物犬情况为空" ) ;
errorLineInfoDto . setSheetName ( "房屋信息和户主信息" ) ;
errorLineInfoList . add ( errorLineInfoDto ) ;
} else if ( StringUtils . isNotBlank ( dogStatus ) ) {
basePopulationInformationExcel . setDogStatus ( dogStatus ) ;
}
if ( StringUtils . isNotBlank ( dogStatus ) & & ! "0" . equals ( dogStatus ) & & ! "1" . equals ( dogStatus ) ) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO ( ) ;