mirror of https://gitee.com/stylefeng/roses
【7.2.5】【org】更新获取组织树增加指定组织机构下查询
parent
b3878c454f
commit
dfa99011d8
|
@ -35,6 +35,7 @@ import lombok.EqualsAndHashCode;
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统组织机构表
|
* 系统组织机构表
|
||||||
|
@ -134,6 +135,12 @@ public class HrOrganizationRequest extends BaseRequest {
|
||||||
@ChineseDescription("动态表单数据")
|
@ChineseDescription("动态表单数据")
|
||||||
private ExpandDataInfo expandDataInfo;
|
private ExpandDataInfo expandDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 限制从哪些组织机构中查询,传组织机构id集合
|
||||||
|
*/
|
||||||
|
@ChineseDescription("限制从哪些组织机构中查询")
|
||||||
|
private List<Long> orgIdLimit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 组织机构树zTree形式
|
* 组织机构树zTree形式
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -499,6 +499,16 @@ public class HrOrganizationServiceImpl extends ServiceImpl<HrOrganizationMapper,
|
||||||
// 拼接机构id查询条件
|
// 拼接机构id查询条件
|
||||||
queryWrapper.eq(ObjectUtil.isNotEmpty(orgId), HrOrganization::getOrgId, orgId);
|
queryWrapper.eq(ObjectUtil.isNotEmpty(orgId), HrOrganization::getOrgId, orgId);
|
||||||
|
|
||||||
|
// 拼接限制查询范围列表
|
||||||
|
List<Long> orgIdLimit = hrOrganizationRequest.getOrgIdLimit();
|
||||||
|
if (ObjectUtil.isNotEmpty(orgIdLimit)) {
|
||||||
|
queryWrapper.nested(qw -> {
|
||||||
|
for (Long itemOrgId : orgIdLimit) {
|
||||||
|
qw.or().like(HrOrganization::getOrgPids, itemOrgId);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return queryWrapper;
|
return queryWrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue