Browse Source

注释

origin/epidemic_user
zhangyuan 4 years ago
parent
commit
1705dd188f
  1. 6
      epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/house/service/impl/HousingInformationServiceImpl.java

6
epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/house/service/impl/HousingInformationServiceImpl.java

@ -346,7 +346,6 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
}
List<SysPopulationSimpleDictDTO> sysPopulationSimpleDictDTOS = listResult.getData();
File f = StreamUtils.conversionFile(file);
ImportParams importParams = new ImportParams();
try {
@ -381,9 +380,11 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
epdcResidentErrorResultDTOS = this.checkResidentsExcel(baseResidentInformationExcels, sysPopulationSimpleDictDTOS, residentIdentifyNo);
}
}
// 校验户主和房屋信息
if (epdcHouseAndHouseHeadErrorResultDTOS != null && epdcHouseAndHouseHeadErrorResultDTOS.size() > 0) {
return new Result().ok(epdcHouseAndHouseHeadErrorResultDTOS);
}
// 校验居住人信息
if (epdcResidentErrorResultDTOS != null && epdcResidentErrorResultDTOS.size() > 0) {
return new Result().ok(epdcResidentErrorResultDTOS);
}
@ -482,6 +483,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
populationInformationEntity.setResidentsIdentityNo(baseResidentInformationExcel.getResidentsFamilyIdentityNo());
EpidemicUserInfoEntity epidemicUserInfoEntity = convertInformationToUserInfo(populationInformationEntity);
epidemicUserInfoEntity.setIdCard(baseResidentInformationExcel.getSelfIdentityNo());
// 已存在的居民信息进行更新,否则进行插入操作
EpidemicUserInfoEntity check = epidemicUserInfoService.selectInfoByIdCard(baseResidentInformationExcel.getSelfIdentityNo());
if (null == check) {
epidemicUserInfoEntity.setRelation(baseResidentInformationExcel.getHouseHeadRelation());
@ -551,6 +553,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
housingInformationEntity.setParentDeptNames(parentAndAllDeptDTO.getParentDeptNames());
housingInformationEntity.setParentDeptIds(parentAndAllDeptDTO.getParentDeptIds());
baseDao.insert(housingInformationEntity);
// 租赁和经营类型的信息需要额外存储
if (HouseUseConstant.RENT.equals(housingInformationEntity.getHouseUse())) {
//房屋租赁信息
HouseRentInfoEntity houseRentInfoEntity = ConvertUtils.sourceToTarget(basePopulationInformationExcel, HouseRentInfoEntity.class);
@ -565,6 +568,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
//插入户主信息
PopulationInformationEntity populationInformationEntity = ConvertUtils.sourceToTarget(basePopulationInformationExcel, PopulationInformationEntity.class);
EpidemicUserInfoEntity epidemicUserInfoEntity = convertInformationToUserInfo(populationInformationEntity);
// 查找是否已存在该用户
EpidemicUserInfoEntity oldPopulationInformationEntity = epidemicUserInfoDao.selectInfoByIdCard(populationInformationEntity.getResidentsIdentityNo());
//校验户主信息
validateHouseHeadInfo(populationInformationEntity, basePopulationInformationExcel);

Loading…
Cancel
Save