Commit 72954822 authored by chenyuxi's avatar chenyuxi

feat: 入职导入根据系统来源赋值部门信息

parent 74a8bbbf
......@@ -739,20 +739,24 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
SysCspDeptVo vo = new SysCspDeptVo();
vo.setUserId(user.getId());
vo.setProjectId(selectVo.getId());
R<SysCspDeptVo> booleanR = upmsDaprUtils.selectCspDeptByUserDeptId(vo);
if (Common.isNotNull(booleanR) && Common.isNotNull(booleanR.getData())
&& Common.isNotNull(booleanR.getData().getDepartId()) && Common.isNotNull(booleanR.getData().getDepartName())) {
vo = booleanR.getData();
insert.setRegistorDeptname(vo.getDepartName());
insert.setRegistorDeptid(vo.getDepartId().toString());
insert.setEmpDeptid(vo.getDepartId().toString());
insert.setEmpDeptname(vo.getDepartName());
} else {
insert.setRegistorDeptname(user.getDeptName());
insert.setRegistorDeptid(user.getDeptId().toString());
insert.setEmpDeptid(user.getDeptId().toString());
insert.setEmpDeptname(user.getDeptName());
// 1.9.8: 从客服端导入,入职部门默认为空
if(CommonConstants.ONE_STRING.equals(insert.getDataSource())){
R<SysCspDeptVo> booleanR = upmsDaprUtils.selectCspDeptByUserDeptId(vo);
if (Common.isNotNull(booleanR) && Common.isNotNull(booleanR.getData())
&& Common.isNotNull(booleanR.getData().getDepartId()) && Common.isNotNull(booleanR.getData().getDepartName())) {
vo = booleanR.getData();
insert.setRegistorDeptname(vo.getDepartName());
insert.setRegistorDeptid(vo.getDepartId().toString());
insert.setEmpDeptid(vo.getDepartId().toString());
insert.setEmpDeptname(vo.getDepartName());
} else {
insert.setRegistorDeptname(user.getDeptName());
insert.setRegistorDeptid(user.getDeptId().toString());
insert.setEmpDeptid(user.getDeptId().toString());
insert.setEmpDeptname(user.getDeptName());
}
}
insert.setRegistorUsername(user.getNickname());
insert.setRegistorPhone(user.getPhone());
insert.setCustomerPhone(selectVo.getCsPhone());
......
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