Commit cee73b57 authored by huyuchen's avatar huyuchen

huych-入职登记提交

parent 8d03f0f5
...@@ -2844,6 +2844,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2844,6 +2844,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
project.setProjectSource(CommonConstants.ONE_STRING); project.setProjectSource(CommonConstants.ONE_STRING);
project.setEmpNo(tEmployeeProjectService.getEmpNo(project.getDeptNo())); project.setEmpNo(tEmployeeProjectService.getEmpNo(project.getDeptNo()));
tEmployeeProjectService.save(project); tEmployeeProjectService.save(project);
// 增加,同步CSP
tEmployeeProjectService.doSaveBelongDept(project, CommonConstants.ONE_STRING);
// 更新入职待建档状态为已完成
registrationPreService.updatePreStatusToEnd(project.getDeptNo(),project.getEmpIdcard());
projectAdd.setId(project.getId()); projectAdd.setId(project.getId());
projectAdd.setEmpNo(project.getEmpNo()); projectAdd.setEmpNo(project.getEmpNo());
projectsMap.put(project.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + project.getDeptNo(), projectAdd); projectsMap.put(project.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + project.getDeptNo(), projectAdd);
......
...@@ -933,17 +933,30 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -933,17 +933,30 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
**/ **/
@Override @Override
public TEmployeeProjectBelongDept getZeroRegistrationAndUpdateTwo(TEmployeeProjectBelongDeptSearchCspVo searchCspVo) { public TEmployeeProjectBelongDept getZeroRegistrationAndUpdateTwo(TEmployeeProjectBelongDeptSearchCspVo searchCspVo) {
List<TEmployeeProjectBelongDept> belongDeptList = baseMapper.getZeroRegistrationByIdCard(searchCspVo); EmployeeRegistration registration = baseMapper.selectOne(Wrappers.<EmployeeRegistration>query().lambda()
if (belongDeptList != null && !belongDeptList.isEmpty()) { .eq(EmployeeRegistration::getDeptId, searchCspVo.getDeptId())
// 1:加日志 .eq(EmployeeRegistration::getEmpIdcard, searchCspVo.getEmpIdCard())
if (doSaveLogBatch(searchCspVo, belongDeptList)) return null; .eq(EmployeeRegistration::getProcessStatus, CommonConstants.ZERO_STRING)
// 更新为已处理 .eq(EmployeeRegistration::getDataSource,CommonConstants.TWO_STRING)
baseMapper.updateTwoRegistrationByIdCard(searchCspVo); .last(CommonConstants.LAST_ONE_SQL));
return belongDeptList.get(0); if (Common.isNotNull(registration)) {
} else { registration.setProcessStatus(CommonConstants.TWO_STRING);
baseMapper.updateById(registration);
logService.saveLog(registration.getId(), CommonConstants.ZERO_STRING, RegistConstants.MESSAGE_FINISH, searchCspVo.getEmpCreateAndLeaveTime(),
searchCspVo.getEmpCreateAndLeaveUser(),RegistConstants.BEFORE_IN_PROJECT );
return null; return null;
} else {
List<TEmployeeProjectBelongDept> belongDeptList = baseMapper.getZeroRegistrationByIdCard(searchCspVo);
if (belongDeptList != null && !belongDeptList.isEmpty()) {
// 1:加日志
if (doSaveLogBatch(searchCspVo, belongDeptList)) return null;
// 更新为已处理
baseMapper.updateTwoRegistrationByIdCard(searchCspVo);
return belongDeptList.get(0);
} else {
return null;
}
} }
} }
/** /**
......
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