新增员工增加sys_user表employess_id字段存值
This commit is contained in:
parent
250d46cd02
commit
bb632d0878
|
|
@ -1425,6 +1425,7 @@ public class EmployeesMQListener {
|
|||
j.put("orgCode",deptInfo.getString("id"));//这个参数要的是机构的id
|
||||
j.put("opeType","employee");
|
||||
j.put("o_c_",deptInfo.getString("code"));
|
||||
j.put("employess_id",employeeId);
|
||||
employeesApplyService.initialization(j);
|
||||
}else{
|
||||
user.setUsername(employeesInfo.getTel());
|
||||
|
|
|
|||
|
|
@ -172,21 +172,23 @@ public class SysUserApiImpl implements ISysUserAPI {
|
|||
if ("employee".equals(jsonObject.getString("opeType"))) {
|
||||
//如果是添加员工账号:查询员工已有账号并复用
|
||||
String otherOrgCode = employeesOrgApi.queryCanUseOrg(user.getUsername(), jsonObject.getString("o_c_"));
|
||||
DynamicDataSourceContextHolder.push(otherOrgCode);
|
||||
try {
|
||||
QueryWrapper<SysUser> qw = new QueryWrapper<>();
|
||||
qw.eq("username", user.getUsername());
|
||||
List<SysUser> list = sysUserService.list(qw);
|
||||
SysUser t_ = null;
|
||||
if (list != null && list.size() > 0) {
|
||||
t_ = list.get(0);
|
||||
t_.setOrgCode(user.getOrgCode());
|
||||
user = t_;
|
||||
user.setDelFlag(CommonConstant.DEL_FLAG_0);
|
||||
user.setStatus(1);
|
||||
if (StringUtils.isNotBlank(otherOrgCode)) {
|
||||
DynamicDataSourceContextHolder.push(otherOrgCode);
|
||||
try {
|
||||
QueryWrapper<SysUser> qw = new QueryWrapper<>();
|
||||
qw.eq("username", user.getUsername());
|
||||
List<SysUser> list = sysUserService.list(qw);
|
||||
SysUser t_ = null;
|
||||
if (list != null && list.size() > 0) {
|
||||
t_ = list.get(0);
|
||||
t_.setOrgCode(user.getOrgCode());
|
||||
user = t_;
|
||||
user.setDelFlag(CommonConstant.DEL_FLAG_0);
|
||||
user.setStatus(1);
|
||||
}
|
||||
} finally {
|
||||
DynamicDataSourceContextHolder.clear();
|
||||
}
|
||||
} finally {
|
||||
DynamicDataSourceContextHolder.clear();
|
||||
}
|
||||
}
|
||||
sysUserService.saveUserInitialization(dataSourceCode, user, selectedRoles, selectedDeparts, relTenantIds);
|
||||
|
|
|
|||
Loading…
Reference in New Issue