Commit a4853205 authored by hongguangwu's avatar hongguangwu

优化人员档案

parent 948f30cb
...@@ -29,6 +29,7 @@ public class EmployeeConstants { ...@@ -29,6 +29,7 @@ public class EmployeeConstants {
public static final String FILE_ROVINCE_MUST = "更新档案市,档案省必填"; public static final String FILE_ROVINCE_MUST = "更新档案市,档案省必填";
public static final String FILE_CITY_MUST = "更新档案县,档案市必填"; public static final String FILE_CITY_MUST = "更新档案县,档案市必填";
public static final String DEPT_NO_ERROR = "项目编码错误"; public static final String DEPT_NO_ERROR = "项目编码错误";
public static final String DEPT_NO_EXIST = "根据项目编码未找到项目";
/** /**
* 无数据可更新 * 无数据可更新
......
...@@ -786,9 +786,13 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -786,9 +786,13 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if (excelVOList == null || excelVOList.isEmpty()) { if (excelVOList == null || excelVOList.isEmpty()) {
return R.failed(CommonConstants.DATA_CAN_NOT_EMPTY); return R.failed(CommonConstants.DATA_CAN_NOT_EMPTY);
} }
Set<String> errorMsg;
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
if (user == null || Common.isEmpty(user.getId())) { if (user == null || Common.isEmpty(user.getId())) {
return R.failed("请登录!"); errorMsg = new HashSet<>();
errorMsg.add(CommonConstants.PLEASE_LOG_IN);
errorMessageList.add(new ErrorMessage(2L, errorMsg));
return R.failed(errorMessageList);
} }
Map<Long, ErrorMessage> errorMsgMap = new HashMap<>(); Map<Long, ErrorMessage> errorMsgMap = new HashMap<>();
if (Common.isNotNull(errorMessageList)) { if (Common.isNotNull(errorMessageList)) {
...@@ -801,7 +805,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -801,7 +805,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
Map<String, Integer> idCardMap = new HashMap<>(); Map<String, Integer> idCardMap = new HashMap<>();
String idCard; String idCard;
// 个性化校验逻辑 // 个性化校验逻辑
Set<String> errorMsg;
List<String> deptNoList = new ArrayList<>(); List<String> deptNoList = new ArrayList<>();
for (int i = 0; i < excelVOList.size(); i++) { for (int i = 0; i < excelVOList.size(); i++) {
errorMsg = new HashSet<>(); errorMsg = new HashSet<>();
...@@ -842,7 +845,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -842,7 +845,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
Map<String, Integer> deptMap = new HashMap<>(); Map<String, Integer> deptMap = new HashMap<>();
if (deptList == null || deptList.isEmpty()) { if (deptList == null || deptList.isEmpty()) {
return R.failed("根据项目编码未找到项目!"); errorMsg = new HashSet<>();
errorMsg.add(EmployeeConstants.DEPT_NO_EXIST);
errorMessageList.add(new ErrorMessage(2L, errorMsg));
return R.failed(errorMessageList);
} else { } else {
for (TSettleDomain dept : deptList) { for (TSettleDomain dept : deptList) {
deptMap.put(dept.getDepartNo(), CommonConstants.ONE_INT); deptMap.put(dept.getDepartNo(), CommonConstants.ONE_INT);
......
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