Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
operation-control-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王锦盛
operation-control-platform
Commits
5fe2353c
Commit
5fe2353c
authored
Mar 25, 2022
by
胡秀武
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
胡秀武:模型列表bug解决
parent
25c925a5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
src/main/java/com/pms/ocp/controller/ModelBaseController.java
...main/java/com/pms/ocp/controller/ModelBaseController.java
+1
-1
src/main/java/com/pms/ocp/service/impl/ModelSubscribeServiceImpl.java
...a/com/pms/ocp/service/impl/ModelSubscribeServiceImpl.java
+11
-6
No files found.
src/main/java/com/pms/ocp/controller/ModelBaseController.java
View file @
5fe2353c
...
@@ -94,7 +94,7 @@ public class ModelBaseController {
...
@@ -94,7 +94,7 @@ public class ModelBaseController {
*/
*/
@ApiOperation
(
"模型-查询列表"
)
@ApiOperation
(
"模型-查询列表"
)
@GetMapping
(
"/get/model/getModeBaselList"
)
@GetMapping
(
"/get/model/getModeBaselList"
)
public
ResponseVO
getModeBaselList
(
@ApiParam
(
value
=
"所属级别"
)
@RequestParam
(
value
=
"belongLevel"
,
required
=
false
)
String
belongLevel
,
public
ResponseVO
getModeBaselList
(
@ApiParam
(
value
=
"所属级别"
)
@RequestParam
(
value
=
"belongLevel"
,
defaultValue
=
"0"
)
String
belongLevel
,
@ApiParam
(
value
=
"模型编码"
)
@RequestParam
(
value
=
"modelCode"
,
required
=
false
)
String
modelCode
,
@ApiParam
(
value
=
"模型编码"
)
@RequestParam
(
value
=
"modelCode"
,
required
=
false
)
String
modelCode
,
@ApiParam
(
value
=
"当前页"
)
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@ApiParam
(
value
=
"当前页"
)
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@ApiParam
(
value
=
"每页数量"
)
@RequestParam
(
value
=
"pageSize"
)
Integer
pageSize
,
@ApiParam
(
value
=
"每页数量"
)
@RequestParam
(
value
=
"pageSize"
)
Integer
pageSize
,
...
...
src/main/java/com/pms/ocp/service/impl/ModelSubscribeServiceImpl.java
View file @
5fe2353c
...
@@ -119,13 +119,18 @@ public class ModelSubscribeServiceImpl implements ModelSubscribeService {
...
@@ -119,13 +119,18 @@ public class ModelSubscribeServiceImpl implements ModelSubscribeService {
return
ResponseVO
.
ok
(
result
);
return
ResponseVO
.
ok
(
result
);
}
}
/**
* 合并list设置子类
* @param modelGroupList
* @param organList
* @param function
* @return
*/
private
List
<
TreeNode
>
setChildren
(
List
<
TreeNode
>
modelGroupList
,
List
<
TreeNode
>
organList
,
BiFunction
<
TreeNode
,
TreeNode
,
Boolean
>
function
)
{
private
List
<
TreeNode
>
setChildren
(
List
<
TreeNode
>
modelGroupList
,
List
<
TreeNode
>
organList
,
BiFunction
<
TreeNode
,
TreeNode
,
Boolean
>
function
)
{
organList
.
forEach
(
org
organList
.
forEach
(
org
->
{
->{
modelGroupList
.
forEach
(
group
->
{
modelGroupList
.
forEach
(
group
->{
if
(
function
.
apply
(
org
,
group
))
{
//org.getCompanyCode().equals(group.getCompanyCode()
if
(
org
.
getChildren
()
==
null
)
{
if
(
function
.
apply
(
org
,
group
)){
if
(
org
.
getChildren
()
==
null
){
org
.
setChildren
(
new
LinkedList
<>());
org
.
setChildren
(
new
LinkedList
<>());
}
}
org
.
getChildren
().
add
(
group
);
org
.
getChildren
().
add
(
group
);
...
...
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