Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
slm-bi
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
林锐标
slm-bi
Commits
0cb0f7de
Commit
0cb0f7de
authored
Apr 28, 2021
by
梁光意
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改查询仪表盘树接口
parent
f9ac13d6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
InstrumentPanelTreeServiceImpl.java
...lm/slmbi/service/impl/InstrumentPanelTreeServiceImpl.java
+4
-2
CustomPermissionVo.java
src/main/java/com/syc/slm/slmbi/vo/CustomPermissionVo.java
+1
-1
InstrumentPanelDraftMapper.xml
...sources/mapper/mysql/panel/InstrumentPanelDraftMapper.xml
+6
-4
No files found.
src/main/java/com/syc/slm/slmbi/service/impl/InstrumentPanelTreeServiceImpl.java
View file @
0cb0f7de
...
@@ -210,6 +210,8 @@ public class InstrumentPanelTreeServiceImpl extends ServiceImpl<InstrumentPanelT
...
@@ -210,6 +210,8 @@ public class InstrumentPanelTreeServiceImpl extends ServiceImpl<InstrumentPanelT
if
(
CollectionUtils
.
isNotEmpty
(
trees
))
{
if
(
CollectionUtils
.
isNotEmpty
(
trees
))
{
Set
<
String
>
panelIds
=
trees
.
stream
().
map
(
BaseEntity:
:
getId
).
collect
(
Collectors
.
toSet
());
Set
<
String
>
panelIds
=
trees
.
stream
().
map
(
BaseEntity:
:
getId
).
collect
(
Collectors
.
toSet
());
List
<
InstrumentPanelDraft
>
panels
=
draftService
.
selectDraftList
(
appId
,
panelIds
,
officeIds
,
userId
,
roleId
);
List
<
InstrumentPanelDraft
>
panels
=
draftService
.
selectDraftList
(
appId
,
panelIds
,
officeIds
,
userId
,
roleId
);
if
(
CollectionUtils
.
isNotEmpty
(
panels
))
{
if
(
CollectionUtils
.
isNotEmpty
(
panels
))
{
Set
<
String
>
publishIds
=
panels
.
stream
().
map
(
InstrumentPanelDraft:
:
getPanelId
).
collect
(
Collectors
.
toSet
());
Set
<
String
>
publishIds
=
panels
.
stream
().
map
(
InstrumentPanelDraft:
:
getPanelId
).
collect
(
Collectors
.
toSet
());
Set
<
String
[]>
finalPanelArrays
=
trees
.
stream
()
Set
<
String
[]>
finalPanelArrays
=
trees
.
stream
()
...
@@ -218,9 +220,9 @@ public class InstrumentPanelTreeServiceImpl extends ServiceImpl<InstrumentPanelT
...
@@ -218,9 +220,9 @@ public class InstrumentPanelTreeServiceImpl extends ServiceImpl<InstrumentPanelT
.
collect
(
Collectors
.
toSet
());
.
collect
(
Collectors
.
toSet
());
Set
<
String
>
finalPanelIds
=
Sets
.
newHashSet
();
Set
<
String
>
finalPanelIds
=
Sets
.
newHashSet
();
finalPanelArrays
.
forEach
(
x
->
{
finalPanelArrays
.
forEach
(
x
->
{
if
(
x
.
length
>
3
)
{
if
(
x
.
length
>
=
3
)
{
for
(
int
i
=
0
;
i
<
x
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
x
.
length
;
i
++)
{
if
(
i
==
2
)
{
if
(
i
==
3
)
{
break
;
break
;
}
}
finalPanelIds
.
add
(
x
[
i
]);
finalPanelIds
.
add
(
x
[
i
]);
...
...
src/main/java/com/syc/slm/slmbi/vo/CustomPermissionVo.java
View file @
0cb0f7de
...
@@ -15,7 +15,7 @@ import lombok.Data;
...
@@ -15,7 +15,7 @@ import lombok.Data;
public
class
CustomPermissionVo
{
public
class
CustomPermissionVo
{
@ApiModelProperty
(
value
=
"自定义权限类型"
,
required
=
true
)
@ApiModelProperty
(
value
=
"自定义权限类型"
,
required
=
true
)
private
String
t
ype
;
private
String
bizT
ype
;
@ApiModelProperty
(
value
=
"代表岗位、部门或个体用户id"
,
required
=
true
)
@ApiModelProperty
(
value
=
"代表岗位、部门或个体用户id"
,
required
=
true
)
private
String
bizId
;
private
String
bizId
;
...
...
src/main/resources/mapper/mysql/panel/InstrumentPanelDraftMapper.xml
View file @
0cb0f7de
...
@@ -42,14 +42,16 @@
...
@@ -42,14 +42,16 @@
</if>
</if>
and access_permission='private' and record_status=1 and IFNULL(updater,creator)=#{userId}
and access_permission='private' and record_status=1 and IFNULL(updater,creator)=#{userId}
union ALL
union ALL
select * from instrument_panel_draft where panel_id in
select * from instrument_panel_draft where
access_permission='custom'
and record_status=1
<if
test=
"panelIds!=null"
>
<if
test=
"panelIds!=null"
>
and
(
(
<foreach
collection=
"panelIds"
item=
"id"
separator=
",
"
>
<foreach
collection=
"panelIds"
item=
"id"
separator=
"or
"
>
#{id}
(panel_id = #{id} and check_panel_permissions(#{appId},#{id},#{officeIds},#{userId},#{roleId})>0)
</foreach>
</foreach>
)
)
</if>
</if>
and access_permission='custom' and record_status=1 and check_panel_permissions(#{appId},id,#{officeIds},#{userId},#{roleId})>0
</select>
</select>
</mapper>
</mapper>
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