mirror of https://gitee.com/stylefeng/roses
【7.6.0】【sys】【org approver】获取审批人绑定列表
parent
75b8440bfb
commit
7b475d4fa2
|
@ -24,13 +24,23 @@
|
||||||
*/
|
*/
|
||||||
package cn.stylefeng.roses.kernel.sys.api;
|
package cn.stylefeng.roses.kernel.sys.api;
|
||||||
|
|
||||||
|
import cn.stylefeng.roses.kernel.sys.api.pojo.SysUserDTO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基础核心业务Api
|
* 基础核心业务Api
|
||||||
*
|
*
|
||||||
* @author fengshuonan
|
* @author fengshuonan
|
||||||
* @date 2023-06-10 20:50:43
|
* @date 2023-06-10 20:50:43
|
||||||
*/
|
*/
|
||||||
public interface SysApi {
|
public interface SysUserServiceApi {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户ID获取用户信息
|
||||||
|
*
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @author majianguo
|
||||||
|
* @since 2021/1/9 19:00
|
||||||
|
*/
|
||||||
|
SysUserDTO getUserInfoByUserId(Long userId);
|
||||||
|
|
||||||
}
|
}
|
|
@ -0,0 +1,164 @@
|
||||||
|
/*
|
||||||
|
* Copyright [2020-2030] [https://www.stylefeng.cn]
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
* Guns采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
|
||||||
|
*
|
||||||
|
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||||
|
* 2.请不要删除和修改Guns源码头部的版权声明。
|
||||||
|
* 3.请保留源码和相关描述文件的项目出处,作者声明等。
|
||||||
|
* 4.分发源码时候,请注明软件出处 https://gitee.com/stylefeng/guns
|
||||||
|
* 5.在修改包名,模块名称,项目代码等时,请注明软件出处 https://gitee.com/stylefeng/guns
|
||||||
|
* 6.若您的项目无法满足以上几点,可申请商业授权
|
||||||
|
*/
|
||||||
|
package cn.stylefeng.roses.kernel.sys.api.pojo;
|
||||||
|
|
||||||
|
import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统用户结果
|
||||||
|
*
|
||||||
|
* @author fengshuonan
|
||||||
|
* @since 2020/4/2 9:19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SysUserDTO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@ChineseDescription("主键")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账号
|
||||||
|
*/
|
||||||
|
@ChineseDescription("账号")
|
||||||
|
private String account;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 昵称
|
||||||
|
*/
|
||||||
|
@ChineseDescription("昵称")
|
||||||
|
private String nickName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
@ChineseDescription("姓名")
|
||||||
|
private String realName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 头像
|
||||||
|
*/
|
||||||
|
@ChineseDescription("头像")
|
||||||
|
private Long avatar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生日
|
||||||
|
*/
|
||||||
|
@ChineseDescription("生日")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date birthday;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 性别(M-男,F-女)
|
||||||
|
*/
|
||||||
|
@ChineseDescription("性别(M-男,F-女)")
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮箱
|
||||||
|
*/
|
||||||
|
@ChineseDescription("邮箱")
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机
|
||||||
|
*/
|
||||||
|
@ChineseDescription("手机")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 密码
|
||||||
|
*/
|
||||||
|
@ChineseDescription("密码")
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电话
|
||||||
|
*/
|
||||||
|
@ChineseDescription("电话")
|
||||||
|
private String tel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户所属机构
|
||||||
|
*/
|
||||||
|
@ChineseDescription("用户所属机构")
|
||||||
|
private Long orgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户所属机构名称
|
||||||
|
*/
|
||||||
|
@ChineseDescription("用户所属机构名称")
|
||||||
|
private String orgName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户所属机构的职务
|
||||||
|
*/
|
||||||
|
@ChineseDescription("用户所属机构的职务")
|
||||||
|
private Long positionId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 职务名称
|
||||||
|
*/
|
||||||
|
@ChineseDescription("职务名称")
|
||||||
|
private String positionName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@ChineseDescription("状态")
|
||||||
|
private Integer statusFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户角色id
|
||||||
|
*/
|
||||||
|
@ChineseDescription("用户角色id")
|
||||||
|
private List<Long> grantRoleIdList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否是超级管理员,超级管理员可以拥有所有权限(Y-是,N-否)
|
||||||
|
*/
|
||||||
|
@ChineseDescription("是否是超级管理员,超级管理员可以拥有所有权限(Y-是,N-否)")
|
||||||
|
private String superAdminFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否密码重试次数过多,当密码重试次数超过5次这个状态就会激活
|
||||||
|
*/
|
||||||
|
@ChineseDescription("是否密码重试次数过多")
|
||||||
|
private Boolean loginErrorCountFlag = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 头像地址
|
||||||
|
*/
|
||||||
|
@ChineseDescription("头像地址")
|
||||||
|
private String avatarUrl;
|
||||||
|
|
||||||
|
}
|
|
@ -5,7 +5,10 @@ import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
|
||||||
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
|
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
|
||||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
|
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
|
||||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
|
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
|
||||||
|
import cn.stylefeng.roses.kernel.sys.modular.org.entity.HrOrgApprover;
|
||||||
|
import cn.stylefeng.roses.kernel.sys.modular.org.pojo.request.HrOrgApproverRequest;
|
||||||
import cn.stylefeng.roses.kernel.sys.modular.org.service.HrOrgApproverService;
|
import cn.stylefeng.roses.kernel.sys.modular.org.service.HrOrgApproverService;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
@ -35,4 +38,15 @@ public class HrOrgApproverController {
|
||||||
return new SuccessResponseData<>(hrOrgApproverService.getApproverTypeList());
|
return new SuccessResponseData<>(hrOrgApproverService.getApproverTypeList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取组织机构审批人绑定列表
|
||||||
|
*
|
||||||
|
* @author fengshuonan
|
||||||
|
* @since 2022/09/13 23:15
|
||||||
|
*/
|
||||||
|
@GetResource(name = "获取组织机构审批人绑定列表", path = "/hrOrgApprover/getBindingList")
|
||||||
|
public ResponseData<List<HrOrgApprover>> getOrgApproverList(@Validated(HrOrgApproverRequest.list.class) HrOrgApproverRequest hrOrgApproverRequest) {
|
||||||
|
return new SuccessResponseData<>(hrOrgApproverService.getOrgApproverList(hrOrgApproverRequest));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package cn.stylefeng.roses.kernel.sys.modular.org.entity;
|
||||||
|
|
||||||
import cn.stylefeng.roses.kernel.db.api.pojo.entity.BaseEntity;
|
import cn.stylefeng.roses.kernel.db.api.pojo.entity.BaseEntity;
|
||||||
import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
|
import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
|
||||||
|
import cn.stylefeng.roses.kernel.sys.modular.org.pojo.response.ApproverBindUserItem;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
@ -9,6 +10,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 组织机构审批人实例类
|
* 组织机构审批人实例类
|
||||||
*
|
*
|
||||||
|
@ -55,4 +58,15 @@ public class HrOrgApprover extends BaseEntity {
|
||||||
@ChineseDescription("租户id")
|
@ChineseDescription("租户id")
|
||||||
private Long tenantId;
|
private Long tenantId;
|
||||||
|
|
||||||
|
//-------------------------------非实体字段-------------------------------
|
||||||
|
//-------------------------------非实体字段-------------------------------
|
||||||
|
//-------------------------------非实体字段-------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定人员信息
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ChineseDescription("绑定人员信息")
|
||||||
|
private List<ApproverBindUserItem> bindUserItemList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
package cn.stylefeng.roses.kernel.sys.modular.org.factory;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
|
import cn.stylefeng.roses.kernel.sys.api.SysUserServiceApi;
|
||||||
|
import cn.stylefeng.roses.kernel.sys.api.pojo.SysUserDTO;
|
||||||
|
import cn.stylefeng.roses.kernel.sys.modular.org.entity.HrOrgApprover;
|
||||||
|
import cn.stylefeng.roses.kernel.sys.modular.org.pojo.response.ApproverBindUserItem;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织机构审批人创建工厂
|
||||||
|
*
|
||||||
|
* @author fengshuonan
|
||||||
|
* @since 2023/6/11 15:35
|
||||||
|
*/
|
||||||
|
public class OrgApproverFactory {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Approver信息转化为用户详细信息
|
||||||
|
*
|
||||||
|
* @author fengshuonan
|
||||||
|
* @since 2023/6/11 15:35
|
||||||
|
*/
|
||||||
|
public static List<ApproverBindUserItem> convertUserItem(List<HrOrgApprover> userList) {
|
||||||
|
|
||||||
|
// 获取所有用户id
|
||||||
|
List<Long> userIdList = userList.stream().map(HrOrgApprover::getUserId).collect(Collectors.toList());
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(userIdList)) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
List<ApproverBindUserItem> users = new ArrayList<>();
|
||||||
|
for (Long userId : userIdList) {
|
||||||
|
ApproverBindUserItem bindUserItem = new ApproverBindUserItem();
|
||||||
|
bindUserItem.setUserId(userId);
|
||||||
|
|
||||||
|
// 获取用户详情信息
|
||||||
|
SysUserServiceApi sysUserServiceApi = SpringUtil.getBean(SysUserServiceApi.class);
|
||||||
|
SysUserDTO sysUserDTO = sysUserServiceApi.getUserInfoByUserId(userId);
|
||||||
|
|
||||||
|
bindUserItem.setName(sysUserDTO.getRealName());
|
||||||
|
bindUserItem.setAvatarUrl(sysUserDTO.getAvatarUrl());
|
||||||
|
|
||||||
|
users.add(bindUserItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
return users;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -20,7 +20,6 @@ public class HrOrgApproverRequest extends BaseRequest {
|
||||||
/**
|
/**
|
||||||
* 主键id
|
* 主键id
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "主键id不能为空", groups = {edit.class, delete.class})
|
|
||||||
@ChineseDescription("主键id")
|
@ChineseDescription("主键id")
|
||||||
private Long orgApproverId;
|
private Long orgApproverId;
|
||||||
|
|
||||||
|
@ -34,6 +33,7 @@ public class HrOrgApproverRequest extends BaseRequest {
|
||||||
* 组织机构id
|
* 组织机构id
|
||||||
*/
|
*/
|
||||||
@ChineseDescription("组织机构id")
|
@ChineseDescription("组织机构id")
|
||||||
|
@NotNull(message = "组织机构id不能为空", groups = {list.class})
|
||||||
private Long orgId;
|
private Long orgId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
package cn.stylefeng.roses.kernel.sys.modular.org.pojo.response;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定用户信息详情(用在部门审批人绑定用户)
|
||||||
|
*
|
||||||
|
* @author fengshuonan
|
||||||
|
* @since 2022/9/13 23:47
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ApproverBindUserItem {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 头像url
|
||||||
|
*/
|
||||||
|
private String avatarUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司或部门名称
|
||||||
|
*/
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
}
|
|
@ -81,4 +81,12 @@ public interface HrOrgApproverService extends IService<HrOrgApprover> {
|
||||||
*/
|
*/
|
||||||
List<SimpleDict> getApproverTypeList();
|
List<SimpleDict> getApproverTypeList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取组织机构绑定的审批人列表
|
||||||
|
*
|
||||||
|
* @author fengshuonan
|
||||||
|
* @since 2023/6/11 15:23
|
||||||
|
*/
|
||||||
|
List<HrOrgApprover> getOrgApproverList(HrOrgApproverRequest hrOrgApproverRequest);
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
package cn.stylefeng.roses.kernel.sys.modular.org.service.impl;
|
package cn.stylefeng.roses.kernel.sys.modular.org.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.stylefeng.roses.kernel.db.api.factory.PageFactory;
|
import cn.stylefeng.roses.kernel.db.api.factory.PageFactory;
|
||||||
import cn.stylefeng.roses.kernel.db.api.factory.PageResultFactory;
|
import cn.stylefeng.roses.kernel.db.api.factory.PageResultFactory;
|
||||||
|
@ -12,8 +13,10 @@ import cn.stylefeng.roses.kernel.sys.api.callback.RemoveOrgCallbackApi;
|
||||||
import cn.stylefeng.roses.kernel.sys.modular.org.constants.ApproverConstants;
|
import cn.stylefeng.roses.kernel.sys.modular.org.constants.ApproverConstants;
|
||||||
import cn.stylefeng.roses.kernel.sys.modular.org.entity.HrOrgApprover;
|
import cn.stylefeng.roses.kernel.sys.modular.org.entity.HrOrgApprover;
|
||||||
import cn.stylefeng.roses.kernel.sys.modular.org.enums.HrOrgApproverExceptionEnum;
|
import cn.stylefeng.roses.kernel.sys.modular.org.enums.HrOrgApproverExceptionEnum;
|
||||||
|
import cn.stylefeng.roses.kernel.sys.modular.org.factory.OrgApproverFactory;
|
||||||
import cn.stylefeng.roses.kernel.sys.modular.org.mapper.HrOrgApproverMapper;
|
import cn.stylefeng.roses.kernel.sys.modular.org.mapper.HrOrgApproverMapper;
|
||||||
import cn.stylefeng.roses.kernel.sys.modular.org.pojo.request.HrOrgApproverRequest;
|
import cn.stylefeng.roses.kernel.sys.modular.org.pojo.request.HrOrgApproverRequest;
|
||||||
|
import cn.stylefeng.roses.kernel.sys.modular.org.pojo.response.ApproverBindUserItem;
|
||||||
import cn.stylefeng.roses.kernel.sys.modular.org.service.HrOrgApproverService;
|
import cn.stylefeng.roses.kernel.sys.modular.org.service.HrOrgApproverService;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
|
@ -22,8 +25,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 组织机构审批人业务实现层
|
* 组织机构审批人业务实现层
|
||||||
|
@ -74,6 +80,44 @@ public class HrOrgApproverServiceImpl extends ServiceImpl<HrOrgApproverMapper, H
|
||||||
return dictApi.getDictDetailsByDictTypeCode(ApproverConstants.APPROVER_TYPE_DICT_TYPE_CODE);
|
return dictApi.getDictDetailsByDictTypeCode(ApproverConstants.APPROVER_TYPE_DICT_TYPE_CODE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<HrOrgApprover> getOrgApproverList(HrOrgApproverRequest hrOrgApproverRequest) {
|
||||||
|
|
||||||
|
// 获取当前系统的审批人类型列表
|
||||||
|
List<SimpleDict> approverTypeList = this.getApproverTypeList();
|
||||||
|
|
||||||
|
// 获取指定机构的绑定情况
|
||||||
|
LambdaQueryWrapper<HrOrgApprover> hrOrgApproverLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
hrOrgApproverLambdaQueryWrapper.eq(HrOrgApprover::getOrgId, hrOrgApproverRequest.getOrgId());
|
||||||
|
List<HrOrgApprover> orgTotalBindingList = this.list(hrOrgApproverLambdaQueryWrapper);
|
||||||
|
if (ObjectUtil.isEmpty(orgTotalBindingList)) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 将每个类型的用户分组,key是审批组类型,value是该组下的用户
|
||||||
|
Map<Integer, List<HrOrgApprover>> groupingByUsers = orgTotalBindingList.stream().collect(Collectors.groupingBy(HrOrgApprover::getOrgApproverType));
|
||||||
|
|
||||||
|
// 先初始化空的绑定情况列表
|
||||||
|
ArrayList<HrOrgApprover> resultList = new ArrayList<>();
|
||||||
|
for (SimpleDict orgApproverType : approverTypeList) {
|
||||||
|
HrOrgApprover hrOrgApprover = new HrOrgApprover();
|
||||||
|
|
||||||
|
// 设置类型
|
||||||
|
hrOrgApprover.setOrgApproverType(Convert.toInt(orgApproverType.getCode()));
|
||||||
|
|
||||||
|
// 设置该类型下的审批人列表
|
||||||
|
List<HrOrgApprover> userList = groupingByUsers.get(hrOrgApprover.getOrgApproverType());
|
||||||
|
if (ObjectUtil.isNotEmpty(userList)) {
|
||||||
|
List<ApproverBindUserItem> bindUserItems = OrgApproverFactory.convertUserItem(userList);
|
||||||
|
hrOrgApprover.setBindUserItemList(bindUserItems);
|
||||||
|
}
|
||||||
|
|
||||||
|
resultList.add(hrOrgApprover);
|
||||||
|
}
|
||||||
|
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<HrOrgApprover> findList(HrOrgApproverRequest hrOrgApproverRequest) {
|
public List<HrOrgApprover> findList(HrOrgApproverRequest hrOrgApproverRequest) {
|
||||||
LambdaQueryWrapper<HrOrgApprover> wrapper = this.createWrapper(hrOrgApproverRequest);
|
LambdaQueryWrapper<HrOrgApprover> wrapper = this.createWrapper(hrOrgApproverRequest);
|
||||||
|
|
Loading…
Reference in New Issue