Commit 7d0798c2 authored by huyuchen's avatar huyuchen

huych-入离职登记提交

parent f9759b6a
...@@ -347,6 +347,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -347,6 +347,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
} }
public R confirmSubmit(EmployeeRegistration registration) { public R confirmSubmit(EmployeeRegistration registration) {
YifuUser user = SecurityUtils.getUser();
EmployeeRegistration registrationNow = baseMapper.selectById(registration.getId()); EmployeeRegistration registrationNow = baseMapper.selectById(registration.getId());
if (Common.isEmpty(registrationNow) || !CommonConstants.ONE_STRING.equals(registrationNow.getProcessStatus())) { if (Common.isEmpty(registrationNow) || !CommonConstants.ONE_STRING.equals(registrationNow.getProcessStatus())) {
return R.failed(RegistConstants.NO_DATA_TO_HANDLE); return R.failed(RegistConstants.NO_DATA_TO_HANDLE);
...@@ -368,20 +369,21 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -368,20 +369,21 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
registrationNow.setProcessStatus(CommonConstants.ZERO_STRING); registrationNow.setProcessStatus(CommonConstants.ZERO_STRING);
baseMapper.updateById(registrationNow); baseMapper.updateById(registrationNow);
logService.saveLog(registration.getId(), CommonConstants.ZERO_STRING,RegistConstants.CONFIRM_SUBMIT, LocalDateTime.now(), logService.saveLog(registration.getId(), CommonConstants.ZERO_STRING,RegistConstants.CONFIRM_SUBMIT, LocalDateTime.now(),
registrationNow.getRegistorUsername(),null); user.getNickname(),null);
return R.ok(); return R.ok();
} }
public R updateRegist(EmployeeRegistration registration) { public R updateRegist(EmployeeRegistration registration) {
YifuUser user = SecurityUtils.getUser();
EmployeeRegistration registrationNow = baseMapper.selectById(registration.getId()); EmployeeRegistration registrationNow = baseMapper.selectById(registration.getId());
if (Common.isEmpty(registrationNow) || !CommonConstants.ONE_STRING.equals(registrationNow.getProcessStatus())) { if (Common.isEmpty(registrationNow) || !CommonConstants.ONE_STRING.equals(registrationNow.getProcessStatus())) {
return R.failed(RegistConstants.NO_DATA_TO_HANDLE); return R.failed(RegistConstants.NO_DATA_TO_HANDLE);
} }
registrationNow.setProcessStatus(CommonConstants.TWO_STRING); registrationNow.setProcessStatus(CommonConstants.TWO_STRING);
logService.saveLog(registration.getId(), CommonConstants.ZERO_STRING,RegistConstants.CONFIRM_SUBMIT, LocalDateTime.now(), logService.saveLog(registration.getId(), CommonConstants.ZERO_STRING,RegistConstants.CONFIRM_SUBMIT, LocalDateTime.now(),
registrationNow.getRegistorUsername(),null); user.getNickname(),null);
logService.saveLog(registration.getId(), CommonConstants.ZERO_STRING,RegistConstants.MESSAGE_FINISH, registration.getProjectCreateTime(), logService.saveLog(registration.getId(), CommonConstants.ZERO_STRING,RegistConstants.MESSAGE_FINISH, registration.getProjectCreateTime(),
registrationNow.getRegistorUsername(),CommonConstants.ONE_STRING.equals(registrationNow.getFeedbackType()) user.getNickname(),CommonConstants.ONE_STRING.equals(registrationNow.getFeedbackType())
? RegistConstants.BEFORE_IN_PROJECT :RegistConstants.BEFORE_OUT_PROJECT); ? RegistConstants.BEFORE_IN_PROJECT :RegistConstants.BEFORE_OUT_PROJECT);
baseMapper.updateById(registrationNow); baseMapper.updateById(registrationNow);
return R.ok(); 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