|
|
@ -1,20 +1,25 @@ |
|
|
|
package com.elink.esua.epdc.vaccine.epidemic.service.impl; |
|
|
|
|
|
|
|
import cn.afterturn.easypoi.excel.ExcelImportUtil; |
|
|
|
import cn.afterturn.easypoi.excel.entity.ImportParams; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.elink.esua.epdc.commons.mybatis.service.impl.CrudServiceImpl; |
|
|
|
import com.elink.esua.epdc.commons.tools.constant.Constant; |
|
|
|
import com.elink.esua.epdc.commons.tools.constant.NumConstant; |
|
|
|
import com.elink.esua.epdc.commons.tools.constant.OrganizationTypeConstant; |
|
|
|
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.security.user.SecurityUser; |
|
|
|
import com.elink.esua.epdc.commons.tools.security.user.UserDetail; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.IdentityNoUtils; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
|
|
|
import com.elink.esua.epdc.vaccine.common.uitls.ValidateUtils; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.*; |
|
|
|
import com.elink.esua.epdc.constant.PopulationDictConstant; |
|
|
|
import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; |
|
|
|
import com.elink.esua.epdc.dto.SysSimpleDictDTO; |
|
|
|
import com.elink.esua.epdc.dto.house.SysPopulationSimpleDictDTO; |
|
|
|
import com.elink.esua.epdc.dto.house.form.SysPopulationSimpleDictFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.house.result.EpdcPopulationErrorResultDTO; |
|
|
|
import com.elink.esua.epdc.vaccine.epidemic.dao.EpidemicUserInfoDao; |
|
|
|
import com.elink.esua.epdc.vaccine.epidemic.dao.EpidemicUserInoutRecordDao; |
|
|
|
import com.elink.esua.epdc.vaccine.epidemic.dao.SelectAreaDao; |
|
|
@ -27,22 +32,28 @@ import com.elink.esua.epdc.vaccine.epidemic.dto.result.EpidemicPageResultV2DTO; |
|
|
|
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.EpidemicUserInfoEntity; |
|
|
|
import com.elink.esua.epdc.vaccine.epidemic.entity.EpidemicUserInoutRecordEntity; |
|
|
|
import com.elink.esua.epdc.vaccine.epidemic.service.EpidemicReportUserInfoService; |
|
|
|
import com.elink.esua.epdc.vaccine.epidemic.service.EpidemicUserInfoService; |
|
|
|
import com.elink.esua.epdc.vaccine.epidemic.service.EpidemicUserInoutRecordService; |
|
|
|
import com.elink.esua.epdc.vaccine.feign.VimAdminFeignClient; |
|
|
|
import com.elink.esua.epdc.vaccine.house.entity.PopulationInformationEntity; |
|
|
|
import com.elink.esua.epdc.vaccine.house.excel.BaseResidentInformationUpdateExcel; |
|
|
|
import com.elink.esua.epdc.vaccine.vim.dao.VaccinationInfoDao; |
|
|
|
import com.elink.esua.epdc.vaccine.vim.dto.VaccinationInfoDTO; |
|
|
|
import com.elink.esua.epdc.vaccine.vim.entity.VaccinationInfoEntity; |
|
|
|
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; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import java.io.File; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
@ -76,6 +87,8 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
public EpidemicUserInfoDao epidemicUserInfoDao; |
|
|
|
@Resource |
|
|
|
public VaccinationInfoDao vaccinationInfoDao; |
|
|
|
@Autowired |
|
|
|
private VimAdminFeignClient adminVimFeignClient; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@ -99,7 +112,7 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
Map<String, Object> authParams = vaccinationUserRoleService.getVaccinationAuthParams(user.getId()); |
|
|
|
params.putAll(authParams); |
|
|
|
// 街道和超管有权查看所有数据
|
|
|
|
if (NumConstant.ZERO == user.getSuperAdmin() && user.getDeptId() != 1258587398679126017L) { |
|
|
|
if (NumConstant.ZERO == user.getSuperAdmin() && !user.getTypeKey().equals(OrganizationTypeConstant.ORG_TYPE_STREET_PARTY)) { |
|
|
|
params.put("deptIdList", user.getDeptIdList()); |
|
|
|
} |
|
|
|
List<EpidemicRecordListDTO> list = baseDao.getEpidemicUserRecordList(params); |
|
|
@ -115,6 +128,10 @@ 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),"")); |
|
|
|
result.setDeptIdList(result.getAllDeptIds().split(",")); |
|
|
|
} |
|
|
|
// result.setIdCard(idEncrypt(result.getIdCard()));
|
|
|
|
// result.setMobile(mobileEncrypt(result.getMobile()));
|
|
|
|
result.setUserName(nameDesensitization(result.getUserName())); |
|
|
@ -262,6 +279,21 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
} catch (RenException e) { |
|
|
|
return new Result().error(e.getMsg()); |
|
|
|
} |
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(dto.getDeptId())) { |
|
|
|
Result<ParentAndAllDeptDTO> parentAndAllDept = adminVimFeignClient.getParentAndAllDept(dto.getDeptId()); |
|
|
|
if (!parentAndAllDept.success() || parentAndAllDept.getData() == null) { |
|
|
|
return new Result().error("获取所属组织信息失败"); |
|
|
|
} |
|
|
|
ParentAndAllDeptDTO parentAndAllDeptDTO = parentAndAllDept.getData(); |
|
|
|
userInfoDTO.setDeptId(parentAndAllDeptDTO.getGridId()); |
|
|
|
userInfoDTO.setDeptName(parentAndAllDeptDTO.getGrid()); |
|
|
|
userInfoDTO.setParentDeptIds(parentAndAllDeptDTO.getParentDeptIds()); |
|
|
|
userInfoDTO.setParentDeptNames(parentAndAllDeptDTO.getParentDeptNames()); |
|
|
|
userInfoDTO.setAllDeptIds(parentAndAllDeptDTO.getAllDeptIds()); |
|
|
|
userInfoDTO.setAllDeptNames(parentAndAllDeptDTO.getAllDeptNames()); |
|
|
|
} |
|
|
|
|
|
|
|
this.updateById(userInfoDTO); |
|
|
|
// inoutRecordService.updateById(userInoutRecordDTO);
|
|
|
|
return new Result(); |
|
|
@ -496,7 +528,7 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
Map<String, Object> authParams = vaccinationUserRoleService.getVaccinationAuthParams(user.getId()); |
|
|
|
params.putAll(authParams); |
|
|
|
// 街道和超管有权查看所有数据
|
|
|
|
if (NumConstant.ZERO == user.getSuperAdmin() && user.getDeptId() != 1258587398679126017L) { |
|
|
|
if (NumConstant.ZERO == user.getSuperAdmin() && !user.getTypeKey().equals(OrganizationTypeConstant.ORG_TYPE_STREET_PARTY)) { |
|
|
|
params.put("deptIdList", user.getDeptIdList()); |
|
|
|
} |
|
|
|
List<EpidemicPageResultDTO> list = baseDao.getEpidemicPage(params); |
|
|
@ -591,4 +623,578 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf |
|
|
|
return baseDao.selectInfoByIdCard(idCard); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result importEpidemicUser(MultipartFile file, String gridId) { |
|
|
|
ParentAndAllDeptDTO parentAndAllDeptDTO = null; |
|
|
|
if (StringUtils.isNotBlank(gridId)) { |
|
|
|
Result<ParentAndAllDeptDTO> parentAndAllDept = adminVimFeignClient.getParentAndAllDept(gridId); |
|
|
|
if (!parentAndAllDept.success() || parentAndAllDept.getData() == null) { |
|
|
|
return new Result().error("获取归属部门信息失败"); |
|
|
|
} |
|
|
|
parentAndAllDeptDTO = parentAndAllDept.getData(); |
|
|
|
} |
|
|
|
//获取字典信息
|
|
|
|
SysPopulationSimpleDictFormDTO sysPopulationSimpleDictFormDTO = new SysPopulationSimpleDictFormDTO(); |
|
|
|
List<String> dicTypes = new ArrayList<>(); |
|
|
|
Collections.addAll(dicTypes, PopulationDictConstant.ACCOUNT_TYPE, |
|
|
|
PopulationDictConstant.BODY_STATUS, |
|
|
|
PopulationDictConstant.EDUCATION_LEVEL, |
|
|
|
PopulationDictConstant.EMPLOYMENT_STATUS, |
|
|
|
PopulationDictConstant.FAMILY_CATEGORY, |
|
|
|
PopulationDictConstant.GENDER, |
|
|
|
PopulationDictConstant.HELP_STATUS, |
|
|
|
PopulationDictConstant.MARITAL_STATUS, |
|
|
|
PopulationDictConstant.MOTOR_VEHICLE_CATEGORY, |
|
|
|
PopulationDictConstant.POLITICS_STATUS, |
|
|
|
PopulationDictConstant.UNEMPLOYMENT_REASON, |
|
|
|
PopulationDictConstant.SPECIAL_CROWD, |
|
|
|
PopulationDictConstant.PEOPLE_CATEGORIES); |
|
|
|
sysPopulationSimpleDictFormDTO.setDicTypes(dicTypes); |
|
|
|
Result<List<SysPopulationSimpleDictDTO>> listResult = adminVimFeignClient.listPopulationSimple(sysPopulationSimpleDictFormDTO); |
|
|
|
if (listResult == null || !listResult.success()) { |
|
|
|
return new Result().error("获取字典信息失败"); |
|
|
|
} |
|
|
|
List<SysPopulationSimpleDictDTO> sysPopulationSimpleDictDTOS = listResult.getData(); |
|
|
|
|
|
|
|
File f = StreamUtils.conversionFile(file); |
|
|
|
ImportParams importParams = new ImportParams(); |
|
|
|
try { |
|
|
|
//获取多个sheet页
|
|
|
|
Workbook workBook = ExcelUtils.getWorkBook(file); |
|
|
|
//户主身份证和插入的ID,便于保存居住人信息时匹配户主信息
|
|
|
|
Map<String, String> populationIdNoAndIdMap = new HashMap<>(); |
|
|
|
//户主导入数据
|
|
|
|
// List<BasePopulationInformationExcel> basePopulationInformationExcels = null;
|
|
|
|
//户主导入数据异常提示
|
|
|
|
// List<EpdcPopulationErrorResultDTO> epdcHouseAndHouseHeadErrorResultDTOS = null;
|
|
|
|
//居民导入数据
|
|
|
|
List<BaseResidentInformationUpdateExcel> BaseResidentInformationUpdateExcels = null; |
|
|
|
//居民导入数据异常提示
|
|
|
|
List<EpdcPopulationErrorResultDTO> epdcResidentErrorResultDTOS = null; |
|
|
|
//户主身份证列表,便于校验居住人页填写的身份证信息是否正确
|
|
|
|
// Set<String> residentIdentifyNo = new HashSet<>();
|
|
|
|
// for (int numSheet = 0; numSheet < workBook.getNumberOfSheets(); numSheet++) {
|
|
|
|
//第几个sheet
|
|
|
|
// importParams.setStartSheetIndex(numSheet);
|
|
|
|
|
|
|
|
// if (numSheet == 0) {//校验和新增房屋和户主信息
|
|
|
|
// basePopulationInformationExcels = ExcelImportUtil.importExcel(f, BasePopulationInformationExcel.class, importParams);
|
|
|
|
// // 校验数据
|
|
|
|
// epdcHouseAndHouseHeadErrorResultDTOS = this.checkPopulationExcel(basePopulationInformationExcels, sysPopulationSimpleDictDTOS);
|
|
|
|
// basePopulationInformationExcels.forEach(basePopulationInformationExcel ->
|
|
|
|
// residentIdentifyNo.add(basePopulationInformationExcel.getResidentsIdentityNo())
|
|
|
|
// );
|
|
|
|
// } else if (numSheet == 1) {//检验和新增居住人信息
|
|
|
|
BaseResidentInformationUpdateExcels = ExcelImportUtil.importExcel(f, BaseResidentInformationUpdateExcel.class, importParams); |
|
|
|
// 校验数据
|
|
|
|
epdcResidentErrorResultDTOS = this.checkResidentsExcel(BaseResidentInformationUpdateExcels, sysPopulationSimpleDictDTOS); |
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// 校验户主和房屋信息
|
|
|
|
// if (epdcHouseAndHouseHeadErrorResultDTOS != null && epdcHouseAndHouseHeadErrorResultDTOS.size() > 0) {
|
|
|
|
// return new Result().ok(epdcHouseAndHouseHeadErrorResultDTOS);
|
|
|
|
// }
|
|
|
|
// 校验居住人信息
|
|
|
|
if (epdcResidentErrorResultDTOS != null && epdcResidentErrorResultDTOS.size() > 0) { |
|
|
|
return new Result().ok(epdcResidentErrorResultDTOS); |
|
|
|
} |
|
|
|
// 保存户主和房屋信息
|
|
|
|
// if (basePopulationInformationExcels != null && basePopulationInformationExcels.size() > 0) {
|
|
|
|
// populationIdNoAndIdMap = savePopulationListEnd(basePopulationInformationExcels, parentAndAllDeptDTO);
|
|
|
|
// }
|
|
|
|
// 保存居住人信息
|
|
|
|
if (BaseResidentInformationUpdateExcels != null && BaseResidentInformationUpdateExcels.size() > 0) { |
|
|
|
saveResidentList(BaseResidentInformationUpdateExcels, parentAndAllDeptDTO, populationIdNoAndIdMap); |
|
|
|
} |
|
|
|
} catch (Exception e1) { |
|
|
|
throw new RenException("导入失败:请检查导入模板或导入数据"); |
|
|
|
} |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcPopulationErrorResultDTO> |
|
|
|
* @Description 校验居住人数据 |
|
|
|
* @Author songyunpeng |
|
|
|
* @Date 2020/8/31 |
|
|
|
* @Param [basePopulationInformationExcels, basePopulationInformationExcels1] |
|
|
|
**/ |
|
|
|
private List<EpdcPopulationErrorResultDTO> checkResidentsExcel(List<BaseResidentInformationUpdateExcel> basePopulationInformationExcels, List<SysPopulationSimpleDictDTO> sysPopulationSimpleDictDTOS) { |
|
|
|
// 不匹配信息
|
|
|
|
List<EpdcPopulationErrorResultDTO> errorLineInfoList = new ArrayList<>(); |
|
|
|
EpdcPopulationErrorResultDTO errorLineInfoDto = null; |
|
|
|
for (int i = 0; i < basePopulationInformationExcels.size(); i++) { |
|
|
|
String errorInfo = ""; |
|
|
|
BaseResidentInformationUpdateExcel BaseResidentInformationUpdateExcel = basePopulationInformationExcels.get(i); |
|
|
|
// String residentsIdentityNo = BaseResidentInformationUpdateExcel.getResidentsIdentityNo() == null ? null : BaseResidentInformationUpdateExcel.getResidentsIdentityNo().trim();
|
|
|
|
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(); |
|
|
|
String currentEmployer = BaseResidentInformationUpdateExcel.getCurrentEmployer() == null ? null : BaseResidentInformationUpdateExcel.getCurrentEmployer().trim(); |
|
|
|
String currentAddress = BaseResidentInformationUpdateExcel.getCurrentAddress() == null ? null : BaseResidentInformationUpdateExcel.getCurrentAddress().trim(); |
|
|
|
String specialCrowd = BaseResidentInformationUpdateExcel.getSpecialCrowd() == null ? null : BaseResidentInformationUpdateExcel.getSpecialCrowd().trim(); |
|
|
|
String peopleCategories = BaseResidentInformationUpdateExcel.getPeopleCategories() == null ? null : BaseResidentInformationUpdateExcel.getPeopleCategories().trim(); |
|
|
|
String politicsStatus = BaseResidentInformationUpdateExcel.getPoliticsStatus() == null ? null : BaseResidentInformationUpdateExcel.getPoliticsStatus().trim(); |
|
|
|
|
|
|
|
String standardOfCulture = BaseResidentInformationUpdateExcel.getStandardOfCulture() == null ? null : BaseResidentInformationUpdateExcel.getStandardOfCulture().trim(); |
|
|
|
String health = BaseResidentInformationUpdateExcel.getHealth() == null ? null : BaseResidentInformationUpdateExcel.getHealth().trim(); |
|
|
|
String maritalStatus = BaseResidentInformationUpdateExcel.getMaritalStatus() == null ? null : BaseResidentInformationUpdateExcel.getMaritalStatus().trim(); |
|
|
|
String accountType = BaseResidentInformationUpdateExcel.getAccountType() == null ? null : BaseResidentInformationUpdateExcel.getAccountType().trim(); |
|
|
|
String workStatus = BaseResidentInformationUpdateExcel.getWorkStatus() == null ? null : BaseResidentInformationUpdateExcel.getWorkStatus().trim(); |
|
|
|
String unemploymentReason = BaseResidentInformationUpdateExcel.getUnemploymentReason() == null ? null : BaseResidentInformationUpdateExcel.getUnemploymentReason().trim(); |
|
|
|
String familyCategory = BaseResidentInformationUpdateExcel.getFamilyCategory() == null ? null : BaseResidentInformationUpdateExcel.getFamilyCategory().trim(); |
|
|
|
String helpStatus = BaseResidentInformationUpdateExcel.getHelpStatus() == null ? null : BaseResidentInformationUpdateExcel.getHelpStatus().trim(); |
|
|
|
String motorVehicleCategory = BaseResidentInformationUpdateExcel.getMotorVehicleCategory() == null ? null : BaseResidentInformationUpdateExcel.getMotorVehicleCategory().trim(); |
|
|
|
|
|
|
|
if (StringUtils.isBlank(selfIdentityNo)) { |
|
|
|
errorInfo += "本人身份证号为空;"; |
|
|
|
} else if (StringUtils.isNotBlank(selfIdentityNo)) { |
|
|
|
String result = IdentityNoUtils.IdentityNoVerification(selfIdentityNo); |
|
|
|
if (result != null) { |
|
|
|
errorInfo += "本人身份证号码有误;"; |
|
|
|
} else { |
|
|
|
BaseResidentInformationUpdateExcel.setGender(IdentityNoUtils.getSex(selfIdentityNo)); |
|
|
|
BaseResidentInformationUpdateExcel.setAge(IdentityNoUtils.getAge(selfIdentityNo)); |
|
|
|
BaseResidentInformationUpdateExcel.setBirthday(IdentityNoUtils.getBirthday(selfIdentityNo)); |
|
|
|
} |
|
|
|
BaseResidentInformationUpdateExcel.setSelfIdentityNo(selfIdentityNo); |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(residentsName)) { |
|
|
|
errorInfo += "姓名为空;"; |
|
|
|
} else if (StringUtils.isNotBlank((residentsName))) { |
|
|
|
BaseResidentInformationUpdateExcel.setUserName(residentsName); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank((residentsSex))) { |
|
|
|
BaseResidentInformationUpdateExcel.setGender(residentsSex); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(residentsSex) && !"0".equals(residentsSex) && !"1".equals(residentsSex)) { |
|
|
|
errorInfo += "性别不匹配;"; |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank((residentsNation))) { |
|
|
|
BaseResidentInformationUpdateExcel.setNation(residentsNation); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank((currentEmployer))) { |
|
|
|
BaseResidentInformationUpdateExcel.setCurrentEmployer(currentEmployer); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank((currentAddress))) { |
|
|
|
BaseResidentInformationUpdateExcel.setCurrentAddress(currentAddress); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(politicsStatus)) { |
|
|
|
boolean isMatch = false; |
|
|
|
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|
|
|
if (PopulationDictConstant.POLITICS_STATUS.equals(sysPopulationSimpleDictDTO.getDicType())) { |
|
|
|
List<SysSimpleDictDTO> sysSimpleDictList = sysPopulationSimpleDictDTO.getSysSimpleDicts(); |
|
|
|
for (SysSimpleDictDTO sysSimpleDict : sysSimpleDictList) { |
|
|
|
if (politicsStatus.equals(sysSimpleDict.getDictName())) { |
|
|
|
isMatch = true; |
|
|
|
BaseResidentInformationUpdateExcel.setPoliticsStatus(sysSimpleDict.getDictValue()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!isMatch) { |
|
|
|
errorInfo += "政治面貌数据不匹配;"; |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(specialCrowd)) { |
|
|
|
boolean isMatch = false; |
|
|
|
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|
|
|
if (PopulationDictConstant.SPECIAL_CROWD.equals(sysPopulationSimpleDictDTO.getDicType())) { |
|
|
|
List<SysSimpleDictDTO> sysSimpleDicts = sysPopulationSimpleDictDTO.getSysSimpleDicts(); |
|
|
|
for (SysSimpleDictDTO sysSimpleDict : sysSimpleDicts) { |
|
|
|
if (specialCrowd.equals(sysSimpleDict.getDictName())) { |
|
|
|
isMatch = true; |
|
|
|
BaseResidentInformationUpdateExcel.setSpecialCrowd(sysSimpleDict.getDictValue()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!isMatch) { |
|
|
|
errorInfo += "特殊人群数据不匹配;"; |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(peopleCategories)) { |
|
|
|
boolean isMatch = false; |
|
|
|
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|
|
|
if (PopulationDictConstant.PEOPLE_CATEGORIES.equals(sysPopulationSimpleDictDTO.getDicType())) { |
|
|
|
List<SysSimpleDictDTO> sysSimpleDicts = sysPopulationSimpleDictDTO.getSysSimpleDicts(); |
|
|
|
for (SysSimpleDictDTO sysSimpleDict : sysSimpleDicts) { |
|
|
|
if (peopleCategories.equals(sysSimpleDict.getDictName())) { |
|
|
|
isMatch = true; |
|
|
|
BaseResidentInformationUpdateExcel.setPeopleCategories(sysSimpleDict.getDictValue()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!isMatch) { |
|
|
|
errorInfo += "人口类型数据不匹配;"; |
|
|
|
} |
|
|
|
} |
|
|
|
//新增字典校验
|
|
|
|
if (StringUtils.isNotBlank(standardOfCulture)) { |
|
|
|
boolean isMatch = false; |
|
|
|
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|
|
|
if (PopulationDictConstant.EDUCATION_LEVEL.equals(sysPopulationSimpleDictDTO.getDicType())) { |
|
|
|
List<SysSimpleDictDTO> sysSimpleDicts = sysPopulationSimpleDictDTO.getSysSimpleDicts(); |
|
|
|
for (SysSimpleDictDTO sysSimpleDict : sysSimpleDicts) { |
|
|
|
if (standardOfCulture.equals(sysSimpleDict.getDictName())) { |
|
|
|
isMatch = true; |
|
|
|
BaseResidentInformationUpdateExcel.setStandardOfCulture(sysSimpleDict.getDictValue()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!isMatch) { |
|
|
|
errorInfo += "文化程度数据不匹配;"; |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(health)) { |
|
|
|
boolean isMatch = false; |
|
|
|
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|
|
|
if (PopulationDictConstant.BODY_STATUS.equals(sysPopulationSimpleDictDTO.getDicType())) { |
|
|
|
List<SysSimpleDictDTO> sysSimpleDicts = sysPopulationSimpleDictDTO.getSysSimpleDicts(); |
|
|
|
for (SysSimpleDictDTO sysSimpleDict : sysSimpleDicts) { |
|
|
|
if (health.equals(sysSimpleDict.getDictName())) { |
|
|
|
isMatch = true; |
|
|
|
BaseResidentInformationUpdateExcel.setHealth(sysSimpleDict.getDictValue()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!isMatch) { |
|
|
|
errorInfo += "身体状况数据不匹配;"; |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(maritalStatus)) { |
|
|
|
boolean isMatch = false; |
|
|
|
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|
|
|
if (PopulationDictConstant.MARITAL_STATUS.equals(sysPopulationSimpleDictDTO.getDicType())) { |
|
|
|
List<SysSimpleDictDTO> sysSimpleDicts = sysPopulationSimpleDictDTO.getSysSimpleDicts(); |
|
|
|
for (SysSimpleDictDTO sysSimpleDict : sysSimpleDicts) { |
|
|
|
if (maritalStatus.equals(sysSimpleDict.getDictName())) { |
|
|
|
isMatch = true; |
|
|
|
BaseResidentInformationUpdateExcel.setMaritalStatus(sysSimpleDict.getDictValue()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!isMatch) { |
|
|
|
errorInfo += "婚姻状况数据不匹配;"; |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(accountType)) { |
|
|
|
boolean isMatch = false; |
|
|
|
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|
|
|
if (PopulationDictConstant.ACCOUNT_TYPE.equals(sysPopulationSimpleDictDTO.getDicType())) { |
|
|
|
List<SysSimpleDictDTO> sysSimpleDicts = sysPopulationSimpleDictDTO.getSysSimpleDicts(); |
|
|
|
for (SysSimpleDictDTO sysSimpleDict : sysSimpleDicts) { |
|
|
|
if (accountType.equals(sysSimpleDict.getDictName())) { |
|
|
|
isMatch = true; |
|
|
|
BaseResidentInformationUpdateExcel.setAccountType(sysSimpleDict.getDictValue()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!isMatch) { |
|
|
|
errorInfo += "户口类型数据不匹配;"; |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(workStatus)) { |
|
|
|
boolean isMatch = false; |
|
|
|
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|
|
|
if (PopulationDictConstant.EMPLOYMENT_STATUS.equals(sysPopulationSimpleDictDTO.getDicType())) { |
|
|
|
List<SysSimpleDictDTO> sysSimpleDicts = sysPopulationSimpleDictDTO.getSysSimpleDicts(); |
|
|
|
for (SysSimpleDictDTO sysSimpleDict : sysSimpleDicts) { |
|
|
|
if (workStatus.equals(sysSimpleDict.getDictName())) { |
|
|
|
isMatch = true; |
|
|
|
BaseResidentInformationUpdateExcel.setWorkStatus(sysSimpleDict.getDictValue()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!isMatch) { |
|
|
|
errorInfo += "就业情况数据不匹配;"; |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(unemploymentReason)) { |
|
|
|
boolean isMatch = false; |
|
|
|
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|
|
|
if (PopulationDictConstant.UNEMPLOYMENT_REASON.equals(sysPopulationSimpleDictDTO.getDicType())) { |
|
|
|
List<SysSimpleDictDTO> sysSimpleDicts = sysPopulationSimpleDictDTO.getSysSimpleDicts(); |
|
|
|
for (SysSimpleDictDTO sysSimpleDict : sysSimpleDicts) { |
|
|
|
if (unemploymentReason.equals(sysSimpleDict.getDictName())) { |
|
|
|
isMatch = true; |
|
|
|
BaseResidentInformationUpdateExcel.setUnemploymentReason(sysSimpleDict.getDictValue()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!isMatch) { |
|
|
|
errorInfo += "失业原因数据不匹配;"; |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(familyCategory)) { |
|
|
|
boolean isMatch = false; |
|
|
|
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|
|
|
if (PopulationDictConstant.FAMILY_CATEGORY.equals(sysPopulationSimpleDictDTO.getDicType())) { |
|
|
|
List<SysSimpleDictDTO> sysSimpleDicts = sysPopulationSimpleDictDTO.getSysSimpleDicts(); |
|
|
|
for (SysSimpleDictDTO sysSimpleDict : sysSimpleDicts) { |
|
|
|
if (familyCategory.equals(sysSimpleDict.getDictName())) { |
|
|
|
isMatch = true; |
|
|
|
BaseResidentInformationUpdateExcel.setFamilyCategory(sysSimpleDict.getDictValue()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!isMatch) { |
|
|
|
errorInfo += "家庭类别数据不匹配;"; |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(helpStatus)) { |
|
|
|
boolean isMatch = false; |
|
|
|
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|
|
|
if (PopulationDictConstant.HELP_STATUS.equals(sysPopulationSimpleDictDTO.getDicType())) { |
|
|
|
List<SysSimpleDictDTO> sysSimpleDicts = sysPopulationSimpleDictDTO.getSysSimpleDicts(); |
|
|
|
for (SysSimpleDictDTO sysSimpleDict : sysSimpleDicts) { |
|
|
|
if (helpStatus.equals(sysSimpleDict.getDictName())) { |
|
|
|
isMatch = true; |
|
|
|
BaseResidentInformationUpdateExcel.setHelpStatus(sysSimpleDict.getDictValue()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!isMatch) { |
|
|
|
errorInfo += "救助情况数据不匹配;"; |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(motorVehicleCategory)) { |
|
|
|
boolean isMatch = false; |
|
|
|
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|
|
|
if (PopulationDictConstant.MOTOR_VEHICLE_CATEGORY.equals(sysPopulationSimpleDictDTO.getDicType())) { |
|
|
|
List<SysSimpleDictDTO> sysSimpleDicts = sysPopulationSimpleDictDTO.getSysSimpleDicts(); |
|
|
|
for (SysSimpleDictDTO sysSimpleDict : sysSimpleDicts) { |
|
|
|
if (motorVehicleCategory.equals(sysSimpleDict.getDictName())) { |
|
|
|
isMatch = true; |
|
|
|
BaseResidentInformationUpdateExcel.setMotorVehicleCategory(sysSimpleDict.getDictValue()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!isMatch) { |
|
|
|
errorInfo += "机动车类型数据不匹配;"; |
|
|
|
} |
|
|
|
} |
|
|
|
//如果有错误信息
|
|
|
|
if(StringUtils.isNotBlank(errorInfo)){ |
|
|
|
errorLineInfoDto = new EpdcPopulationErrorResultDTO(); |
|
|
|
errorLineInfoDto.setErrorInfo(errorInfo); |
|
|
|
errorLineInfoDto.setErrorLine((i + 2) + ""); |
|
|
|
errorLineInfoList.add(errorLineInfoDto); |
|
|
|
} |
|
|
|
} |
|
|
|
return errorLineInfoList; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* @return void |
|
|
|
* @Description 校验完成后插入居民信息 |
|
|
|
* @Author songyunpeng |
|
|
|
* @Date 2020/8/31 |
|
|
|
* @Param [baseResidentInformationExcels] |
|
|
|
**/ |
|
|
|
private void saveResidentList(List<BaseResidentInformationUpdateExcel> baseResidentInformationExcels, ParentAndAllDeptDTO parentAndAllDeptDTO, Map<String, String> populationIdNoAndIdMap) { |
|
|
|
for (BaseResidentInformationUpdateExcel baseResidentInformationExcel : baseResidentInformationExcels) { |
|
|
|
//插入居民信息
|
|
|
|
EpidemicUserInfoEntity epidemicUserInfoEntity = ConvertUtils.sourceToTarget(baseResidentInformationExcel, EpidemicUserInfoEntity.class); |
|
|
|
// populationInformationEntity.setResidentsIdentityNo(baseResidentInformationExcel.getResidentsFamilyIdentityNo());
|
|
|
|
// EpidemicUserInfoEntity epidemicUserInfoEntity = convertInformationToUserInfo(populationInformationEntity);
|
|
|
|
epidemicUserInfoEntity.setIdCard(baseResidentInformationExcel.getSelfIdentityNo()); |
|
|
|
epidemicUserInfoEntity.setMotorVehicleNum(Integer.valueOf(baseResidentInformationExcel.getMotorVehicleNum())); |
|
|
|
if(null != parentAndAllDeptDTO){ |
|
|
|
epidemicUserInfoEntity.setDeptId(parentAndAllDeptDTO.getGridId()); |
|
|
|
epidemicUserInfoEntity.setDeptName(parentAndAllDeptDTO.getGrid()); |
|
|
|
epidemicUserInfoEntity.setParentDeptIds(parentAndAllDeptDTO.getParentDeptIds()); |
|
|
|
epidemicUserInfoEntity.setParentDeptNames(parentAndAllDeptDTO.getParentDeptNames()); |
|
|
|
epidemicUserInfoEntity.setAllDeptIds(parentAndAllDeptDTO.getAllDeptIds()); |
|
|
|
epidemicUserInfoEntity.setAllDeptNames(parentAndAllDeptDTO.getAllDeptNames()); |
|
|
|
} |
|
|
|
//备注字典转换,不是数据字典
|
|
|
|
//再就业优惠证
|
|
|
|
if("无".equals(epidemicUserInfoEntity.getReemploymentPermit())){ |
|
|
|
epidemicUserInfoEntity.setReemploymentPermit("0"); |
|
|
|
}else if("有".equals(epidemicUserInfoEntity.getReemploymentPermit())){ |
|
|
|
epidemicUserInfoEntity.setReemploymentPermit("1"); |
|
|
|
}else{ |
|
|
|
epidemicUserInfoEntity.setReemploymentPermit(""); |
|
|
|
} |
|
|
|
//失业登记
|
|
|
|
if("否".equals(epidemicUserInfoEntity.getUnemploymentRegister())){ |
|
|
|
epidemicUserInfoEntity.setUnemploymentRegister("0"); |
|
|
|
}else if("是".equals(epidemicUserInfoEntity.getUnemploymentRegister())){ |
|
|
|
epidemicUserInfoEntity.setUnemploymentRegister("1"); |
|
|
|
}else{ |
|
|
|
epidemicUserInfoEntity.setUnemploymentRegister(""); |
|
|
|
} |
|
|
|
// 已存在的居民信息进行更新,否则进行插入操作
|
|
|
|
EpidemicUserInfoEntity check = epidemicUserInfoService.selectInfoByIdCard(baseResidentInformationExcel.getSelfIdentityNo()); |
|
|
|
if (null == check) { |
|
|
|
// epidemicUserInfoEntity.setRelation(baseResidentInformationExcel.getHouseHeadRelation());
|
|
|
|
epidemicUserInfoService.insert(epidemicUserInfoEntity); |
|
|
|
} else { |
|
|
|
// check.setRelation(baseResidentInformationExcel.getHouseHeadRelation());
|
|
|
|
check.setUserName(epidemicUserInfoEntity.getUserName()); |
|
|
|
check.setGender(epidemicUserInfoEntity.getGender()); |
|
|
|
check.setNation(epidemicUserInfoEntity.getNation()); |
|
|
|
check.setMobile(epidemicUserInfoEntity.getMobile()); |
|
|
|
check.setWorkUnits(epidemicUserInfoEntity.getWorkUnits()); |
|
|
|
check.setLiveAddressName(epidemicUserInfoEntity.getLiveAddressName()); |
|
|
|
check.setHouseholdRegisterDetail(epidemicUserInfoEntity.getLiveAddressName()); |
|
|
|
check.setPeopleCategories(epidemicUserInfoEntity.getPeopleCategories()); |
|
|
|
check.setSpecialCrowd(epidemicUserInfoEntity.getSpecialCrowd()); |
|
|
|
check.setPoliticsStatus(epidemicUserInfoEntity.getPoliticsStatus()); |
|
|
|
|
|
|
|
|
|
|
|
check.setStandardOfCulture(epidemicUserInfoEntity.getStandardOfCulture()); |
|
|
|
check.setHealth(epidemicUserInfoEntity.getHealth()); |
|
|
|
check.setMaritalStatus(epidemicUserInfoEntity.getMaritalStatus()); |
|
|
|
check.setAccountType(epidemicUserInfoEntity.getAccountType()); |
|
|
|
check.setWorkStatus(epidemicUserInfoEntity.getWorkStatus()); |
|
|
|
check.setUnemploymentReason(epidemicUserInfoEntity.getUnemploymentReason()); |
|
|
|
check.setFamilyCategory(epidemicUserInfoEntity.getFamilyCategory()); |
|
|
|
check.setHelpStatus(epidemicUserInfoEntity.getHelpStatus()); |
|
|
|
check.setMotorVehicleCategory(epidemicUserInfoEntity.getMotorVehicleCategory()); |
|
|
|
check.setJoinTime(epidemicUserInfoEntity.getJoinTime()); |
|
|
|
check.setOrganizationalRelationshipLocation(epidemicUserInfoEntity.getOrganizationalRelationshipLocation()); |
|
|
|
check.setMilitary(epidemicUserInfoEntity.getMilitary()); |
|
|
|
check.setCurrentEmployerAddress(epidemicUserInfoEntity.getCurrentEmployerAddress()); |
|
|
|
check.setReemploymentPermit(epidemicUserInfoEntity.getReemploymentPermit()); |
|
|
|
check.setUnemploymentRegister(epidemicUserInfoEntity.getUnemploymentRegister()); |
|
|
|
check.setUnemploymentRegisterTime(epidemicUserInfoEntity.getUnemploymentRegisterTime()); |
|
|
|
check.setMotorVehicleNum(epidemicUserInfoEntity.getMotorVehicleNum()); |
|
|
|
check.setDogStatus(epidemicUserInfoEntity.getDogStatus()); |
|
|
|
|
|
|
|
check.setDeptId(epidemicUserInfoEntity.getDeptId()); |
|
|
|
check.setDeptName(epidemicUserInfoEntity.getDeptName()); |
|
|
|
check.setParentDeptIds(epidemicUserInfoEntity.getParentDeptIds()); |
|
|
|
check.setParentDeptNames(epidemicUserInfoEntity.getParentDeptNames()); |
|
|
|
check.setAllDeptIds(epidemicUserInfoEntity.getAllDeptIds()); |
|
|
|
check.setAllDeptNames(epidemicUserInfoEntity.getAllDeptNames()); |
|
|
|
epidemicUserInfoService.updateById(check); |
|
|
|
} |
|
|
|
//插入房屋人员关联关系表
|
|
|
|
// HouseResidentEntity houseResidentEntity = ConvertUtils.sourceToTarget(baseResidentInformationExcel, HouseResidentEntity.class);
|
|
|
|
// if (null == check) {
|
|
|
|
// houseResidentEntity.setResidentId(epidemicUserInfoEntity.getId().toString());
|
|
|
|
// } else {
|
|
|
|
// houseResidentEntity.setResidentId(check.getId().toString());
|
|
|
|
// }
|
|
|
|
|
|
|
|
//根据身份证获取户主ID
|
|
|
|
//查找户主ID
|
|
|
|
// String houseHeadId;
|
|
|
|
// String houseId;
|
|
|
|
// EpidemicUserInfoEntity infoByIdentityNo = epidemicUserInfoDao.selectInfoByIdCard(baseResidentInformationExcel.getResidentsIdentityNo());
|
|
|
|
// if (infoByIdentityNo == null) {
|
|
|
|
// //查找不到户主则从Map中取
|
|
|
|
// houseHeadId = populationIdNoAndIdMap.get(baseResidentInformationExcel.getResidentsIdentityNo());
|
|
|
|
// houseId = populationIdNoAndIdMap.get(houseHeadId);
|
|
|
|
// } else {
|
|
|
|
// houseHeadId = infoByIdentityNo.getId().toString();
|
|
|
|
// houseId = populationIdNoAndIdMap.get(houseHeadId);
|
|
|
|
// }
|
|
|
|
// houseResidentEntity.setHouseHeadId(houseHeadId);
|
|
|
|
// houseResidentEntity.setHouseId(houseId);
|
|
|
|
// houseResidentEntity.setIsHouseHead("0");
|
|
|
|
// houseResidentEntity.setHouseHeadRelation(baseResidentInformationExcel.getHouseHeadRelation());
|
|
|
|
// houseResidentDao.insert(houseResidentEntity);
|
|
|
|
if (null != parentAndAllDeptDTO) { |
|
|
|
// 更新疫苗接种记录
|
|
|
|
vaccinationInfoHandle(baseResidentInformationExcel.getSelfIdentityNo(), parentAndAllDeptDTO); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 转换新旧人员信息实体类 |
|
|
|
* |
|
|
|
* @param informationEntity |
|
|
|
* @return com.elink.esua.epdc.vaccine.epidemic.entity.EpidemicUserInfoEntity |
|
|
|
* @author zhy |
|
|
|
* @date 2021/9/3 16:36 |
|
|
|
*/ |
|
|
|
private EpidemicUserInfoEntity convertInformationToUserInfo(PopulationInformationEntity informationEntity) { |
|
|
|
EpidemicUserInfoEntity entity = new EpidemicUserInfoEntity(); |
|
|
|
if (informationEntity.getId() != null) { |
|
|
|
entity.setId(Long.parseLong(informationEntity.getId())); |
|
|
|
} |
|
|
|
entity.setUserName(informationEntity.getResidentsName()); |
|
|
|
entity.setGender(informationEntity.getResidentsSex()); |
|
|
|
entity.setNation(informationEntity.getResidentsNation()); |
|
|
|
if (informationEntity.getResidentsBirthday() != null) { |
|
|
|
entity.setBirthday(DateUtils.format(informationEntity.getResidentsBirthday())); |
|
|
|
} |
|
|
|
entity.setStandardOfCulture(informationEntity.getEducationLevel()); |
|
|
|
entity.setPoliticsStatus(informationEntity.getPoliticsStatus()); |
|
|
|
entity.setJoinTime(informationEntity.getJoinTime()); |
|
|
|
entity.setOrganizationalRelationshipLocation(informationEntity.getOrganizationalRelationshipLocation()); |
|
|
|
entity.setIdCard(informationEntity.getResidentsIdentityNo()); |
|
|
|
entity.setMobile(informationEntity.getResidentsPhone()); |
|
|
|
entity.setHealth(informationEntity.getBodyStatus()); |
|
|
|
entity.setMaritalStatus(informationEntity.getMaritalStatus()); |
|
|
|
entity.setAccountType(informationEntity.getAccountType()); |
|
|
|
entity.setMilitary(informationEntity.getMilitaryService()); |
|
|
|
entity.setHouseholdRegisterDetail(informationEntity.getHouseholdRegistrationPlace()); |
|
|
|
entity.setWorkStatus(informationEntity.getEmploymentStatus()); |
|
|
|
entity.setWorkUnits(informationEntity.getCurrentEmployer()); |
|
|
|
entity.setCurrentEmployerAddress(informationEntity.getCurrentEmployerAddress()); |
|
|
|
entity.setUnemploymentReason(informationEntity.getUnemploymentReason()); |
|
|
|
entity.setReemploymentPermit(informationEntity.getReemploymentPermit()); |
|
|
|
entity.setUnemploymentRegister(informationEntity.getUnemploymentRegister()); |
|
|
|
entity.setUnemploymentRegisterTime(informationEntity.getUnemploymentRegisterTime()); |
|
|
|
entity.setSpecialCrowd(informationEntity.getSpecialCrowd()); |
|
|
|
entity.setFamilyCategory(informationEntity.getFamilyCategory()); |
|
|
|
entity.setHelpStatus(informationEntity.getHelpStatus()); |
|
|
|
entity.setMotorVehicleNum(informationEntity.getMotorVehicleNum()); |
|
|
|
entity.setMotorVehicleCategory(informationEntity.getMotorVehicleCategory()); |
|
|
|
entity.setDogStatus(informationEntity.getDogStatus()); |
|
|
|
entity.setFamilyMemberNum(informationEntity.getFamilyMemberNum()); |
|
|
|
entity.setFamilyMemberOutNum(informationEntity.getFamilyMemberOutNum()); |
|
|
|
entity.setFamilyMemberOutMonth(informationEntity.getFamilyMemberOutMonth()); |
|
|
|
entity.setFamilyMemberOutReason(informationEntity.getFamilyMemberOutReason()); |
|
|
|
entity.setSpecialCrowd(informationEntity.getSpecialCrowd()); |
|
|
|
entity.setPeopleCategories(informationEntity.getPeopleCategories()); |
|
|
|
entity.setRelation(NumConstant.ONE_STR); |
|
|
|
entity.setLiveAddressName(informationEntity.getCurrentAddress()); |
|
|
|
entity.setHouseholdRegisterDetail(informationEntity.getCurrentAddress()); |
|
|
|
return entity; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 更新疫苗接种信息 |
|
|
|
* |
|
|
|
* @param idCard |
|
|
|
* @param parentAndAllDeptDTO |
|
|
|
* @return void |
|
|
|
* @author zhy |
|
|
|
* @date 2021/9/16 14:09 |
|
|
|
*/ |
|
|
|
private void vaccinationInfoHandle(String idCard, ParentAndAllDeptDTO parentAndAllDeptDTO) { |
|
|
|
// 更新疫苗接种网格信息
|
|
|
|
VaccinationInfoEntity vaccinationInfoEntity = new VaccinationInfoEntity(); |
|
|
|
vaccinationInfoEntity.setIdentityNo(idCard); |
|
|
|
vaccinationInfoEntity.setGridId(parentAndAllDeptDTO.getGridId()); |
|
|
|
vaccinationInfoEntity.setAllDeptNames(parentAndAllDeptDTO.getAllDeptNames()); |
|
|
|
vaccinationInfoEntity.setAllDeptIds(parentAndAllDeptDTO.getAllDeptIds()); |
|
|
|
vaccinationInfoEntity.setParentDeptNames(parentAndAllDeptDTO.getParentDeptNames()); |
|
|
|
vaccinationInfoEntity.setParentDeptIds(parentAndAllDeptDTO.getParentDeptIds()); |
|
|
|
vaccinationInfoDao.updateDeptInfo(vaccinationInfoEntity); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|