Commit 8ff09f96 authored by nie'hong's avatar nie'hong

修改-上级单位不需要查看下级单位创建的学习内容

parent cd0121b3
...@@ -304,22 +304,24 @@ public class LearningContentController extends BaseController { ...@@ -304,22 +304,24 @@ public class LearningContentController extends BaseController {
// 分页查询这里不包括主学习内容 // 分页查询这里不包括主学习内容
queryWrapper.eq(LearningContent::getIsMajor, false); queryWrapper.eq(LearningContent::getIsMajor, false);
// 上级机构 // 上级机构
List<String> curUserParOrgIds = getCurUserParOrgIds(); // List<String> curUserParOrgIds = getCurUserParOrgIds();
// 下级机构展板 // 下级机构展板
List<String> curUserSubOrgIds = getCurUserSubOrgIds(); List<String> curUserSubOrgIds = getCurUserSubOrgIds();
if (!CollectionUtils.isEmpty(curUserSubOrgIds)){ if (!CollectionUtils.isEmpty(curUserSubOrgIds)){
List<String> list = Arrays.asList("ALL_PLAT"); List<String> list = Arrays.asList("ALL_PLAT");
queryWrapper.and(s -> { queryWrapper.and(s -> {
if (CollectionUtil.isEmpty(curUserParOrgIds)){ // if (CollectionUtil.isEmpty(curUserParOrgIds)){
s.in(LearningContent::getOrganCode, curUserSubOrgIds) // s.in(LearningContent::getOrganCode, curUserSubOrgIds)
.or().in(LearningContent::getApplicableScope, list); // .or().in(LearningContent::getApplicableScope, list);
}else{ // }else{
// s.in(LearningContent::getOrganCode, curUserSubOrgIds)
// .or().in(LearningContent::getApplicableScope, list)
// .or(q ->q.in(LearningContent::getOrganCode, curUserParOrgIds)
// .eq(LearningContent::getApplicableScope,"THIS_ORGAN_SUB"));
// }
s.in(LearningContent::getOrganCode, curUserSubOrgIds) s.in(LearningContent::getOrganCode, curUserSubOrgIds)
.or().in(LearningContent::getApplicableScope, list) .or().in(LearningContent::getApplicableScope, list);
.or(q ->q.in(LearningContent::getOrganCode, curUserParOrgIds)
.eq(LearningContent::getApplicableScope,"THIS_ORGAN_SUB"));
}
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment