|
|
|
@ -1,6 +1,12 @@
|
|
|
|
|
package cn.estsh.i3plus.core.apiservice.controller.busi;
|
|
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.*;
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.ILicenseClickService;
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.IPersonnelService;
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.ISysDepartmentService;
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.ISysFileService;
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.ISysOrganizeService;
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.ISysPositionService;
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.ISysRoleService;
|
|
|
|
|
import cn.estsh.i3plus.core.apiservice.util.SysUserPasswordUtil;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.convert.ConvertBean;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.exception.ImppExceptionEnum;
|
|
|
|
@ -16,6 +22,7 @@ import cn.estsh.i3plus.pojo.model.platform.UserDetailModel;
|
|
|
|
|
import cn.estsh.i3plus.pojo.model.platform.UserDetailPagerModel;
|
|
|
|
|
import cn.estsh.i3plus.pojo.model.platform.UserRolePagerModel;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.*;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.repository.SysUserPasswordRepository;
|
|
|
|
|
import cn.estsh.impp.framework.base.controller.CoreBaseController;
|
|
|
|
|
import cn.estsh.impp.framework.boot.auth.AuthUtil;
|
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
|
|
|
|
@ -29,7 +36,14 @@ import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.PutMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
@ -74,8 +88,12 @@ public class PersonnelController extends CoreBaseController {
|
|
|
|
|
@Autowired
|
|
|
|
|
private SysUserPasswordUtil userPasswordUtil;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private SysUserPasswordRepository userPasswordRDao;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 添加用户信息
|
|
|
|
|
*
|
|
|
|
|
* @param model 用户信息
|
|
|
|
|
* @return 处理结果
|
|
|
|
|
*/
|
|
|
|
@ -134,7 +152,17 @@ public class PersonnelController extends CoreBaseController {
|
|
|
|
|
user.setOrganizeNameRdd(userOrganize.getName());
|
|
|
|
|
user.setOrganizeCode(userOrganize.getOrganizeCode());
|
|
|
|
|
user.setUserInfoId(info.getId());
|
|
|
|
|
user.setUserPasswordLastModifyTime(TimeTool.getNowTime(true));
|
|
|
|
|
refreshSysUserPassword(user);
|
|
|
|
|
SysUser userSaved=personnelService.saveSysUser(user);
|
|
|
|
|
|
|
|
|
|
// 添加保存passwordId进SysUser表
|
|
|
|
|
SysUserPassword pwd = new SysUserPassword();
|
|
|
|
|
pwd.setUserId(userSaved.getId());
|
|
|
|
|
pwd.setUserPassword(userSaved.getUserLoginPassword());
|
|
|
|
|
ConvertBean.serviceModelInitialize(pwd, userSaved.getUserName());
|
|
|
|
|
SysUserPassword savedPassword = userPasswordRDao.save(pwd);
|
|
|
|
|
user.setUserLoginPasswordId(savedPassword.getId());
|
|
|
|
|
personnelService.saveSysUser(user);
|
|
|
|
|
|
|
|
|
|
info.setUserId(user.getId());
|
|
|
|
@ -154,6 +182,7 @@ public class PersonnelController extends CoreBaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 修改用户信息
|
|
|
|
|
*
|
|
|
|
|
* @param model 用户信息
|
|
|
|
|
* @return 处理结果
|
|
|
|
|
*/
|
|
|
|
@ -243,6 +272,7 @@ public class PersonnelController extends CoreBaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 修改用户信息
|
|
|
|
|
*
|
|
|
|
|
* @param model 用户信息
|
|
|
|
|
* @return 处理结果
|
|
|
|
|
*/
|
|
|
|
@ -277,6 +307,7 @@ public class PersonnelController extends CoreBaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取用户信息
|
|
|
|
|
*
|
|
|
|
|
* @param id 用户id
|
|
|
|
|
* @return 处理结果
|
|
|
|
|
*/
|
|
|
|
@ -317,6 +348,7 @@ public class PersonnelController extends CoreBaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取账号信息
|
|
|
|
|
*
|
|
|
|
|
* @param id 用户id
|
|
|
|
|
* @return 处理结果
|
|
|
|
|
*/
|
|
|
|
@ -346,6 +378,7 @@ public class PersonnelController extends CoreBaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 删除用户信息
|
|
|
|
|
*
|
|
|
|
|
* @param id 用户id
|
|
|
|
|
* @return 处理结果
|
|
|
|
|
*/
|
|
|
|
@ -376,6 +409,7 @@ public class PersonnelController extends CoreBaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据id批量删除
|
|
|
|
|
*
|
|
|
|
|
* @param ids id数组
|
|
|
|
|
* @return 处理
|
|
|
|
|
*/
|
|
|
|
@ -421,6 +455,7 @@ public class PersonnelController extends CoreBaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 删除账号信息
|
|
|
|
|
*
|
|
|
|
|
* @param id 用户账号id
|
|
|
|
|
* @return 处理结果
|
|
|
|
|
*/
|
|
|
|
@ -451,6 +486,7 @@ public class PersonnelController extends CoreBaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据id批量删除
|
|
|
|
|
*
|
|
|
|
|
* @param ids ids数组
|
|
|
|
|
* @return 处理结果
|
|
|
|
|
*/
|
|
|
|
@ -496,6 +532,7 @@ public class PersonnelController extends CoreBaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询角色的所有角色权限关系
|
|
|
|
|
*
|
|
|
|
|
* @param model 查询条件
|
|
|
|
|
* @return 处理结果
|
|
|
|
|
*/
|
|
|
|
@ -525,6 +562,7 @@ public class PersonnelController extends CoreBaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询角色的所有角色权限关系
|
|
|
|
|
*
|
|
|
|
|
* @param model 处理消息
|
|
|
|
|
* @return 处理结果
|
|
|
|
|
*/
|
|
|
|
@ -551,6 +589,7 @@ public class PersonnelController extends CoreBaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据条件分页查询用户角色信息
|
|
|
|
|
*
|
|
|
|
|
* @param model 条件
|
|
|
|
|
* @return 处理结果
|
|
|
|
|
*/
|
|
|
|
@ -569,6 +608,7 @@ public class PersonnelController extends CoreBaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据条件分页查询用户信息
|
|
|
|
|
*
|
|
|
|
|
* @param model 查询条件
|
|
|
|
|
* @return 处理结果
|
|
|
|
|
*/
|
|
|
|
@ -587,6 +627,7 @@ public class PersonnelController extends CoreBaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据条件分页查询用户信息
|
|
|
|
|
*
|
|
|
|
|
* @param model 查询条件
|
|
|
|
|
* @return 处理结果
|
|
|
|
|
*/
|
|
|
|
@ -605,6 +646,7 @@ public class PersonnelController extends CoreBaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取账号的所有组织信息集合
|
|
|
|
|
*
|
|
|
|
|
* @return 组织信息集合
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping(value = "/user/get-organize-list")
|
|
|
|
@ -677,6 +719,8 @@ public class PersonnelController extends CoreBaseController {
|
|
|
|
|
.notNull("infoDepartmentId", model.getInfoDepartmentId())
|
|
|
|
|
.notNull("userDepartmentId", model.getUserDepartmentId())
|
|
|
|
|
.notNull("userLoginName", model.getUserLoginName());
|
|
|
|
|
// FIXME 松下移除邮箱校验
|
|
|
|
|
// .notNull("userEmail", model.getUserEmail())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -763,6 +807,7 @@ public class PersonnelController extends CoreBaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据组织code查询对应的组织信息
|
|
|
|
|
*
|
|
|
|
|
* @param code 组织代码
|
|
|
|
|
* @return 处理结果
|
|
|
|
|
*/
|
|
|
|
@ -783,6 +828,7 @@ public class PersonnelController extends CoreBaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询所有组织信息
|
|
|
|
|
*
|
|
|
|
|
* @return 处理结果
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping(value = "/organize/list")
|
|
|
|
@ -802,6 +848,7 @@ public class PersonnelController extends CoreBaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询所有组织信息
|
|
|
|
|
*
|
|
|
|
|
* @return 处理结果
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping(value = "/license")
|
|
|
|
|