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
515da94d
Commit
515da94d
authored
Jun 04, 2021
by
linruibiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口编写
parent
199f3dbc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
InstrumentPanelInitServiceImpl.java
...lm/slmbi/service/impl/InstrumentPanelInitServiceImpl.java
+17
-9
No files found.
src/main/java/com/syc/slm/slmbi/service/impl/InstrumentPanelInitServiceImpl.java
View file @
515da94d
...
...
@@ -103,7 +103,15 @@ public class InstrumentPanelInitServiceImpl extends ServiceImpl<InstrumentPanelM
e
.
printStackTrace
();
throw
new
SysException
(
"仪表板配置详情解密异常"
);
}
configService
.
publish
(
appId
,
setConfig
(
one
,
appId
,
initPanelName1
,
config
));
InstrumentPanelTree
tree
=
treeService
.
getById
(
panelConfig
.
getPanelId
());
LambdaQueryWrapper
<
InstrumentPanelTree
>
where
=
new
LambdaQueryWrapper
<>();
where
.
eq
(
BaseEntity:
:
getRecordStatus
,
SlmConstants
.
DATA_VALID
);
where
.
likeRight
(
InstrumentPanelTree:
:
getFullId
,
tree
.
getFullId
()
+
"."
);
where
.
orderByAsc
(
InstrumentPanelTree:
:
getAssemblyKey
);
List
<
InstrumentPanelTree
>
panelTrees
=
treeService
.
list
(
where
);
configService
.
publish
(
appId
,
setConfig
(
one
,
appId
,
initPanelName1
,
config
,
panelTrees
));
}
...
...
@@ -122,13 +130,19 @@ public class InstrumentPanelInitServiceImpl extends ServiceImpl<InstrumentPanelM
e
.
printStackTrace
();
throw
new
SysException
(
"仪表板配置详情解密异常"
);
}
configService
.
publish
(
appId
,
setConfig
(
one
,
appId
,
initPanelName2
,
config
));
InstrumentPanelTree
tree
=
treeService
.
getById
(
panelConfig
.
getPanelId
());
LambdaQueryWrapper
<
InstrumentPanelTree
>
where
=
new
LambdaQueryWrapper
<>();
where
.
eq
(
BaseEntity:
:
getRecordStatus
,
SlmConstants
.
DATA_VALID
);
where
.
likeRight
(
InstrumentPanelTree:
:
getFullId
,
tree
.
getFullId
()
+
"."
);
where
.
orderByAsc
(
InstrumentPanelTree:
:
getAssemblyKey
);
List
<
InstrumentPanelTree
>
panelTrees
=
treeService
.
list
(
where
);
configService
.
publish
(
appId
,
setConfig
(
one
,
appId
,
initPanelName2
,
config
,
panelTrees
));
}
return
null
;
}
private
InstrumentPanelConfigDTO
setConfig
(
InstrumentPanelGroup
one
,
String
appId
,
String
panelName
,
String
panelConfig
){
private
InstrumentPanelConfigDTO
setConfig
(
InstrumentPanelGroup
one
,
String
appId
,
String
panelName
,
String
panelConfig
,
List
<
InstrumentPanelTree
>
panelTrees
){
SaveInstrumentPanelDTO
panelDto
=
new
SaveInstrumentPanelDTO
();
panelDto
.
setName
(
panelName
);
panelDto
.
setGroupId
(
one
.
getId
());
...
...
@@ -136,12 +150,6 @@ public class InstrumentPanelInitServiceImpl extends ServiceImpl<InstrumentPanelM
InstrumentPanel
instrumentPanel
=
baseMapper
.
selectById
(
panelId
);
InstrumentPanelConfigDTO
config
=
new
InstrumentPanelConfigDTO
();
List
<
InstrumentPanelAssemblyDTO
>
assemblys
=
Lists
.
newArrayList
();
InstrumentPanelTree
tree
=
treeService
.
getById
(
panelId
);
LambdaQueryWrapper
<
InstrumentPanelTree
>
where
=
new
LambdaQueryWrapper
<>();
where
.
eq
(
BaseEntity:
:
getRecordStatus
,
SlmConstants
.
DATA_VALID
);
where
.
likeRight
(
InstrumentPanelTree:
:
getFullId
,
tree
.
getFullId
()
+
"."
);
where
.
orderByAsc
(
InstrumentPanelTree:
:
getAssemblyKey
);
List
<
InstrumentPanelTree
>
panelTrees
=
treeService
.
list
(
where
);
panelTrees
.
forEach
(
x
->{
InstrumentPanelAssemblyDTO
dto
=
new
InstrumentPanelAssemblyDTO
();
dto
.
setName
(
x
.
getName
());
...
...
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