mirror of https://gitee.com/stylefeng/roses
Merge branch 'master' into 7.2.3-dev
commit
e0eb0e2bdf
|
@ -25,6 +25,8 @@
|
||||||
package cn.stylefeng.roses.kernel.system.api;
|
package cn.stylefeng.roses.kernel.system.api;
|
||||||
|
|
||||||
import cn.stylefeng.roses.kernel.system.api.pojo.organization.HrOrganizationDTO;
|
import cn.stylefeng.roses.kernel.system.api.pojo.organization.HrOrganizationDTO;
|
||||||
|
import cn.stylefeng.roses.kernel.system.api.pojo.organization.HrOrganizationRequest;
|
||||||
|
import cn.stylefeng.roses.kernel.system.api.pojo.organization.OrganizationTreeNode;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -52,4 +54,12 @@ public interface OrganizationServiceApi {
|
||||||
* @date 2022/3/8 23:32
|
* @date 2022/3/8 23:32
|
||||||
*/
|
*/
|
||||||
HrOrganizationDTO getOrgDetail(Long orgId);
|
HrOrganizationDTO getOrgDetail(Long orgId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取组织机构下拉选择树
|
||||||
|
*
|
||||||
|
* @author fengshuonan
|
||||||
|
* @date 2022/6/8 14:40
|
||||||
|
*/
|
||||||
|
List<OrganizationTreeNode> getOrgTreeList(HrOrganizationRequest hrOrganizationRequest);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ import cn.stylefeng.roses.kernel.system.api.pojo.role.dto.SysRoleDTO;
|
||||||
import cn.stylefeng.roses.kernel.system.api.pojo.role.dto.SysRoleMenuButtonDTO;
|
import cn.stylefeng.roses.kernel.system.api.pojo.role.dto.SysRoleMenuButtonDTO;
|
||||||
import cn.stylefeng.roses.kernel.system.api.pojo.role.dto.SysRoleMenuDTO;
|
import cn.stylefeng.roses.kernel.system.api.pojo.role.dto.SysRoleMenuDTO;
|
||||||
import cn.stylefeng.roses.kernel.system.api.pojo.role.dto.SysRoleResourceDTO;
|
import cn.stylefeng.roses.kernel.system.api.pojo.role.dto.SysRoleResourceDTO;
|
||||||
|
import cn.stylefeng.roses.kernel.system.api.pojo.role.request.SysRoleRequest;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -118,4 +119,11 @@ public interface RoleServiceApi {
|
||||||
*/
|
*/
|
||||||
List<SysRoleMenuButtonDTO> getRoleMenuButtonList(List<Long> roleIdList);
|
List<SysRoleMenuButtonDTO> getRoleMenuButtonList(List<Long> roleIdList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有角色列表
|
||||||
|
*
|
||||||
|
* @author fengshuonan
|
||||||
|
* @date 2022/6/8 14:58
|
||||||
|
*/
|
||||||
|
List<SysRoleDTO> getRoleSelectList(SysRoleRequest sysRoleRequest);
|
||||||
}
|
}
|
||||||
|
|
|
@ -199,4 +199,18 @@ public class HrOrganizationController {
|
||||||
return new SuccessResponseData<>(zTreeNodes);
|
return new SuccessResponseData<>(zTreeNodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有组织机构树(树形)
|
||||||
|
* <p>
|
||||||
|
* 一般用在组织机构选择界面
|
||||||
|
*
|
||||||
|
* @author fengshuonan
|
||||||
|
* @date 2021/1/9 18:37
|
||||||
|
*/
|
||||||
|
@GetResource(name = "获取所有组织机构树(树形)", path = "/hrOrganization/getOrgTreeList")
|
||||||
|
public ResponseData<List<OrganizationTreeNode>> getOrgTreeList(HrOrganizationRequest hrOrganizationRequest) {
|
||||||
|
List<OrganizationTreeNode> list = hrOrganizationService.getOrgTreeList(hrOrganizationRequest);
|
||||||
|
return new SuccessResponseData<>(list);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -369,6 +369,25 @@ public class HrOrganizationServiceImpl extends ServiceImpl<HrOrganizationMapper,
|
||||||
return hrOrganizationDTO;
|
return hrOrganizationDTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<OrganizationTreeNode> getOrgTreeList(HrOrganizationRequest hrOrganizationRequest) {
|
||||||
|
|
||||||
|
List<OrganizationTreeNode> treeNodeList = CollectionUtil.newArrayList();
|
||||||
|
|
||||||
|
// 获取所有组织机构
|
||||||
|
LambdaQueryWrapper<HrOrganization> wrapper = createWrapper(hrOrganizationRequest);
|
||||||
|
List<HrOrganization> hrOrganizationList = this.list(wrapper);
|
||||||
|
|
||||||
|
// 组装节点
|
||||||
|
for (HrOrganization hrOrganization : hrOrganizationList) {
|
||||||
|
OrganizationTreeNode treeNode = OrganizationFactory.parseOrganizationTreeNode(hrOrganization);
|
||||||
|
treeNodeList.add(treeNode);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 节点组装成树
|
||||||
|
return new DefaultTreeBuildFactory<OrganizationTreeNode>().doTreeBuild(treeNodeList);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建组织架构的通用条件查询wrapper
|
* 创建组织架构的通用条件查询wrapper
|
||||||
*
|
*
|
||||||
|
|
|
@ -228,4 +228,15 @@ public class SysRoleController {
|
||||||
return new SuccessResponseData<>(sysRoleService.getRoleDataScope(sysRoleRequest));
|
return new SuccessResponseData<>(sysRoleService.getRoleDataScope(sysRoleRequest));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取角色下拉列表
|
||||||
|
*
|
||||||
|
* @author fengshuonan
|
||||||
|
* @date 2022/6/8 14:57
|
||||||
|
*/
|
||||||
|
@GetResource(name = "获取角色下拉列表", path = "/sysRole/getRoleSelectList")
|
||||||
|
public ResponseData<List<SysRoleDTO>> getRoleSelectList(SysRoleRequest sysRoleRequest) {
|
||||||
|
return new SuccessResponseData<>(sysRoleService.getRoleSelectList(sysRoleRequest));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -565,6 +565,22 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
|
||||||
return sysRoleMenuButtons.parallelStream().map(item -> BeanUtil.copyProperties(item, SysRoleMenuButtonDTO.class)).collect(Collectors.toList());
|
return sysRoleMenuButtons.parallelStream().map(item -> BeanUtil.copyProperties(item, SysRoleMenuButtonDTO.class)).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SysRoleDTO> getRoleSelectList(SysRoleRequest sysRoleRequest) {
|
||||||
|
|
||||||
|
LambdaQueryWrapper<SysRole> wrapper = this.createWrapper(sysRoleRequest);
|
||||||
|
List<SysRole> list = this.list(wrapper);
|
||||||
|
|
||||||
|
ArrayList<SysRoleDTO> sysRoleDTOS = new ArrayList<>();
|
||||||
|
for (SysRole sysRole : list) {
|
||||||
|
SysRoleDTO sysRoleDTO = new SysRoleDTO();
|
||||||
|
BeanUtil.copyProperties(sysRole, sysRoleDTO);
|
||||||
|
sysRoleDTOS.add(sysRoleDTO);
|
||||||
|
}
|
||||||
|
|
||||||
|
return sysRoleDTOS;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取系统角色
|
* 获取系统角色
|
||||||
*
|
*
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -120,7 +120,7 @@
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<roses.version>7.2.3</roses.version>
|
<roses.version>7.2.3</roses.version>
|
||||||
<hutool.version>5.7.6</hutool.version>
|
<hutool.version>5.7.6</hutool.version>
|
||||||
<fastjson.version>1.2.78</fastjson.version>
|
<fastjson.version>1.2.83</fastjson.version>
|
||||||
<lombok.versin>1.18.24</lombok.versin>
|
<lombok.versin>1.18.24</lombok.versin>
|
||||||
<mp.version>3.4.0</mp.version>
|
<mp.version>3.4.0</mp.version>
|
||||||
<mysql-connector-java.version>8.0.21</mysql-connector-java.version>
|
<mysql-connector-java.version>8.0.21</mysql-connector-java.version>
|
||||||
|
|
Loading…
Reference in New Issue