Browse Source

人员信息导入

feature/codemove
wanggongfeng 4 years ago
parent
commit
12385fc8ef
  1. 200
      epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/dto/EpidemicUserErrorDTO.java
  2. 271
      epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/entity/EpidemicUserErrorEntity.java
  3. 202
      epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/excel/EpidemicUserErrorExcel.java
  4. 48
      epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/impl/EpidemicUserInfoServiceImpl.java
  5. 4
      epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/house/excel/BaseResidentInformationUpdateExcel.java
  6. 141
      epdc-cloud-vim-yushan/src/main/resources/mapper/epidemic/EpidemicUserErrorDao.xml

200
epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/dto/EpidemicUserErrorDTO.java

@ -22,170 +22,62 @@ public class EpidemicUserErrorDTO implements Serializable {
// @ApiModelProperty(value = "id")
private Long id;
// @ApiModelProperty(value = "姓名")
private String userName;
// @ApiModelProperty(value = "身份证号")
private String idCard;
// @ApiModelProperty(value = "插入记录")
private Integer insertNo;
// @ApiModelProperty(value = "性别")
private String gender;
// @ApiModelProperty(value = "民族")
private String errorInfo;
private String peopleCategories;
private String userName;
private String nation;
// @ApiModelProperty(value = "曾用名")
private String formerName;
// @ApiModelProperty(value = "出生年月")
private String birthday;
// @ApiModelProperty(value = "血型")
private String bloodType;
// @ApiModelProperty(value = "身高")
private String height;
// @ApiModelProperty(value = "文化程度")
private String standardOfCulture;
// @ApiModelProperty(value = "健康情况")
private String politicsStatus;
private String joinTime;
private String organizationalRelationshipLocation;
private String residentsFamilyIdentityNo;
private String mobile;
private String health;
// @ApiModelProperty(value = "婚姻状况")
private String maritalStatus;
// @ApiModelProperty(value = "与户主关系")
private String accountType;
private String specialCrowd;
private String military;
private String householdRegisterDetail;
private String workStatus;
private String workUnits;
private String currentEmployerAddress;
private String unemploymentReason;
private String reemploymentPermit;
private String unemploymentRegister;
private String unemploymentRegisterTime;
private String familyCategory;
private String helpStatus;
private Integer motorVehicleNum;
private String motorVehicleCategory;
private String dogStatus;
private String gender;
private String houseAddress;
private String plot;
private String buildingNo;
private String unit;
private String roomNo;
private String houseProperty;
private String relation;
// @ApiModelProperty(value = "国籍")
private String hushaiStatus;
private String familySecurity;
private String livingSituation;
private String formerName;
private String birthday;
private String bloodType;
private String height;
private String nationality;
// @ApiModelProperty(value = "政治面貌")
private String politicsStatus;
// @ApiModelProperty(value = "宗教信仰")
private String faith;
// @ApiModelProperty(value = "毕业院校")
private String graduateSchool;
// @ApiModelProperty(value = "专业")
private String professional;
// @ApiModelProperty(value = "工作状态")
private String workStatus;
// @ApiModelProperty(value = "行业类别")
private String industryCategory;
// @ApiModelProperty(value = "工作单位(现/原)")
private String workUnits;
// @ApiModelProperty(value = "兵役状况")
private String military;
// @ApiModelProperty(value = "人口类别")
private String peopleCategories;
// @ApiModelProperty(value = "特殊人群")
private String specialCrowd;
// @ApiModelProperty(value = "有无车辆")
private String car;
// @ApiModelProperty(value = "车牌号")
private String carNo;
// @ApiModelProperty(value = "人户状况")
private String hushaiStatus;
// @ApiModelProperty(value = "籍贯")
private String nativePlace;
// @ApiModelProperty(value = "手机号或座机号")
private String mobile;
// @ApiModelProperty(value = "往返情况(1:在平阴 2在外地)")
private String returnState;
// @ApiModelProperty(value = "县内居住镇街")
private String liveAddressStreetName;
// @ApiModelProperty(value = "县内居住地关联人")
private String relationPeople;
// @ApiModelProperty(value = "县内居住地关联人手机号或座机号")
private String relationPeopleMobile;
// @ApiModelProperty(value = "现居住地省份")
private String outLiveAddressProvinceName;
// @ApiModelProperty(value = "现居住地市州")
private String outLiveAddressCityName;
// @ApiModelProperty(value = "现居住地区县")
private String outLiveAddressCountyName;
// @ApiModelProperty(value = "现居住地镇街")
private String outLiveAddressStreetName;
// @ApiModelProperty(value = "现居住地详细地址")
private String outLiveAddressDetail;
// @ApiModelProperty(value = "现居住地疫情风险等级(1:低风险,2:中风险,3:高风险)")
private String riskGrade;
// @ApiModelProperty(value = "拟返回平阴时间")
private String goBarkTime;
// @ApiModelProperty(value = "拟离开平阴时间")
private String leaveTime;
// @ApiModelProperty(value = "拟去往目的地省份")
private String destinationProvinceName;
// @ApiModelProperty(value = "拟去往目的地市州")
private String destinationCityName;
// @ApiModelProperty(value = "拟去往目的地区县")
private String destinationCountyName;
// @ApiModelProperty(value = "拟去往目的地镇街")
private String destinationStreetName;
// @ApiModelProperty(value = "拟去往目的地详细地址")
private String destinationAddressDetail;
// @ApiModelProperty(value = "社区/村庄")
private String community;
// @ApiModelProperty(value = "网格名称")
private String gridName;
// @ApiModelProperty(value = "小区")
private String plot;
// @ApiModelProperty(value = "楼号")
private String buildingNo;
// @ApiModelProperty(value = "单元")
private String unit;
// @ApiModelProperty(value = "房间号")
private String roomNo;
// @ApiModelProperty(value = "房屋性质")
private String houseProperty;
// @ApiModelProperty(value = "家庭保障情况")
private String familySecurity;
// @ApiModelProperty(value = "居住情况")
private String livingSituation;
// @ApiModelProperty(value = "乐观锁")
private Integer revision;
@ -205,22 +97,6 @@ public class EpidemicUserErrorDTO implements Serializable {
// @ApiModelProperty(value = "逻辑删除标识")
private String delFlag;
// @ApiModelProperty(value = "户籍地所在省份")
private String householdRegisterProvinceName;
// @ApiModelProperty(value = "户籍地所在市州")
private String householdRegisterCityName;
// @ApiModelProperty(value = "户籍地所在区县")
private String householdRegisterCountyName;
// @ApiModelProperty(value = "户籍地所在镇街")
private String householdRegisterStreetName;
// @ApiModelProperty(value = "户籍地详细地址")
private String householdRegisterDetail;
// @ApiModelProperty(value = "错误信息")
private String errorInfo;
}

271
epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/entity/EpidemicUserErrorEntity.java

@ -18,252 +18,55 @@ public class EpidemicUserErrorEntity extends BasePingyinEntity {
private static final long serialVersionUID = 1L;
/**
* 姓名
*/
private String userName;
/**
* 身份证号
*/
private String idCard;
/**
* 插入记录
*/
private Integer insertNo;
/**
* 性别
*/
private String gender;
/**
* 民族
*/
private String errorInfo;
private String peopleCategories;
private String userName;
private String nation;
/**
* 曾用名
*/
private String formerName;
/**
* 出生年月
*/
private String birthday;
/**
* 血型
*/
private String bloodType;
/**
* 身高
*/
private String height;
/**
* 文化程度
*/
private String standardOfCulture;
/**
* 健康情况
*/
private String politicsStatus;
private String joinTime;
private String organizationalRelationshipLocation;
private String residentsFamilyIdentityNo;
private String mobile;
private String health;
/**
* 婚姻状况
*/
private String maritalStatus;
/**
* 与户主关系
*/
private String relation;
/**
* 国籍
*/
private String nationality;
/**
* 政治面貌
*/
private String politicsStatus;
/**
* 宗教信仰
*/
private String faith;
/**
* 毕业院校
*/
private String graduateSchool;
/**
* 专业
*/
private String professional;
/**
* 工作状态
*/
private String accountType;
private String specialCrowd;
private String military;
private String householdRegisterDetail;
private String workStatus;
/**
* 行业类别
*/
private String industryCategory;
/**
* 工作单位/
*/
private String workUnits;
/**
* 兵役状况
*/
private String military;
/**
* 人口类别
*/
private String peopleCategories;
/**
* 特殊人群
*/
private String specialCrowd;
/**
* 有无车辆
*/
private String car;
/**
* 车牌号
*/
private String carNo;
/**
* 人户状况
*/
private String hushaiStatus;
/**
* 籍贯
*/
private String nativePlace;
/**
* 手机号或座机号
*/
private String mobile;
/**
* 往返情况(1:在平阴 2在外地)
*/
private String returnState;
/**
* 县内居住镇街
*/
private String liveAddressStreetName;
/**
* 县内居住地关联人
*/
private String relationPeople;
/**
* 县内居住地关联人手机号或座机号
*/
private String relationPeopleMobile;
/**
* 现居住地省份
*/
private String outLiveAddressProvinceName;
/**
* 现居住地市州
*/
private String outLiveAddressCityName;
/**
* 现居住地区县
*/
private String outLiveAddressCountyName;
/**
* 现居住地镇街
*/
private String outLiveAddressStreetName;
/**
* 现居住地详细地址
*/
private String outLiveAddressDetail;
/**
* 现居住地疫情风险等级(1:低风险2中风险3高风险)
*/
private String riskGrade;
/**
* 拟返回平阴时间
*/
private String goBarkTime;
/**
* 拟离开平阴时间
*/
private String leaveTime;
/**
* 拟去往目的地省份
*/
private String destinationProvinceName;
/**
* 拟去往目的地市州
*/
private String destinationCityName;
/**
* 拟去往目的地区县
*/
private String destinationCountyName;
/**
* 拟去往目的地镇街
*/
private String destinationStreetName;
/**
* 拟去往目的地详细地址
*/
private String destinationAddressDetail;
/**
* 社区/村庄
*/
private String community;
/**
* 网格名称
*/
private String gridName;
/**
* 小区
*/
private String currentEmployerAddress;
private String unemploymentReason;
private String reemploymentPermit;
private String unemploymentRegister;
private String unemploymentRegisterTime;
private String familyCategory;
private String helpStatus;
private Integer motorVehicleNum;
private String motorVehicleCategory;
private String dogStatus;
private String gender;
private String houseAddress;
private String plot;
/**
* 楼号
*/
private String buildingNo;
/**
* 单元
*/
private String unit;
/**
* 房间号
*/
private String roomNo;
/**
* 房屋性质
*/
private String houseProperty;
/**
* 家庭保障情况
*/
private String relation;
private String hushaiStatus;
private String familySecurity;
/**
* 居住情况
*/
private String livingSituation;
/**
* 户籍地所在省份
*/
private String householdRegisterProvinceName;
/**
* 户籍地所在市州
*/
private String householdRegisterCityName;
/**
* 户籍地所在区县
*/
private String householdRegisterCountyName;
/**
* 户籍地所在镇街
*/
private String householdRegisterStreetName;
/**
* 户籍地详细地址
*/
private String householdRegisterDetail;
/**
* 错误信息
*/
private String errorInfo;
private String formerName;
private String birthday;
private String bloodType;
private String height;
private String nationality;
private String faith;
private String graduateSchool;
private String professional;
private String carNo;
private String nativePlace;
private String outLiveAddressDetail;
}

202
epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/excel/EpidemicUserErrorExcel.java

@ -12,127 +12,159 @@ import lombok.Data;
@Data
public class EpidemicUserErrorExcel {
@Excel(name = "错误信息")
private String errorInfo;
@Excel(name = "人口类型")
private String peopleCategories;
@Excel(name = "姓名")
private String userName;
@Excel(name = "民族")
private String nation;
@Excel(name = "文化程度")
private String standardOfCulture;
@Excel(name = "政治面貌")
private String politicsStatus;
@Excel(name = "入党时间")
private String joinTime;
@Excel(name = "组织关系所在地")
private String organizationalRelationshipLocation;
@Excel(name = "身份证号码")
private String residentsFamilyIdentityNo;
@Excel(name = "联系电话")
private String mobile;
@Excel(name = "身体状况")
private String health;
@Excel(name = "婚姻状况")
private String maritalStatus;
@Excel(name = "户口类型")
private String accountType;
@Excel(name = "特殊人群")
private String specialCrowd;
@Excel(name = "服兵役")
private String military;
@Excel(name = "户籍地")
private String householdRegisterDetail;
@Excel(name = "就业情况")
private String workStatus;
@Excel(name = "现工作单位")
private String workUnits;
@Excel(name = "现单位地址")
private String currentEmployerAddress;
@Excel(name = "失业原因")
private String unemploymentReason;
@Excel(name = "再就业优惠证")
private String reemploymentPermit;
@Excel(name = "失业登记")
private String unemploymentRegister;
@Excel(name = "失业登记时间")
private String unemploymentRegisterTime;
@Excel(name = "家庭类别")
private String familyCategory;
@Excel(name = "救助情况")
private String helpStatus;
@Excel(name = "机动车数量")
private Integer motorVehicleNum;
@Excel(name = "机动车类型")
private String motorVehicleCategory;
@Excel(name = "宠物犬状况")
private String dogStatus;
@Excel(name = "性别")
private String gender;
@Excel(name = "房屋地址")
private String houseAddress;
@Excel(name = "县内居住镇街")
private String liveAddressStreetName;
@Excel(name = "社区/村庄")
private String community;
@Excel(name = "网格名称")
private String gridName;
@Excel(name = "小区")
private String plot;
@Excel(name = "楼号")
private String buildingNo;
@Excel(name = "单元")
private String unit;
@Excel(name = "房间号")
@Excel(name = "房号")
private String roomNo;
@Excel(name = "房屋性质")
private String houseProperty;
@Excel(name = "与户主关系")
private String relation;
@Excel(name = "人户状况")
private String hushaiStatus;
@Excel(name = "家庭保障情况")
private String familySecurity;
@Excel(name = "居住情况")
private String livingSituation;
@Excel(name = "姓名")
private String userName;
@Excel(name = "身份证号")
private String idCard;
@Excel(name = "联系方式")
private String mobile;
@Excel(name = "性别")
private String gender;
@Excel(name = "民族")
private String nation;
@Excel(name = "曾用名")
private String formerName;
@Excel(name = "出生年月")
private String birthday;
@Excel(name = "血型")
private String bloodType;
@Excel(name = "身高")
private String height;
@Excel(name = "文化程度")
private String standardOfCulture;
@Excel(name = "健康情况")
private String health;
@Excel(name = "婚姻状况")
private String maritalStatus;
@Excel(name = "与户主关系")
private String relation;
@Excel(name = "国籍")
private String nationality;
@Excel(name = "政治面貌")
private String politicsStatus;
@Excel(name = "宗教信仰")
private String faith;
@Excel(name = "毕业院校")
private String graduateSchool;
@Excel(name = "专业")
private String professional;
@Excel(name = "工作状态")
private String workStatus;
@Excel(name = "行业类别")
private String industryCategory;
@Excel(name = "工作单位(现/原)")
private String workUnits;
@Excel(name = "兵役状况")
private String military;
@Excel(name = "人口类别")
private String peopleCategories;
@Excel(name = "特殊人群")
private String specialCrowd;
@Excel(name = "有无车辆")
private String car;
@Excel(name = "车牌号")
private String carNo;
@Excel(name = "人户状况")
private String hushaiStatus;
@Excel(name = "户籍所在省份")
private String householdRegisterProvinceName;
@Excel(name = "户籍所在市州")
private String householdRegisterCityName;
@Excel(name = "户籍所在区县")
private String householdRegisterCountyName;
@Excel(name = "户籍所在镇街")
private String householdRegisterStreetName;
@Excel(name = "户籍地详细地址")
private String householdRegisterDetail;
@Excel(name = "籍贯")
private String nativePlace;
@Excel(name = "现居住地省份")
private String outLiveAddressProvinceName;
@Excel(name = "现居住地市州")
private String outLiveAddressCityName;
@Excel(name = "现居住地区县")
private String outLiveAddressCountyName;
@Excel(name = "现居住地镇街")
private String outLiveAddressStreetName;
@Excel(name = "现居住地详细地址")
private String outLiveAddressDetail;
@Excel(name = "往返情况(在外地/在本地)")
private String returnState;
@Excel(name = "现居住地疫情风险等级")
private String riskGrade;
@Excel(name = "拟返回平阴时间")
private String goBarkTime;
@Excel(name = "县内居住地联系人")
private String relationPeople;
@Excel(name = "联系人手机或座机号")
private String relationPeopleMobile;
@Excel(name = "拟离开平阴时间")
private String leaveTime;
@Excel(name = "拟去往省份")
private String destinationProvinceName;
@Excel(name = "拟去往市州")
private String destinationCityName;
@Excel(name = "拟去往区县")
private String destinationCountyName;
@Excel(name = "拟去往街道/乡镇")
private String destinationStreetName;
@Excel(name = "拟去往详细地址")
private String destinationAddressDetail;
@Excel(name = "错误信息")
private String errorInfo;
}

48
epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/impl/EpidemicUserInfoServiceImpl.java

@ -32,8 +32,11 @@ import com.elink.esua.epdc.vaccine.epidemic.dto.result.EpidemicPageResultDTO;
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.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;
import com.elink.esua.epdc.vaccine.epidemic.service.EpidemicUserInoutRecordService;
import com.elink.esua.epdc.vaccine.feign.VimAdminFeignClient;
@ -95,6 +98,8 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf
private RedisUtils redisUtils;
@Autowired
private VimImgDao vimImgDao;
@Autowired
private EpidemicUserErrorService epidemicUserErrorService;
@Override
public QueryWrapper<EpidemicUserInfoEntity> getWrapper(Map<String, Object> params) {
@ -702,6 +707,12 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf
List<BaseResidentInformationUpdateExcel> BaseResidentInformationUpdateExcels = null;
//居民导入数据异常提示
List<EpdcPopulationErrorResultDTO> epdcResidentErrorResultDTOS = null;
// 存储批量插入实体
List<BaseResidentInformationUpdateExcel> addList = new ArrayList<BaseResidentInformationUpdateExcel>();
// 存储错误数据批量插入实体
List<BaseResidentInformationUpdateExcel> addErrorList = new ArrayList<BaseResidentInformationUpdateExcel>();
//户主身份证列表,便于校验居住人页填写的身份证信息是否正确
// Set<String> residentIdentifyNo = new HashSet<>();
// for (int numSheet = 0; numSheet < workBook.getNumberOfSheets(); numSheet++) {
@ -718,13 +729,26 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf
// } else if (numSheet == 1) {//检验和新增居住人信息
BaseResidentInformationUpdateExcels = ExcelImportUtil.importExcel(f, BaseResidentInformationUpdateExcel.class, importParams);
// 校验数据
epdcResidentErrorResultDTOS = this.checkResidentsExcel(BaseResidentInformationUpdateExcels, sysPopulationSimpleDictDTOS);
epdcResidentErrorResultDTOS = this.checkResidentsExcel(BaseResidentInformationUpdateExcels, sysPopulationSimpleDictDTOS,addList,addErrorList);
// }
// }
// 校验户主和房屋信息
// if (epdcHouseAndHouseHeadErrorResultDTOS != null && epdcHouseAndHouseHeadErrorResultDTOS.size() > 0) {
// return new Result().ok(epdcHouseAndHouseHeadErrorResultDTOS);
// }
// 保存居住人信息
if (addList != null && addList.size() > 0) {
saveResidentList(addList, parentAndAllDeptDTO, populationIdNoAndIdMap);
}
// 批量插入错误数据
List<EpidemicUserErrorEntity> insertErrorList = ConvertUtils.sourceToTarget(addErrorList, EpidemicUserErrorEntity.class);
Integer insertNo = epidemicUserErrorService.getMaxInsertNo();
for (EpidemicUserErrorEntity entity : insertErrorList) {
entity.setInsertNo(insertNo);
}
epidemicUserErrorService.insertBatch(insertErrorList);
// 校验居住人信息
if (epdcResidentErrorResultDTOS != null && epdcResidentErrorResultDTOS.size() > 0) {
return new Result().ok(epdcResidentErrorResultDTOS);
@ -733,10 +757,10 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf
// if (basePopulationInformationExcels != null && basePopulationInformationExcels.size() > 0) {
// populationIdNoAndIdMap = savePopulationListEnd(basePopulationInformationExcels, parentAndAllDeptDTO);
// }
// 保存居住人信息
if (BaseResidentInformationUpdateExcels != null && BaseResidentInformationUpdateExcels.size() > 0) {
saveResidentList(BaseResidentInformationUpdateExcels, parentAndAllDeptDTO, populationIdNoAndIdMap);
}
// 保存居住人信息(调整位置到验证居主人信息上方)
// if (BaseResidentInformationUpdateExcels != null && BaseResidentInformationUpdateExcels.size() > 0) {
// saveResidentList(BaseResidentInformationUpdateExcels, parentAndAllDeptDTO, populationIdNoAndIdMap);
// }
} catch (Exception e1) {
e1.printStackTrace();
throw new RenException("导入失败:请检查导入模板或导入数据!");
@ -1040,13 +1064,17 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf
* @Date 2020/8/31
* @Param [basePopulationInformationExcels, basePopulationInformationExcels1]
**/
private List<EpdcPopulationErrorResultDTO> checkResidentsExcel(List<BaseResidentInformationUpdateExcel> basePopulationInformationExcels, List<SysPopulationSimpleDictDTO> sysPopulationSimpleDictDTOS) {
private List<EpdcPopulationErrorResultDTO> checkResidentsExcel(List<BaseResidentInformationUpdateExcel> basePopulationInformationExcels,
List<SysPopulationSimpleDictDTO> sysPopulationSimpleDictDTOS,
List<BaseResidentInformationUpdateExcel> addList,
List<BaseResidentInformationUpdateExcel> addErrorList) {
// 不匹配信息
List<EpdcPopulationErrorResultDTO> errorLineInfoList = new ArrayList<>();
EpdcPopulationErrorResultDTO errorLineInfoDto = null;
for (int i = 0; i < basePopulationInformationExcels.size(); i++) {
String errorInfo = "";
BaseResidentInformationUpdateExcel BaseResidentInformationUpdateExcel = basePopulationInformationExcels.get(i);
BaseResidentInformationUpdateExcel baseResidentInformationUpdateExcelNew = 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();
@ -1314,6 +1342,14 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf
errorLineInfoDto.setErrorInfo(errorInfo);
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoList.add(errorLineInfoDto);
// 设置错误信息
baseResidentInformationUpdateExcelNew.setErrorInfo(errorInfo);
// 加入错误列表
addErrorList.add(baseResidentInformationUpdateExcelNew);
}else{
addList.add(BaseResidentInformationUpdateExcel);
}
}
return errorLineInfoList;

4
epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/house/excel/BaseResidentInformationUpdateExcel.java

@ -174,5 +174,9 @@ public class BaseResidentInformationUpdateExcel implements Serializable {
@Excel(name = "现居住地详细地址")
private String outLiveAddressDetail;
// 批量导入优化添加字段
@Excel(name = "错误信息")
private String errorInfo;
}

141
epdc-cloud-vim-yushan/src/main/resources/mapper/epidemic/EpidemicUserErrorDao.xml

@ -5,87 +5,66 @@
<select id="getErrorInfoByMax" resultType="com.elink.esua.epdc.vaccine.epidemic.dto.EpidemicUserErrorDTO">
select e.ID,e.ERROR_INFO,
e.USER_NAME,
e.ID_CARD,
e.INSERT_NO,
e.GENDER,
e.NATION,
e.FORMER_NAME,
e.BIRTHDAY,
e.BLOOD_TYPE,
e.HEIGHT,
e.STANDARD_OF_CULTURE,
e.HEALTH,
e.MARITAL_STATUS,
e.RELATION,
e.NATIONALITY,
e.POLITICS_STATUS,
e.FAITH,
e.GRADUATE_SCHOOL,
e.PROFESSIONAL,
e.WORK_STATUS,
e.INDUSTRY_CATEGORY,
e.WORK_UNITS,
e.MILITARY,
e.PEOPLE_CATEGORIES,
e.SPECIAL_CROWD,
e.CAR,
e.CAR_NO,
e.HUSHAI_STATUS,
e.NATIVE_PLACE,
e.MOBILE,
e.LIVE_ADDRESS_STREET_NAME,
e.RELATION_PEOPLE,
e.RELATION_PEOPLE_MOBILE,
e.OUT_LIVE_ADDRESS_PROVINCE_NAME,
e.OUT_LIVE_ADDRESS_CITY_NAME,
e.OUT_LIVE_ADDRESS_COUNTY_NAME,
e.OUT_LIVE_ADDRESS_STREET_NAME,
e.OUT_LIVE_ADDRESS_DETAIL,
e.GO_BARK_TIME,
e.LEAVE_TIME,
e.DESTINATION_ADDRESS_PROVINCE_NAME,
e.DESTINATION_ADDRESS_CITY_NAME,
e.DESTINATION_ADDRESS_COUNTY_NAME,
e.DESTINATION_ADDRESS_STREET_NAME,
e.DESTINATION_ADDRESS_DETAIL,
e.COMMUNITY,
e.GRID_NAME,
e.PLOT,
e.BUILDING_NO,
e.UNIT,
e.ROOM_NO,
e.HOUSE_PROPERTY,
e.FAMILY_SECURITY,
e.LIVING_SITUATION,
e.REVISION,
e.CREATED_BY,
e.CREATED_TIME,
e.UPDATED_BY,
e.UPDATED_TIME,
e.DEL_FLAG,
e.HOUSEHOLD_REGISTER_PROVINCE_NAME,
e.HOUSEHOLD_REGISTER_CITY_NAME,
e.HOUSEHOLD_REGISTER_COUNTY_NAME,
e.HOUSEHOLD_REGISTER_STREET_NAME,
e.HOUSEHOLD_REGISTER_DETAIL,
CASE e.RISK_GRADE
WHEN '1' THEN '在本地'
WHEN '2' THEN '在外地'
ELSE ''
END AS RISK_GRADE,
CASE e.RISK_GRADE
WHEN '1' THEN '低风险'
WHEN '2' THEN '中风险'
WHEN '3' THEN '高风险'
ELSE ''
END AS RETURN_STATE
from epidemic_user_error e
select
e.ID,
e.INSERT_NO,
e.ERROR_INFO,
e.PEOPLE_CATEGORIES,
e.USER_NAME,
e.NATION,
e.STANDARD_OF_CULTURE,
e.POLITICS_STATUS,
e.JOIN_TIME,
e.ORGANIZATIONAL_RELATIONSHIP_LOCATION,
e.RESIDENTS_FAMILY_IDENTITY_NO,
e.MOBILE,
e.HEALTH,
e.MARITAL_STATUS,
e.ACCOUNT_TYPE,
e.SPECIAL_CROWD,
e.MILITARY,
e.HOUSEHOLD_REGISTER_DETAIL,
e.WORK_STATUS,
e.WORK_UNITS,
e.CURRENT_EMPLOYER_ADDRESS,
e.UNEMPLOYMENT_REASON,
e.REEMPLOYMENT_PERMIT,
e.UNEMPLOYMENT_REGISTER,
e.UNEMPLOYMENT_REGISTER_TIME,
e.FAMILY_CATEGORY,
e.HELP_STATUS,
e.MOTOR_VEHICLE_NUM,
e.MOTOR_VEHICLE_CATEGORY,
e.DOG_STATUS,
(case e.GENDER when '0' then '女' when '1' then '男' else '' end) as GENDER,
e.HOUSE_ADDRESS,
e.PLOT,
e.BUILDING_NO,
e.UNIT,
e.ROOM_NO,
e.HOUSE_PROPERTY,
e.RELATION,
e.HUSHAI_STATUS,
e.FAMILY_SECURITY,
e.LIVING_SITUATION,
e.FORMER_NAME,
e.BIRTHDAY,
e.BLOOD_TYPE,
e.HEIGHT,
e.NATIONALITY,
e.FAITH,
e.GRADUATE_SCHOOL,
e.PROFESSIONAL,
e.CAR_NO,
e.NATIVE_PLACE,
e.OUT_LIVE_ADDRESS_DETAIL,
e.REVISION,
e.DEL_FLAG,
e.CREATED_BY,
e.CREATED_TIME,
e.UPDATED_BY,
e.UPDATED_TIME
from epidemic_user_error e
where e.INSERT_NO = (select IFNULL(MAX(ee.INSERT_NO),0) from epidemic_user_error ee where ee.DEL_FLAG = 0
<if test="createdBy != null and createdBy != ''">
AND ee.CREATED_BY = #{createdBy}

Loading…
Cancel
Save