Commit 06033441 authored by huyuchen's avatar huyuchen

优化修改

parent 63a1d137
......@@ -30,7 +30,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 = "未找到对应的项目或者项目已停止合作,请核实";
public static final String DEPT_NO_EXIST = "未找到对应的项目,请核实";
public static final String CHECK_ERROR = "校验服务错误,请联系管理员!";
public static final String CHECK_NO_RESPONSE = "校验服务器未返回,请联系管理员!";
public static final String SITUATION_SIX = "作废";
......
......@@ -957,6 +957,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
String idCard;
// 个性化校验逻辑
List<String> deptNoList = new ArrayList<>();
TSettleDomain settleDomain;
for (int i = 0; i < excelVOList.size(); i++) {
errorMsg = new HashSet<>();
// 判空
......@@ -992,7 +993,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if (!deptNoList.isEmpty()) {
List<TSettleDomain> deptList = tSettleDomainService.list(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TSettleDomain::getStopFlag, CommonConstants.STATUS_NORMAL)
.in(TSettleDomain::getDepartNo, deptNoList)
);
if (deptList == null || deptList.isEmpty()) {
......@@ -1112,6 +1112,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
saveList.add(saveEmp);
}
} else {
settleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, excel.getDeptNo())
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING)
.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isEmpty(settleDomain)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_SEARCH_NOT_EXIST, excel.getEmpIdcard()));
}
// 档案不存在
// 校验身份证实名
TCheckIdCard checkIdCard = new TCheckIdCard();
......
......@@ -128,14 +128,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return new R<>(CommonConstants.dingleDigitIntArray[2], "该人员已减档减项,是否“复档复项”", map);
}
}
//项目编码校验
TSettleDomain tSettleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, tEmployeeProject.getDeptNo())
.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING)
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING));
if (Common.isEmpty(tSettleDomain)) {
return R.failed("未找到对应的项目或者项目已停止合作,请核实");
}
//状态为草稿、已审核
if (CommonConstants.dingleDigitIntArray[0] == employeeProject.getStatus() ||
CommonConstants.dingleDigitIntArray[1] == employeeProject.getStatus()) {
......@@ -154,6 +146,14 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return new R<>(CommonConstants.dingleDigitIntArray[3], "该人员在离职库已存在,是否“恢复档案”", map);
}
}
//项目编码校验
TSettleDomain tSettleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, tEmployeeProject.getDeptNo())
.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING)
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING));
if (Common.isEmpty(tSettleDomain)) {
return R.failed("未找到对应的项目或者项目已停止合作,请核实");
}
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