Commit 82db8910 authored by hongguangwu's avatar hongguangwu

MVP1.7.0 批量更新档案

parent 310231d9
...@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo; ...@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
...@@ -195,6 +196,9 @@ public class PreUploadEmpImportTwoVo implements Serializable { ...@@ -195,6 +196,9 @@ public class PreUploadEmpImportTwoVo implements Serializable {
private Date validityEndValue; private Date validityEndValue;
// 字典值结束 // 字典值结束
@TableField(exist = false)
private int lineNum;
@TableField(exist = false) @TableField(exist = false)
private String errorInfo; private String errorInfo;
......
...@@ -301,6 +301,10 @@ public class PreUploadEmpImportVo implements Serializable { ...@@ -301,6 +301,10 @@ public class PreUploadEmpImportVo implements Serializable {
@TableField(exist = false) @TableField(exist = false)
private Boolean isMain; private Boolean isMain;
@TableField(exist = false)
private int lineNum;
@TableField(exist = false) @TableField(exist = false)
private String errorInfo; private String errorInfo;
......
...@@ -3307,6 +3307,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -3307,6 +3307,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
List<String> phoneList = new ArrayList<>(); List<String> phoneList = new ArrayList<>();
String errorCurInfo = "该项目下无此员工,请核实"; String errorCurInfo = "该项目下无此员工,请核实";
String errorCurInfoStatus = "该人员档案状态未在档,请核实"; String errorCurInfoStatus = "该人员档案状态未在档,请核实";
int lineNum = 2;
for (Map<String, String> rowMap : vo.getContentList()) { for (Map<String, String> rowMap : vo.getContentList()) {
curVo = null; curVo = null;
errorMust = new StringBuilder(); errorMust = new StringBuilder();
...@@ -3315,6 +3316,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -3315,6 +3316,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
// 每一行都要初始化起始时间 // 每一行都要初始化起始时间
startDateMap = new HashMap<>(); startDateMap = new HashMap<>();
detail = new PreUploadEmpImportTwoVo(); detail = new PreUploadEmpImportTwoVo();
detail.setLineNum(lineNum++);
for (int i = 0; i < modelLength; i++) { for (int i = 0; i < modelLength; i++) {
shuName = titleMap.get(i); shuName = titleMap.get(i);
shuValue = rowMap.get(String.valueOf(i)); shuValue = rowMap.get(String.valueOf(i));
...@@ -3388,8 +3390,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -3388,8 +3390,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
} }
// 2格式不正确:在循环里已经判断了 // 2格式不正确:在循环里已经判断了
// 3校验是否通过:姓名&身份证号是否一致、手机号是否真实、姓名&银行卡号是否一致 // 3校验是否通过:姓名&身份证号是否一致、手机号是否真实、姓名&银行卡号是否一致
if (Common.isNotNull(detail.getEmpName())) { if (Common.isNotNull(detail.getBankNo())) {
if (Common.isNotNull(detail.getBankNo())) { if (Common.isNotNull(detail.getEmpName())) {
bankCheck = new TCheckBankNo(); bankCheck = new TCheckBankNo();
bankCheck.setBankNo(detail.getBankNo()); bankCheck.setBankNo(detail.getBankNo());
bankCheck.setName(detail.getEmpName()); bankCheck.setName(detail.getEmpName());
...@@ -3718,7 +3720,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -3718,7 +3720,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
//数据保存 //数据保存
return R.ok(); return R.ok();
} else { } else {
return new R<>(CommonConstants.TWO_INT, "含失败的全部数据:", errorList); return new R<>(CommonConstants.TWO_INT, null, errorList);
} }
} else { } else {
return R.failed("未识别到表格内容行!请检查表格!"); return R.failed("未识别到表格内容行!请检查表格!");
......
...@@ -2710,6 +2710,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -2710,6 +2710,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
// 存放父级area的值 // 存放父级area的值
Map<String, String> parentAreaMap = new HashMap<>(); Map<String, String> parentAreaMap = new HashMap<>();
Map<String, Date> startDateMap; Map<String, Date> startDateMap;
int lineNum = 2;
for (Map<String, String> rowMap : vo.getContentList()) { for (Map<String, String> rowMap : vo.getContentList()) {
curVo = null; curVo = null;
errorMust = new StringBuilder(); errorMust = new StringBuilder();
...@@ -2717,6 +2718,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -2717,6 +2718,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
// 每一行都要初始化起始时间 // 每一行都要初始化起始时间
startDateMap = new HashMap<>(); startDateMap = new HashMap<>();
detail = new PreUploadEmpImportVo(); detail = new PreUploadEmpImportVo();
detail.setLineNum(lineNum++);
for (int i = 0; i < modelLength; i++) { for (int i = 0; i < modelLength; i++) {
shuName = titleMap.get(i); shuName = titleMap.get(i);
shuValue = rowMap.get(String.valueOf(i)); shuValue = rowMap.get(String.valueOf(i));
...@@ -3374,7 +3376,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -3374,7 +3376,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
} }
} }
if (!errorList.isEmpty()) { if (!errorList.isEmpty()) {
return new R<>(CommonConstants.TWO_INT, "失败数据:", errorList); return new R<>(CommonConstants.TWO_INT, null, errorList);
} else { } else {
//数据保存 //数据保存
return R.ok(); return R.ok();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment