|
|
@ -34,7 +34,6 @@ import com.elink.esua.epdc.vaccine.epidemic.dto.result.VaccinationInfoResultDTO; |
|
|
|
import com.elink.esua.epdc.vaccine.epidemic.dto.result.VaccinationInfoResultV2DTO; |
|
|
|
import com.elink.esua.epdc.vaccine.epidemic.entity.EpidemicUserErrorEntity; |
|
|
|
import com.elink.esua.epdc.vaccine.epidemic.entity.EpidemicUserInfoEntity; |
|
|
|
import com.elink.esua.epdc.vaccine.epidemic.excel.EpidemicReportUserInfoAllExcel; |
|
|
|
import com.elink.esua.epdc.vaccine.epidemic.service.EpidemicReportUserInfoService; |
|
|
|
import com.elink.esua.epdc.vaccine.epidemic.service.EpidemicUserErrorService; |
|
|
|
import com.elink.esua.epdc.vaccine.epidemic.service.EpidemicUserInfoService; |
|
|
@ -50,7 +49,6 @@ import com.elink.esua.epdc.vaccine.vim.service.VaccinationInfoService; |
|
|
|
import com.elink.esua.epdc.vaccine.vim.service.VaccinationUserRoleService; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.apache.poi.ss.usermodel.Workbook; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
@ -138,8 +136,8 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
if (result == null) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
if(StringUtils.isNotBlank(result.getAllDeptIds())){ |
|
|
|
result.setAllDeptIds(result.getAllDeptIds().replace(result.getAllDeptIds().substring(0,result.getAllDeptIds().indexOf(",")+1),"")); |
|
|
|
if (StringUtils.isNotBlank(result.getAllDeptIds())) { |
|
|
|
result.setAllDeptIds(result.getAllDeptIds().replace(result.getAllDeptIds().substring(0, result.getAllDeptIds().indexOf(",") + 1), "")); |
|
|
|
result.setDeptIdList(result.getAllDeptIds().split(",")); |
|
|
|
} |
|
|
|
// result.setIdCard(idEncrypt(result.getIdCard()));
|
|
|
@ -687,8 +685,8 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
PopulationDictConstant.PEOPLE_CATEGORIES); |
|
|
|
sysPopulationSimpleDictFormDTO.setDicTypes(dicTypes); |
|
|
|
List<SysPopulationSimpleDictDTO> sysPopulationSimpleDictDTOS = new ArrayList<>(); |
|
|
|
getSysDictList(sysPopulationSimpleDictFormDTO,sysPopulationSimpleDictDTOS); |
|
|
|
if(CollectionUtils.isEmpty(sysPopulationSimpleDictDTOS)){ |
|
|
|
getSysDictList(sysPopulationSimpleDictFormDTO, sysPopulationSimpleDictDTOS); |
|
|
|
if (CollectionUtils.isEmpty(sysPopulationSimpleDictDTOS)) { |
|
|
|
Result<List<SysPopulationSimpleDictDTO>> listResult = adminVimFeignClient.listPopulationSimple(sysPopulationSimpleDictFormDTO); |
|
|
|
if (listResult == null || !listResult.success()) { |
|
|
|
return new Result().error("获取字典信息失败"); |
|
|
@ -700,23 +698,24 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
ImportParams importParams = new ImportParams(); |
|
|
|
try { |
|
|
|
//获取多个sheet页
|
|
|
|
Workbook workBook = ExcelUtils.getWorkBook(file); |
|
|
|
// Workbook workBook = ExcelUtils.getWorkBook(file);
|
|
|
|
//户主身份证和插入的ID,便于保存居住人信息时匹配户主信息
|
|
|
|
Map<String, String> populationIdNoAndIdMap = new HashMap<>(); |
|
|
|
//户主导入数据
|
|
|
|
// List<BasePopulationInformationExcel> basePopulationInformationExcels = null;
|
|
|
|
//户主导入数据异常提示
|
|
|
|
// List<EpdcPopulationErrorResultDTO> epdcHouseAndHouseHeadErrorResultDTOS = null;
|
|
|
|
// List<EpdcPopulationErrorResultDTO> epdcHouseAndHouseHeadErrorResultDTOS;
|
|
|
|
//居民导入数据
|
|
|
|
List<BaseResidentInformationUpdateExcel> BaseResidentInformationUpdateExcels = null; |
|
|
|
List<BaseResidentInformationUpdateExcel> baseResidentInformationUpdateExcelsNew = null;// 处理错误数据使用
|
|
|
|
List<BaseResidentInformationUpdateExcel> BaseResidentInformationUpdateExcels; |
|
|
|
// 处理错误数据使用
|
|
|
|
List<BaseResidentInformationUpdateExcel> baseResidentInformationUpdateExcelsNew; |
|
|
|
//居民导入数据异常提示
|
|
|
|
List<EpdcPopulationErrorResultDTO> epdcResidentErrorResultDTOS = null; |
|
|
|
List<EpdcPopulationErrorResultDTO> epdcResidentErrorResultDTOS; |
|
|
|
|
|
|
|
// 存储批量插入实体
|
|
|
|
List<BaseResidentInformationUpdateExcel> addList = new ArrayList<BaseResidentInformationUpdateExcel>(); |
|
|
|
List<BaseResidentInformationUpdateExcel> addList = new ArrayList<>(); |
|
|
|
// 存储错误数据批量插入实体
|
|
|
|
List<BaseResidentInformationUpdateExcel> addErrorList = new ArrayList<BaseResidentInformationUpdateExcel>(); |
|
|
|
List<BaseResidentInformationUpdateExcel> addErrorList = new ArrayList<>(); |
|
|
|
|
|
|
|
//户主身份证列表,便于校验居住人页填写的身份证信息是否正确
|
|
|
|
// Set<String> residentIdentifyNo = new HashSet<>();
|
|
|
@ -731,11 +730,12 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
// basePopulationInformationExcels.forEach(basePopulationInformationExcel ->
|
|
|
|
// residentIdentifyNo.add(basePopulationInformationExcel.getResidentsIdentityNo())
|
|
|
|
// );
|
|
|
|
// } else if (numSheet == 1) {//检验和新增居住人信息
|
|
|
|
// } else if (numSheet == 1) {
|
|
|
|
// 检验和新增居住人信息
|
|
|
|
BaseResidentInformationUpdateExcels = ExcelImportUtil.importExcel(f, BaseResidentInformationUpdateExcel.class, importParams); |
|
|
|
baseResidentInformationUpdateExcelsNew = ExcelImportUtil.importExcel(f, BaseResidentInformationUpdateExcel.class, importParams); |
|
|
|
// 校验数据
|
|
|
|
epdcResidentErrorResultDTOS = this.checkResidentsExcel(BaseResidentInformationUpdateExcels,baseResidentInformationUpdateExcelsNew, sysPopulationSimpleDictDTOS,addList,addErrorList); |
|
|
|
epdcResidentErrorResultDTOS = this.checkResidentsExcel(BaseResidentInformationUpdateExcels, baseResidentInformationUpdateExcelsNew, sysPopulationSimpleDictDTOS, addList, addErrorList); |
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// 校验户主和房屋信息
|
|
|
@ -744,7 +744,7 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
// }
|
|
|
|
|
|
|
|
// 保存居住人信息
|
|
|
|
if (addList != null && addList.size() > 0) { |
|
|
|
if (addList.size() > 0) { |
|
|
|
saveResidentList(addList, parentAndAllDeptDTO, populationIdNoAndIdMap); |
|
|
|
} |
|
|
|
// 批量插入错误数据
|
|
|
@ -756,7 +756,7 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
epidemicUserErrorService.insertBatch(insertErrorList); |
|
|
|
|
|
|
|
// 校验居住人信息
|
|
|
|
if (epdcResidentErrorResultDTOS != null && epdcResidentErrorResultDTOS.size() > 0) { |
|
|
|
if (epdcResidentErrorResultDTOS.size() > 0) { |
|
|
|
return new Result().ok(epdcResidentErrorResultDTOS); |
|
|
|
} |
|
|
|
// 保存户主和房屋信息
|
|
|
@ -776,14 +776,14 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result updateSyncUser(SaveEpidemicUserDTO dto) { |
|
|
|
log.info("接受县平台更新人员信息"+dto); |
|
|
|
if(null != dto && !CollectionUtils.isEmpty(dto.getList())){ |
|
|
|
log.info("接受县平台更新人员信息" + dto); |
|
|
|
if (null != dto && !CollectionUtils.isEmpty(dto.getList())) { |
|
|
|
updateDictColumn(dto); |
|
|
|
for(EpidemicUserInfoEntity eu : dto.getList()){ |
|
|
|
for (EpidemicUserInfoEntity eu : dto.getList()) { |
|
|
|
EpidemicUserInfoEntity check = epidemicUserInfoDao.selectUserByIdCard(eu.getIdCard()); |
|
|
|
if (null == check) { |
|
|
|
if(null != eu.getDeptId()){ |
|
|
|
setDeptInfo(eu.getDeptId().toString(),eu); |
|
|
|
if (null != eu.getDeptId()) { |
|
|
|
setDeptInfo(eu.getDeptId().toString(), eu); |
|
|
|
} |
|
|
|
String delFlag = eu.getDelFlag(); |
|
|
|
Date updatedTime = eu.getUpdatedTime(); |
|
|
@ -791,11 +791,11 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
eu.setDelFlag(delFlag); |
|
|
|
eu.setUpdatedTime(updatedTime); |
|
|
|
baseDao.updateSysInfo(eu); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
BeanUtils.copyProperties(eu, check); |
|
|
|
//更新部门信息
|
|
|
|
if(null != eu.getDeptId()){ |
|
|
|
setDeptInfo(eu.getDeptId().toString(),eu); |
|
|
|
if (null != eu.getDeptId()) { |
|
|
|
setDeptInfo(eu.getDeptId().toString(), eu); |
|
|
|
} |
|
|
|
Date updatedTime = eu.getUpdatedTime(); |
|
|
|
updateById(check); |
|
|
@ -814,13 +814,13 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @describe: 将县平台传送过来的字典汉字转换为字典值 |
|
|
|
* @author wangtong |
|
|
|
* @date 2022/1/14 16:06 |
|
|
|
* @params [dto] |
|
|
|
* @return void |
|
|
|
*/ |
|
|
|
private void updateDictColumn(SaveEpidemicUserDTO dto){ |
|
|
|
* @return void |
|
|
|
* @describe: 将县平台传送过来的字典汉字转换为字典值 |
|
|
|
* @author wangtong |
|
|
|
* @date 2022/1/14 16:06 |
|
|
|
* @params [dto] |
|
|
|
*/ |
|
|
|
private void updateDictColumn(SaveEpidemicUserDTO dto) { |
|
|
|
//获取字典信息
|
|
|
|
SysPopulationSimpleDictFormDTO sysPopulationSimpleDictFormDTO = new SysPopulationSimpleDictFormDTO(); |
|
|
|
List<String> dicTypes = new ArrayList<>(); |
|
|
@ -839,8 +839,8 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
PopulationDictConstant.PEOPLE_CATEGORIES); |
|
|
|
sysPopulationSimpleDictFormDTO.setDicTypes(dicTypes); |
|
|
|
List<SysPopulationSimpleDictDTO> sysPopulationSimpleDictDTOS = new ArrayList<>(); |
|
|
|
getSysDictList(sysPopulationSimpleDictFormDTO,sysPopulationSimpleDictDTOS); |
|
|
|
if(CollectionUtils.isEmpty(sysPopulationSimpleDictDTOS)){ |
|
|
|
getSysDictList(sysPopulationSimpleDictFormDTO, sysPopulationSimpleDictDTOS); |
|
|
|
if (CollectionUtils.isEmpty(sysPopulationSimpleDictDTOS)) { |
|
|
|
Result<List<SysPopulationSimpleDictDTO>> listResult = adminVimFeignClient.listPopulationSimple(sysPopulationSimpleDictFormDTO); |
|
|
|
if (listResult == null || !listResult.success()) { |
|
|
|
throw new RenException("获取字典信息失败"); |
|
|
@ -848,7 +848,7 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
sysPopulationSimpleDictDTOS = listResult.getData(); |
|
|
|
} |
|
|
|
|
|
|
|
for(EpidemicUserInfoEntity userInfo : dto.getList()){ |
|
|
|
for (EpidemicUserInfoEntity userInfo : dto.getList()) { |
|
|
|
|
|
|
|
String specialCrowd = userInfo.getSpecialCrowd() == null ? null : userInfo.getSpecialCrowd().trim(); |
|
|
|
String peopleCategories = userInfo.getPeopleCategories() == null ? null : userInfo.getPeopleCategories().trim(); |
|
|
@ -1013,12 +1013,12 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void setDeptInfo(String deptId , EpidemicUserInfoEntity entity){ |
|
|
|
private void setDeptInfo(String deptId, EpidemicUserInfoEntity entity) { |
|
|
|
if (StringUtils.isNotBlank(deptId)) { |
|
|
|
Result<ParentAndAllDeptDTO> parentAndAllDept = adminVimFeignClient.getParentAndAllDept(deptId); |
|
|
|
if (!parentAndAllDept.success() || parentAndAllDept.getData() == null) { |
|
|
|
log.info("根据deptId暂无获取到部门信息:"+entity.toString()); |
|
|
|
return ; |
|
|
|
log.info("根据deptId暂无获取到部门信息:" + entity.toString()); |
|
|
|
return; |
|
|
|
} |
|
|
|
ParentAndAllDeptDTO parentAndAllDeptDTO = parentAndAllDept.getData(); |
|
|
|
entity.setDeptId(parentAndAllDeptDTO.getGridId()); |
|
|
@ -1054,7 +1054,7 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
sysPopulationSimpleDictDTO.setDicType(dictType); |
|
|
|
listResult.add(sysPopulationSimpleDictDTO); |
|
|
|
continue; |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
sysPopulationSimpleDictDTO = null; |
|
|
|
break; |
|
|
|
} |
|
|
@ -1077,15 +1077,13 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
List<BaseResidentInformationUpdateExcel> addErrorList) { |
|
|
|
// 不匹配信息
|
|
|
|
List<EpdcPopulationErrorResultDTO> errorLineInfoList = new ArrayList<>(); |
|
|
|
EpdcPopulationErrorResultDTO errorLineInfoDto = null; |
|
|
|
BaseResidentInformationUpdateExcel baseResidentInformationUpdateExcelNew = new BaseResidentInformationUpdateExcel(); |
|
|
|
EpdcPopulationErrorResultDTO errorLineInfoDto; |
|
|
|
BaseResidentInformationUpdateExcel errorBaseUserInfo; |
|
|
|
for (int i = 0; i < basePopulationInformationExcels.size(); i++) { |
|
|
|
String errorInfo = ""; |
|
|
|
BaseResidentInformationUpdateExcel BaseResidentInformationUpdateExcel = basePopulationInformationExcels.get(i); |
|
|
|
baseResidentInformationUpdateExcelNew = basePopulationInformationExcelsNew.get(i); |
|
|
|
// String residentsIdentityNo = BaseResidentInformationUpdateExcel.getResidentsIdentityNo() == null ? null : BaseResidentInformationUpdateExcel.getResidentsIdentityNo().trim();
|
|
|
|
errorBaseUserInfo = basePopulationInformationExcelsNew.get(i); |
|
|
|
String selfIdentityNo = BaseResidentInformationUpdateExcel.getSelfIdentityNo() == null ? null : BaseResidentInformationUpdateExcel.getSelfIdentityNo().trim(); |
|
|
|
// String houseHeadRelation = BaseResidentInformationUpdateExcel.getHouseHeadRelation() == null ? null : BaseResidentInformationUpdateExcel.getHouseHeadRelation().trim();
|
|
|
|
String residentsName = BaseResidentInformationUpdateExcel.getUserName() == null ? null : BaseResidentInformationUpdateExcel.getUserName().trim(); |
|
|
|
String residentsSex = BaseResidentInformationUpdateExcel.getGender() == null ? null : BaseResidentInformationUpdateExcel.getGender().trim(); |
|
|
|
String residentsNation = BaseResidentInformationUpdateExcel.getNation() == null ? null : BaseResidentInformationUpdateExcel.getNation().trim(); |
|
|
@ -1111,8 +1109,7 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
String result = IdentityNoUtils.IdentityNoVerification(selfIdentityNo); |
|
|
|
if (result != null) { |
|
|
|
errorInfo += "本人身份证号码有误;"; |
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
BaseResidentInformationUpdateExcel.setGender(IdentityNoUtils.getSex(selfIdentityNo)); |
|
|
|
BaseResidentInformationUpdateExcel.setAge(IdentityNoUtils.getAge(selfIdentityNo)); |
|
|
|
BaseResidentInformationUpdateExcel.setBirthday(IdentityNoUtils.getBirthday(selfIdentityNo)); |
|
|
@ -1345,18 +1342,18 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
} |
|
|
|
} |
|
|
|
//如果有错误信息
|
|
|
|
if(StringUtils.isNotBlank(errorInfo)){ |
|
|
|
if (StringUtils.isNotBlank(errorInfo)) { |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorInfo(errorInfo); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
|
|
|
|
// 设置错误信息
|
|
|
|
baseResidentInformationUpdateExcelNew.setErrorInfo(errorInfo); |
|
|
|
errorBaseUserInfo.setErrorInfo(errorInfo); |
|
|
|
// 加入错误列表
|
|
|
|
addErrorList.add(baseResidentInformationUpdateExcelNew); |
|
|
|
addErrorList.add(errorBaseUserInfo); |
|
|
|
|
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
addList.add(BaseResidentInformationUpdateExcel); |
|
|
|
} |
|
|
|
} |
|
|
@ -1375,13 +1372,11 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
for (BaseResidentInformationUpdateExcel baseResidentInformationExcel : baseResidentInformationExcels) { |
|
|
|
//插入居民信息
|
|
|
|
EpidemicUserInfoEntity epidemicUserInfoEntity = ConvertUtils.sourceToTarget(baseResidentInformationExcel, EpidemicUserInfoEntity.class); |
|
|
|
// populationInformationEntity.setResidentsIdentityNo(baseResidentInformationExcel.getResidentsFamilyIdentityNo());
|
|
|
|
// EpidemicUserInfoEntity epidemicUserInfoEntity = convertInformationToUserInfo(populationInformationEntity);
|
|
|
|
epidemicUserInfoEntity.setIdCard(baseResidentInformationExcel.getSelfIdentityNo()); |
|
|
|
if(StringUtils.isNotBlank(baseResidentInformationExcel.getMotorVehicleNum())){ |
|
|
|
if (StringUtils.isNotBlank(baseResidentInformationExcel.getMotorVehicleNum())) { |
|
|
|
epidemicUserInfoEntity.setMotorVehicleNum(Integer.valueOf(baseResidentInformationExcel.getMotorVehicleNum())); |
|
|
|
} |
|
|
|
if(null != parentAndAllDeptDTO){ |
|
|
|
if (null != parentAndAllDeptDTO) { |
|
|
|
epidemicUserInfoEntity.setDeptId(parentAndAllDeptDTO.getGridId()); |
|
|
|
epidemicUserInfoEntity.setDeptName(parentAndAllDeptDTO.getGrid()); |
|
|
|
epidemicUserInfoEntity.setParentDeptIds(parentAndAllDeptDTO.getParentDeptIds()); |
|
|
@ -1391,28 +1386,30 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
} |
|
|
|
//备注字典转换,不是数据字典
|
|
|
|
//再就业优惠证
|
|
|
|
if("无".equals(epidemicUserInfoEntity.getReemploymentPermit())){ |
|
|
|
if ("无".equals(epidemicUserInfoEntity.getReemploymentPermit())) { |
|
|
|
epidemicUserInfoEntity.setReemploymentPermit("0"); |
|
|
|
}else if("有".equals(epidemicUserInfoEntity.getReemploymentPermit())){ |
|
|
|
} else if ("有".equals(epidemicUserInfoEntity.getReemploymentPermit())) { |
|
|
|
epidemicUserInfoEntity.setReemploymentPermit("1"); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
epidemicUserInfoEntity.setReemploymentPermit(""); |
|
|
|
} |
|
|
|
//失业登记
|
|
|
|
if("否".equals(epidemicUserInfoEntity.getUnemploymentRegister())){ |
|
|
|
if ("否".equals(epidemicUserInfoEntity.getUnemploymentRegister())) { |
|
|
|
epidemicUserInfoEntity.setUnemploymentRegister("0"); |
|
|
|
}else if("是".equals(epidemicUserInfoEntity.getUnemploymentRegister())){ |
|
|
|
} else if ("是".equals(epidemicUserInfoEntity.getUnemploymentRegister())) { |
|
|
|
epidemicUserInfoEntity.setUnemploymentRegister("1"); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
epidemicUserInfoEntity.setUnemploymentRegister(""); |
|
|
|
} |
|
|
|
// 已存在的居民信息进行更新,否则进行插入操作
|
|
|
|
EpidemicUserInfoEntity check = epidemicUserInfoService.selectInfoByIdCard(baseResidentInformationExcel.getSelfIdentityNo()); |
|
|
|
|
|
|
|
List<EpidemicUserInfoEntity> addList = new ArrayList<>(); |
|
|
|
List<EpidemicUserInfoEntity> updateList = new ArrayList<>(); |
|
|
|
if (null == check) { |
|
|
|
// epidemicUserInfoEntity.setRelation(baseResidentInformationExcel.getHouseHeadRelation());
|
|
|
|
epidemicUserInfoService.insert(epidemicUserInfoEntity); |
|
|
|
addList.add(epidemicUserInfoEntity); |
|
|
|
// epidemicUserInfoService.insert(epidemicUserInfoEntity);
|
|
|
|
} else { |
|
|
|
// check.setRelation(baseResidentInformationExcel.getHouseHeadRelation());
|
|
|
|
check.setUserName(epidemicUserInfoEntity.getUserName()); |
|
|
|
check.setGender(epidemicUserInfoEntity.getGender()); |
|
|
|
check.setNation(epidemicUserInfoEntity.getNation()); |
|
|
@ -1424,7 +1421,6 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
check.setSpecialCrowd(epidemicUserInfoEntity.getSpecialCrowd()); |
|
|
|
check.setPoliticsStatus(epidemicUserInfoEntity.getPoliticsStatus()); |
|
|
|
|
|
|
|
|
|
|
|
check.setStandardOfCulture(epidemicUserInfoEntity.getStandardOfCulture()); |
|
|
|
check.setHealth(epidemicUserInfoEntity.getHealth()); |
|
|
|
check.setMaritalStatus(epidemicUserInfoEntity.getMaritalStatus()); |
|
|
@ -1473,7 +1469,15 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
check.setParentDeptNames(epidemicUserInfoEntity.getParentDeptNames()); |
|
|
|
check.setAllDeptIds(epidemicUserInfoEntity.getAllDeptIds()); |
|
|
|
check.setAllDeptNames(epidemicUserInfoEntity.getAllDeptNames()); |
|
|
|
epidemicUserInfoService.updateById(check); |
|
|
|
// epidemicUserInfoService.updateById(check);
|
|
|
|
updateList.add(check); |
|
|
|
} |
|
|
|
// 改为批量插入和批量按ID更新
|
|
|
|
if (!addList.isEmpty()) { |
|
|
|
epidemicUserInfoService.insertBatch(addList); |
|
|
|
} |
|
|
|
if (!updateList.isEmpty()) { |
|
|
|
epidemicUserInfoService.updateBatchById(updateList); |
|
|
|
} |
|
|
|
//插入房屋人员关联关系表
|
|
|
|
// HouseResidentEntity houseResidentEntity = ConvertUtils.sourceToTarget(baseResidentInformationExcel, HouseResidentEntity.class);
|
|
|
|