Commit 72954822 authored by chenyuxi's avatar chenyuxi

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

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