Commit 5c75ebc4 authored by huyuchen's avatar huyuchen

档案优化

parent d6903533
......@@ -790,8 +790,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
errorMsg.add("员工类型必填!");
errorMsgMap.put(lineNum, new ErrorMessage("员工类型必填!"));
} else if (EmployeeConstants.EMP_NATRUE_ZERO.equals(employeeInfo.getEmpNatrue())
|| EmployeeConstants.EMP_NATRUE_ONE.equals(employeeInfo.getEmpNatrue())) {
// 2.员工类型为外包和派遣,额外必填项有:身份证开始日期、身份证截止日期、民族、户籍所在(省市县)、户口性质、档案所在地(省市县)、是否大专及以上、通信地址
|| EmployeeConstants.EMP_NATRUE_ONE.equals(employeeInfo.getEmpNatrue())
|| CommonConstants.THREE_STRING.equals(employeeInfo.getEmpNatrue())) {
// 2.员工类型为外包和派遣和内部员工,额外必填项有:身份证开始日期、身份证截止日期、民族、户籍所在(省市县)、户口性质、档案所在地(省市县)、是否大专及以上、通信地址
if (Common.isEmpty(employeeInfo.getValidityStart())) {
errorMsg.add(EmployeeConstants.VALIDITY_START);
errorMsgMap.put(lineNum, new ErrorMessage(EmployeeConstants.VALIDITY_START));
......@@ -1890,7 +1891,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
private void judgeNull(Set<String> errorMsg, TEmployeeInfo employeeInfo) {
if (Common.isNotNull(employeeInfo.getEmpNatrue())
&& (CommonConstants.ZERO_STRING.equals(employeeInfo.getEmpNatrue())
|| CommonConstants.ONE_STRING.equals(employeeInfo.getEmpNatrue()))) {
|| CommonConstants.ONE_STRING.equals(employeeInfo.getEmpNatrue())
|| CommonConstants.THREE_STRING.equals(employeeInfo.getEmpNatrue()))) {
// 2.员工类型为外包和派遣,额外必填项有:身份证开始日期、身份证截止日期、民族、户籍所在(省市县)、户口性质、档案所在地(省市县)、是否大专及以上、通信地址
if (Common.isEmpty(employeeInfo.getValidityStart())) {
errorMsg.add(EmployeeConstants.VALIDITY_START);
......
......@@ -277,7 +277,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//从剩下的项目档案中查找员工类型并更新
if (Common.isNotNull(list)) {
Set<String> empNatrue = list.stream().map(TEmployeeProject::getEmpNatrue).collect(Collectors.toSet());
if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ZERO_STRING))) {
if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.THREE_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.THREE_STRING);
} else if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ZERO_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ZERO_STRING);
} else if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ONE_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING);
......@@ -758,7 +760,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
idCard = excel.getEmpIdcard();
deptNo = excel.getDeptNo();
if (excel.getEmpNatrue().equals(CommonConstants.ZERO_STRING) || excel.getEmpNatrue().equals(CommonConstants.ONE_STRING)) {
if (excel.getEmpNatrue().equals(CommonConstants.ZERO_STRING)
|| excel.getEmpNatrue().equals(CommonConstants.ONE_STRING)
|| excel.getEmpNatrue().equals(CommonConstants.THREE_STRING)) {
if (excel.getContractType().equals(CommonConstants.ONE_STRING) && Common.isEmpty(excel.getWorkingHours())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "工时制不能为空!"));
}
......
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