Commit 1e335b17 authored by hongguangwu's avatar hongguangwu

MVP1.6.7-预入职档案

parent e1472d03
...@@ -1141,7 +1141,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -1141,7 +1141,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
} }
} catch (Exception e) { } catch (Exception e) {
log.error("档案预入职C端保存异常:", e); log.error("档案预入职C端保存异常:", e);
throw new RuntimeException("保存失败,请联系管理员!!主键【" + main.getId() +"】详细信息:"+ e.getMessage()); throw new RuntimeException("保存失败,请联系管理员!!预入职主键【" + main.getId() +"】");
} }
} }
...@@ -1682,13 +1682,19 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -1682,13 +1682,19 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
} }
String empCode = emp.getEmpCode(); String empCode = emp.getEmpCode();
BeanUtil.copyProperties(tPreEmployeeInfo, emp, ID); BeanUtil.copyProperties(tPreEmployeeInfo, emp, ID);
/*if (Common.isEmpty(emp.getEmpCode()) && Common.isNotNull(empCode)) { if (Common.isEmpty(emp.getEmpCode()) && Common.isNotNull(empCode)) {
emp.setEmpCode(empCode); emp.setEmpCode(empCode);
}*/ }
if (Common.isEmpty(emp.getEmpCode())) {
emp.setEmpCode(tEmployeeInfoService.getCode());
}
emp.setFileStatus(CommonConstants.ZERO_INT);
emp.setDeleteFlag(CommonConstants.STATUS_NORMAL);
if (isNew) { if (isNew) {
// 新员工塞基本属性 // 新员工塞基本属性
this.setNewEmpBaseData(emp, user); this.setNewEmpBaseData(emp, user);
} }
emp.setFileStatus(CommonConstants.ZERO_INT);
tEmployeeInfoService.saveOrUpdate(emp); tEmployeeInfoService.saveOrUpdate(emp);
return emp; return emp;
} }
...@@ -2036,10 +2042,10 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -2036,10 +2042,10 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
return R.failed("id、status不可为空!"); return R.failed("id、status不可为空!");
} }
TPreEmpMain preEmpMain = this.getById(id); TPreEmpMain preEmpMain = this.getById(id);
if (preEmpMain == null || Common.isEmpty(preEmpMain.getStatus()) || !CommonConstants.TWO_STRING.equals(preEmpMain.getStatus())) {
return R.failed("请确认ID与状态!");
}
try { try {
if (preEmpMain == null || Common.isEmpty(preEmpMain.getStatus()) || !CommonConstants.TWO_STRING.equals(preEmpMain.getStatus())) {
return R.failed("请确认ID与状态!");
}
if (!CommonConstants.THREE_STRING.equals(status) && !CommonConstants.FOUR_STRING.equals(status)) { if (!CommonConstants.THREE_STRING.equals(status) && !CommonConstants.FOUR_STRING.equals(status)) {
return R.failed("审核状态不对!"); return R.failed("审核状态不对!");
} }
...@@ -2083,7 +2089,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -2083,7 +2089,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
} }
} catch (Exception e) { } catch (Exception e) {
log.error("档案预入职审核异常:", e); log.error("档案预入职审核异常:", e);
throw new RuntimeException("保存失败,请联系管理员!!主键【" + preEmpMain.getId() +"】详细信息:"+ e.getMessage()); throw new RuntimeException("保存失败,请联系管理员!!预入职主键【" + preEmpMain.getId() +"】");
} }
} }
......
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