Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
chnmuseum-party
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liqin
chnmuseum-party
Commits
29924daf
Commit
29924daf
authored
Jun 26, 2021
by
nie'hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改-查询学习内容下级可查看上级创建的内容
parent
c1888a5c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
3 deletions
+38
-3
LearningContentController.java
...useum/party/web/controller/LearningContentController.java
+38
-3
No files found.
src/main/java/cn/chnmuseum/party/web/controller/LearningContentController.java
View file @
29924daf
...
@@ -303,13 +303,26 @@ public class LearningContentController extends BaseController {
...
@@ -303,13 +303,26 @@ public class LearningContentController extends BaseController {
LambdaQueryWrapper
<
LearningContent
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
LearningContent
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
// 分页查询这里不包括主学习内容
// 分页查询这里不包括主学习内容
queryWrapper
.
eq
(
LearningContent:
:
getIsMajor
,
false
);
queryWrapper
.
eq
(
LearningContent:
:
getIsMajor
,
false
);
// 上级机构
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
->
s
.
in
(
LearningContent:
:
getOrganCode
,
curUserSubOrgIds
).
or
()
queryWrapper
.
and
(
s
->
{
.
in
(
LearningContent:
:
getApplicableScope
,
list
));
if
(
CollectionUtil
.
isEmpty
(
curUserParOrgIds
)){
s
.
in
(
LearningContent:
:
getOrganCode
,
curUserSubOrgIds
)
.
or
().
in
(
LearningContent:
:
getApplicableScope
,
list
);
}
else
{
s
.
in
(
LearningContent:
:
getOrganCode
,
curUserSubOrgIds
)
.
or
().
in
(
LearningContent:
:
getApplicableScope
,
list
)
.
or
(
q
->
q
.
in
(
LearningContent:
:
getOrganCode
,
curUserParOrgIds
)
.
eq
(
LearningContent:
:
getApplicableScope
,
"THIS_ORGAN_SUB"
));
}
}
});
}
// 根据创建时间区间检索
// 根据创建时间区间检索
if
(
genericPageParam
.
getIsPublished
()
!=
null
)
{
if
(
genericPageParam
.
getIsPublished
()
!=
null
)
{
...
@@ -373,6 +386,28 @@ public class LearningContentController extends BaseController {
...
@@ -373,6 +386,28 @@ public class LearningContentController extends BaseController {
return
getResult
(
page
);
return
getResult
(
page
);
}
}
/**
* 获取当前用户的上级机构
*/
public
List
<
String
>
getCurUserParOrgIds
()
{
TUser
tUser
=
getcurUser
();
// 上级机构
List
<
String
>
parGranCode
=
new
ArrayList
<>();
String
orgId
=
tUser
.
getOrgId
();
TOrgan
tOrgan
=
this
.
organService
.
getById
(
orgId
);
if
(!
"0"
.
equals
(
tOrgan
.
getParentId
()))
{
TOrgan
tOrgan1
=
this
.
organService
.
getById
(
tOrgan
.
getParentId
());
parGranCode
.
add
(
tOrgan1
.
getCode
());
if
(!
"0"
.
equals
(
tOrgan1
.
getParentId
()))
{
TOrgan
tOrgan2
=
this
.
organService
.
getById
(
tOrgan1
.
getParentId
());
parGranCode
.
add
(
tOrgan2
.
getCode
());
}
}
return
parGranCode
;
}
/**
/**
* 获取当前用户的所有子机构
* 获取当前用户的所有子机构
*
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment