Commit a4853205 authored by hongguangwu's avatar hongguangwu

优化人员档案

parent 948f30cb
......@@ -29,6 +29,7 @@ public class EmployeeConstants {
public static final String FILE_ROVINCE_MUST = "更新档案市,档案省必填";
public static final String FILE_CITY_MUST = "更新档案县,档案市必填";
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
if (excelVOList == null || excelVOList.isEmpty()) {
return R.failed(CommonConstants.DATA_CAN_NOT_EMPTY);
}
Set<String> errorMsg;
YifuUser user = SecurityUtils.getUser();
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<>();
if (Common.isNotNull(errorMessageList)) {
......@@ -801,7 +805,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
Map<String, Integer> idCardMap = new HashMap<>();
String idCard;
// 个性化校验逻辑
Set<String> errorMsg;
List<String> deptNoList = new ArrayList<>();
for (int i = 0; i < excelVOList.size(); i++) {
errorMsg = new HashSet<>();
......@@ -842,7 +845,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
Map<String, Integer> deptMap = new HashMap<>();
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 {
for (TSettleDomain dept : deptList) {
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