mirror of https://gitee.com/stylefeng/roses
【7.6.0】【sys】【org】更新通用组织机构树接口
parent
097994499b
commit
b2b45bee8b
|
@ -0,0 +1,41 @@
|
||||||
|
package cn.stylefeng.roses.kernel.sys.modular.org.controller;
|
||||||
|
|
||||||
|
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
|
||||||
|
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.GetResource;
|
||||||
|
import cn.stylefeng.roses.kernel.sys.modular.org.entity.HrOrganization;
|
||||||
|
import cn.stylefeng.roses.kernel.sys.modular.org.pojo.request.HrOrganizationRequest;
|
||||||
|
import cn.stylefeng.roses.kernel.sys.modular.org.service.HrOrganizationService;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通用组织机构接口
|
||||||
|
*
|
||||||
|
* @author fengshuonan
|
||||||
|
* @since 2023/6/11 10:04
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@ApiResource(name = "通用组织机构接口")
|
||||||
|
public class CommonOrgController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private HrOrganizationService hrOrganizationService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通用获取组织机构树
|
||||||
|
* <p>
|
||||||
|
* ps:用在获取用户管理和组织机构管理界面左侧树
|
||||||
|
*
|
||||||
|
* @author fengshuonan
|
||||||
|
* @since 2023/6/11 10:31
|
||||||
|
*/
|
||||||
|
@GetResource(name = "分页查询", path = "/common/org/tree")
|
||||||
|
public ResponseData<List<HrOrganization>> commonOrgTree(HrOrganizationRequest hrOrganizationRequest) {
|
||||||
|
return new SuccessResponseData<>(hrOrganizationService.commonOrgTree(hrOrganizationRequest));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package cn.stylefeng.roses.kernel.sys.modular.org.controller;
|
package cn.stylefeng.roses.kernel.sys.modular.org.controller.bak;
|
||||||
|
|
||||||
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
|
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
|
||||||
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
|
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
|
|
@ -1,4 +1,4 @@
|
||||||
package cn.stylefeng.roses.kernel.sys.modular.org.controller;
|
package cn.stylefeng.roses.kernel.sys.modular.org.controller.bak;
|
||||||
|
|
||||||
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
|
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
|
||||||
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
|
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
|
|
@ -1,7 +1,8 @@
|
||||||
package cn.stylefeng.roses.kernel.sys.modular.org.entity;
|
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.BaseExpandFieldEntity;
|
||||||
import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
|
import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
|
||||||
|
import cn.stylefeng.roses.kernel.rule.tree.factory.base.AbstractTreeNode;
|
||||||
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;
|
||||||
|
@ -10,6 +11,7 @@ import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 组织机构信息实例类
|
* 组织机构信息实例类
|
||||||
|
@ -17,10 +19,10 @@ import java.math.BigDecimal;
|
||||||
* @author fengshuonan
|
* @author fengshuonan
|
||||||
* @date 2023/06/10 21:23
|
* @date 2023/06/10 21:23
|
||||||
*/
|
*/
|
||||||
@TableName("hr_organization")
|
@TableName(value = "hr_organization", autoResultMap = true)
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class HrOrganization extends BaseEntity {
|
public class HrOrganization extends BaseExpandFieldEntity implements AbstractTreeNode<HrOrganization> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主键
|
* 主键
|
||||||
|
@ -120,32 +122,37 @@ public class HrOrganization extends BaseEntity {
|
||||||
@ChineseDescription("对接外部主数据的父级机构id")
|
@ChineseDescription("对接外部主数据的父级机构id")
|
||||||
private String masterOrgParentId;
|
private String masterOrgParentId;
|
||||||
|
|
||||||
/**
|
//-------------------------------非实体字段-------------------------------
|
||||||
* 拓展字段
|
//-------------------------------非实体字段-------------------------------
|
||||||
*/
|
//-------------------------------非实体字段-------------------------------
|
||||||
@TableField("expand_field")
|
|
||||||
@ChineseDescription("拓展字段")
|
|
||||||
private String expandField;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 乐观锁
|
* 子节点的集合
|
||||||
*/
|
*/
|
||||||
@TableField("version_flag")
|
@ChineseDescription("子节点的集合")
|
||||||
@ChineseDescription("乐观锁")
|
private List<HrOrganization> children;
|
||||||
private Long versionFlag;
|
|
||||||
|
|
||||||
/**
|
@Override
|
||||||
* 删除标记:Y-已删除,N-未删除
|
public String getNodeId() {
|
||||||
*/
|
if (this.orgId == null) {
|
||||||
@TableField("del_flag")
|
return null;
|
||||||
@ChineseDescription("删除标记:Y-已删除,N-未删除")
|
} else {
|
||||||
private String delFlag;
|
return this.orgId.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
@Override
|
||||||
* 租户号
|
public String getNodeParentId() {
|
||||||
*/
|
if (this.orgParentId == null) {
|
||||||
@TableField("tenant_id")
|
return null;
|
||||||
@ChineseDescription("租户号")
|
} else {
|
||||||
private Long tenantId;
|
return this.orgParentId.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setChildrenNodes(List<HrOrganization> childrenNodes) {
|
||||||
|
this.children = childrenNodes;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
package cn.stylefeng.roses.kernel.sys.modular.org.factory;
|
||||||
|
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
|
import cn.stylefeng.roses.kernel.sys.modular.org.entity.HrOrganization;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织机构创建工厂
|
||||||
|
*
|
||||||
|
* @author fengshuonan
|
||||||
|
* @since 2023/6/11 11:22
|
||||||
|
*/
|
||||||
|
public class OrganizationFactory {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过组织机构列表,获取这个组织机构列表的所有父级id集合
|
||||||
|
*
|
||||||
|
* @author fengshuonan
|
||||||
|
* @since 2023/6/11 11:22
|
||||||
|
*/
|
||||||
|
public static Set<Long> getOrgParentIdList(List<HrOrganization> organizationList) {
|
||||||
|
|
||||||
|
Set<Long> orgIdList = new HashSet<>();
|
||||||
|
|
||||||
|
for (HrOrganization hrOrganization : organizationList) {
|
||||||
|
String orgParentIdListStr = hrOrganization.getOrgPids();
|
||||||
|
|
||||||
|
// 去掉中括号符号
|
||||||
|
orgParentIdListStr = orgParentIdListStr.replaceAll("\\[", "");
|
||||||
|
orgParentIdListStr = orgParentIdListStr.replaceAll("]", "");
|
||||||
|
|
||||||
|
// 获取所有上级id列表
|
||||||
|
String[] orgParentIdList = orgParentIdListStr.split(",");
|
||||||
|
|
||||||
|
for (String orgIdStr : orgParentIdList) {
|
||||||
|
Long orgId = Convert.toLong(orgIdStr);
|
||||||
|
orgIdList.add(orgId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return orgIdList;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -15,7 +15,7 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public interface HrOrganizationService extends IService<HrOrganization> {
|
public interface HrOrganizationService extends IService<HrOrganization> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增
|
* 新增
|
||||||
*
|
*
|
||||||
* @param hrOrganizationRequest 请求参数
|
* @param hrOrganizationRequest 请求参数
|
||||||
|
@ -24,7 +24,7 @@ public interface HrOrganizationService extends IService<HrOrganization> {
|
||||||
*/
|
*/
|
||||||
void add(HrOrganizationRequest hrOrganizationRequest);
|
void add(HrOrganizationRequest hrOrganizationRequest);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
*
|
*
|
||||||
* @param hrOrganizationRequest 请求参数
|
* @param hrOrganizationRequest 请求参数
|
||||||
|
@ -33,7 +33,7 @@ public interface HrOrganizationService extends IService<HrOrganization> {
|
||||||
*/
|
*/
|
||||||
void del(HrOrganizationRequest hrOrganizationRequest);
|
void del(HrOrganizationRequest hrOrganizationRequest);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑
|
* 编辑
|
||||||
*
|
*
|
||||||
* @param hrOrganizationRequest 请求参数
|
* @param hrOrganizationRequest 请求参数
|
||||||
|
@ -42,7 +42,7 @@ public interface HrOrganizationService extends IService<HrOrganization> {
|
||||||
*/
|
*/
|
||||||
void edit(HrOrganizationRequest hrOrganizationRequest);
|
void edit(HrOrganizationRequest hrOrganizationRequest);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询详情
|
* 查询详情
|
||||||
*
|
*
|
||||||
* @param hrOrganizationRequest 请求参数
|
* @param hrOrganizationRequest 请求参数
|
||||||
|
@ -51,24 +51,34 @@ public interface HrOrganizationService extends IService<HrOrganization> {
|
||||||
*/
|
*/
|
||||||
HrOrganization detail(HrOrganizationRequest hrOrganizationRequest);
|
HrOrganization detail(HrOrganizationRequest hrOrganizationRequest);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取列表
|
* 获取列表
|
||||||
*
|
*
|
||||||
* @param hrOrganizationRequest 请求参数
|
* @param hrOrganizationRequest 请求参数
|
||||||
* @return List<HrOrganization> 返回结果
|
* @return List<HrOrganization> 返回结果
|
||||||
* @author fengshuonan
|
* @author fengshuonan
|
||||||
* @date 2023/06/10 21:23
|
* @date 2023/06/10 21:23
|
||||||
*/
|
*/
|
||||||
List<HrOrganization> findList(HrOrganizationRequest hrOrganizationRequest);
|
List<HrOrganization> findList(HrOrganizationRequest hrOrganizationRequest);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取列表(带分页)
|
* 获取列表(带分页)
|
||||||
*
|
*
|
||||||
* @param hrOrganizationRequest 请求参数
|
* @param hrOrganizationRequest 请求参数
|
||||||
* @return PageResult<HrOrganization> 返回结果
|
* @return PageResult<HrOrganization> 返回结果
|
||||||
* @author fengshuonan
|
* @author fengshuonan
|
||||||
* @date 2023/06/10 21:23
|
* @date 2023/06/10 21:23
|
||||||
*/
|
*/
|
||||||
PageResult<HrOrganization> findPage(HrOrganizationRequest hrOrganizationRequest);
|
PageResult<HrOrganization> findPage(HrOrganizationRequest hrOrganizationRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通用获取组织机构树
|
||||||
|
* <p>
|
||||||
|
* ps:用在获取用户管理和组织机构管理界面左侧树
|
||||||
|
*
|
||||||
|
* @author fengshuonan
|
||||||
|
* @since 2023/6/11 10:40
|
||||||
|
*/
|
||||||
|
List<HrOrganization> commonOrgTree(HrOrganizationRequest hrOrganizationRequest);
|
||||||
|
|
||||||
}
|
}
|
|
@ -2,12 +2,15 @@ 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.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
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;
|
||||||
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
|
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
|
||||||
import cn.stylefeng.roses.kernel.rule.exception.base.ServiceException;
|
import cn.stylefeng.roses.kernel.rule.exception.base.ServiceException;
|
||||||
|
import cn.stylefeng.roses.kernel.rule.tree.factory.DefaultTreeBuildFactory;
|
||||||
import cn.stylefeng.roses.kernel.sys.modular.org.entity.HrOrganization;
|
import cn.stylefeng.roses.kernel.sys.modular.org.entity.HrOrganization;
|
||||||
import cn.stylefeng.roses.kernel.sys.modular.org.enums.HrOrganizationExceptionEnum;
|
import cn.stylefeng.roses.kernel.sys.modular.org.enums.HrOrganizationExceptionEnum;
|
||||||
|
import cn.stylefeng.roses.kernel.sys.modular.org.factory.OrganizationFactory;
|
||||||
import cn.stylefeng.roses.kernel.sys.modular.org.mapper.HrOrganizationMapper;
|
import cn.stylefeng.roses.kernel.sys.modular.org.mapper.HrOrganizationMapper;
|
||||||
import cn.stylefeng.roses.kernel.sys.modular.org.pojo.request.HrOrganizationRequest;
|
import cn.stylefeng.roses.kernel.sys.modular.org.pojo.request.HrOrganizationRequest;
|
||||||
import cn.stylefeng.roses.kernel.sys.modular.org.service.HrOrganizationService;
|
import cn.stylefeng.roses.kernel.sys.modular.org.service.HrOrganizationService;
|
||||||
|
@ -16,8 +19,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 组织机构信息业务实现层
|
* 组织机构信息业务实现层
|
||||||
|
@ -28,7 +32,7 @@ import java.util.List;
|
||||||
@Service
|
@Service
|
||||||
public class HrOrganizationServiceImpl extends ServiceImpl<HrOrganizationMapper, HrOrganization> implements HrOrganizationService {
|
public class HrOrganizationServiceImpl extends ServiceImpl<HrOrganizationMapper, HrOrganization> implements HrOrganizationService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void add(HrOrganizationRequest hrOrganizationRequest) {
|
public void add(HrOrganizationRequest hrOrganizationRequest) {
|
||||||
HrOrganization hrOrganization = new HrOrganization();
|
HrOrganization hrOrganization = new HrOrganization();
|
||||||
BeanUtil.copyProperties(hrOrganizationRequest, hrOrganization);
|
BeanUtil.copyProperties(hrOrganizationRequest, hrOrganization);
|
||||||
|
@ -53,6 +57,12 @@ public class HrOrganizationServiceImpl extends ServiceImpl<HrOrganizationMapper,
|
||||||
return this.queryHrOrganization(hrOrganizationRequest);
|
return this.queryHrOrganization(hrOrganizationRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<HrOrganization> findList(HrOrganizationRequest hrOrganizationRequest) {
|
||||||
|
LambdaQueryWrapper<HrOrganization> wrapper = this.createWrapper(hrOrganizationRequest);
|
||||||
|
return this.list(wrapper);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<HrOrganization> findPage(HrOrganizationRequest hrOrganizationRequest) {
|
public PageResult<HrOrganization> findPage(HrOrganizationRequest hrOrganizationRequest) {
|
||||||
LambdaQueryWrapper<HrOrganization> wrapper = createWrapper(hrOrganizationRequest);
|
LambdaQueryWrapper<HrOrganization> wrapper = createWrapper(hrOrganizationRequest);
|
||||||
|
@ -61,9 +71,33 @@ public class HrOrganizationServiceImpl extends ServiceImpl<HrOrganizationMapper,
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<HrOrganization> findList(HrOrganizationRequest hrOrganizationRequest) {
|
public List<HrOrganization> commonOrgTree(HrOrganizationRequest hrOrganizationRequest) {
|
||||||
|
|
||||||
|
// 根据条件查询组织机构列表
|
||||||
LambdaQueryWrapper<HrOrganization> wrapper = this.createWrapper(hrOrganizationRequest);
|
LambdaQueryWrapper<HrOrganization> wrapper = this.createWrapper(hrOrganizationRequest);
|
||||||
return this.list(wrapper);
|
wrapper.select(HrOrganization::getOrgId, HrOrganization::getOrgParentId, HrOrganization::getOrgPids,
|
||||||
|
HrOrganization::getOrgName, HrOrganization::getOrgSort, HrOrganization::getOrgType);
|
||||||
|
List<HrOrganization> hrOrganizationList = this.list(wrapper);
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(hrOrganizationList)) {
|
||||||
|
return hrOrganizationList;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果查询条件不为空,则把相关的查询结果的父级也查询出来,组成一颗完整树
|
||||||
|
String searchText = hrOrganizationRequest.getSearchText();
|
||||||
|
List<HrOrganization> parentOrgList = new ArrayList<>();
|
||||||
|
if (ObjectUtil.isNotEmpty(searchText)) {
|
||||||
|
Set<Long> orgParentIdList = OrganizationFactory.getOrgParentIdList(hrOrganizationList);
|
||||||
|
LambdaQueryWrapper<HrOrganization> parentWrapper = new LambdaQueryWrapper<>();
|
||||||
|
parentWrapper.in(HrOrganization::getOrgId, orgParentIdList);
|
||||||
|
parentOrgList = this.list(parentWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合并两个集合
|
||||||
|
hrOrganizationList.addAll(parentOrgList);
|
||||||
|
|
||||||
|
// 构建树形结构
|
||||||
|
return new DefaultTreeBuildFactory<HrOrganization>().doTreeBuild(hrOrganizationList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -89,43 +123,18 @@ public class HrOrganizationServiceImpl extends ServiceImpl<HrOrganizationMapper,
|
||||||
private LambdaQueryWrapper<HrOrganization> createWrapper(HrOrganizationRequest hrOrganizationRequest) {
|
private LambdaQueryWrapper<HrOrganization> createWrapper(HrOrganizationRequest hrOrganizationRequest) {
|
||||||
LambdaQueryWrapper<HrOrganization> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<HrOrganization> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
|
||||||
Long orgId = hrOrganizationRequest.getOrgId();
|
// 如果按文本查询条件不为空,则判断组织机构名称、简称、税号、备注是否有匹配
|
||||||
Long orgParentId = hrOrganizationRequest.getOrgParentId();
|
String searchText = hrOrganizationRequest.getSearchText();
|
||||||
String orgPids = hrOrganizationRequest.getOrgPids();
|
if (StrUtil.isNotEmpty(searchText)) {
|
||||||
String orgName = hrOrganizationRequest.getOrgName();
|
queryWrapper.like(HrOrganization::getOrgName, searchText);
|
||||||
String orgShortName = hrOrganizationRequest.getOrgShortName();
|
queryWrapper.or().like(HrOrganization::getOrgShortName, searchText);
|
||||||
String orgCode = hrOrganizationRequest.getOrgCode();
|
queryWrapper.or().like(HrOrganization::getTaxNo, searchText);
|
||||||
BigDecimal orgSort = hrOrganizationRequest.getOrgSort();
|
queryWrapper.or().like(HrOrganization::getOrgCode, searchText);
|
||||||
Integer statusFlag = hrOrganizationRequest.getStatusFlag();
|
queryWrapper.or().like(HrOrganization::getRemark, searchText);
|
||||||
Integer orgType = hrOrganizationRequest.getOrgType();
|
}
|
||||||
String taxNo = hrOrganizationRequest.getTaxNo();
|
|
||||||
String remark = hrOrganizationRequest.getRemark();
|
|
||||||
Integer orgLevel = hrOrganizationRequest.getOrgLevel();
|
|
||||||
String masterOrgId = hrOrganizationRequest.getMasterOrgId();
|
|
||||||
String masterOrgParentId = hrOrganizationRequest.getMasterOrgParentId();
|
|
||||||
String expandField = hrOrganizationRequest.getExpandField();
|
|
||||||
Long versionFlag = hrOrganizationRequest.getVersionFlag();
|
|
||||||
String delFlag = hrOrganizationRequest.getDelFlag();
|
|
||||||
Long tenantId = hrOrganizationRequest.getTenantId();
|
|
||||||
|
|
||||||
queryWrapper.eq(ObjectUtil.isNotNull(orgId), HrOrganization::getOrgId, orgId);
|
// 根据排序正序查询
|
||||||
queryWrapper.eq(ObjectUtil.isNotNull(orgParentId), HrOrganization::getOrgParentId, orgParentId);
|
queryWrapper.orderByAsc(HrOrganization::getOrgSort);
|
||||||
queryWrapper.like(ObjectUtil.isNotEmpty(orgPids), HrOrganization::getOrgPids, orgPids);
|
|
||||||
queryWrapper.like(ObjectUtil.isNotEmpty(orgName), HrOrganization::getOrgName, orgName);
|
|
||||||
queryWrapper.like(ObjectUtil.isNotEmpty(orgShortName), HrOrganization::getOrgShortName, orgShortName);
|
|
||||||
queryWrapper.like(ObjectUtil.isNotEmpty(orgCode), HrOrganization::getOrgCode, orgCode);
|
|
||||||
queryWrapper.eq(ObjectUtil.isNotNull(orgSort), HrOrganization::getOrgSort, orgSort);
|
|
||||||
queryWrapper.eq(ObjectUtil.isNotNull(statusFlag), HrOrganization::getStatusFlag, statusFlag);
|
|
||||||
queryWrapper.eq(ObjectUtil.isNotNull(orgType), HrOrganization::getOrgType, orgType);
|
|
||||||
queryWrapper.like(ObjectUtil.isNotEmpty(taxNo), HrOrganization::getTaxNo, taxNo);
|
|
||||||
queryWrapper.like(ObjectUtil.isNotEmpty(remark), HrOrganization::getRemark, remark);
|
|
||||||
queryWrapper.eq(ObjectUtil.isNotNull(orgLevel), HrOrganization::getOrgLevel, orgLevel);
|
|
||||||
queryWrapper.like(ObjectUtil.isNotEmpty(masterOrgId), HrOrganization::getMasterOrgId, masterOrgId);
|
|
||||||
queryWrapper.like(ObjectUtil.isNotEmpty(masterOrgParentId), HrOrganization::getMasterOrgParentId, masterOrgParentId);
|
|
||||||
queryWrapper.like(ObjectUtil.isNotEmpty(expandField), HrOrganization::getExpandField, expandField);
|
|
||||||
queryWrapper.eq(ObjectUtil.isNotNull(versionFlag), HrOrganization::getVersionFlag, versionFlag);
|
|
||||||
queryWrapper.like(ObjectUtil.isNotEmpty(delFlag), HrOrganization::getDelFlag, delFlag);
|
|
||||||
queryWrapper.eq(ObjectUtil.isNotNull(tenantId), HrOrganization::getTenantId, tenantId);
|
|
||||||
|
|
||||||
return queryWrapper;
|
return queryWrapper;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue