Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-webapp-plug
Overview
Overview
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
base_platform_enterprise
gic-webapp-plug
Commits
87784320
Commit
87784320
authored
Jan 28, 2021
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码结构调整
parent
32c312c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
ScreeningController.java
...java/com/gic/plug/web/controller/ScreeningController.java
+17
-0
No files found.
src/main/java/com/gic/plug/web/controller/ScreeningController.java
View file @
87784320
...
...
@@ -110,6 +110,13 @@ public class ScreeningController {
public
RestResponse
getScreeningData
(
String
widgetChainId
)
{
List
<
EsScreeningChainDetailDTO
>
list
=
this
.
esScreeningInitService
.
queryEsScreeningByParentChainId
(
widgetChainId
);
list
=
list
.
stream
().
peek
(
item
->
{
if
(
StringUtils
.
isNotBlank
(
item
.
getWidget
().
getWidgetValues
()))
{
List
<
WidgetValuesOldVO
>
oldVOS
=
JSONObject
.
parseArray
(
item
.
getWidget
().
getWidgetValues
(),
WidgetValuesOldVO
.
class
);
List
<
WidgetValuesNewVO
>
newVOList
=
oldVOS
.
stream
().
map
(
data
->
new
WidgetValuesNewVO
(
data
.
getKey
(),
data
.
getValue
(),
data
.
getName
())).
collect
(
Collectors
.
toList
());
item
.
getWidget
().
setWidgetValues
(
JSON
.
toJSONString
(
newVOList
));
}
}).
collect
(
Collectors
.
toList
());
return
RestResponse
.
success
(
list
);
}
...
...
@@ -117,6 +124,11 @@ public class ScreeningController {
@ResponseBody
public
RestResponse
getScreeningChainDetail
(
String
parentChainId
,
String
widgetFieldKey
)
{
EsScreeningChainDetailDTO
dto
=
this
.
esScreeningInitService
.
findChainDetail
(
parentChainId
,
widgetFieldKey
);
if
(
StringUtils
.
isNotBlank
(
dto
.
getWidget
().
getWidgetValues
()))
{
List
<
WidgetValuesOldVO
>
oldVOS
=
JSONObject
.
parseArray
(
dto
.
getWidget
().
getWidgetValues
(),
WidgetValuesOldVO
.
class
);
List
<
WidgetValuesNewVO
>
newVOList
=
oldVOS
.
stream
().
map
(
data
->
new
WidgetValuesNewVO
(
data
.
getKey
(),
data
.
getValue
(),
data
.
getName
())).
collect
(
Collectors
.
toList
());
dto
.
getWidget
().
setWidgetValues
(
JSON
.
toJSONString
(
newVOList
));
}
return
RestResponse
.
success
(
dto
);
}
...
...
@@ -125,6 +137,11 @@ public class ScreeningController {
@ResponseBody
public
Object
getScreeningWidgetDetail
(
String
widgetChainId
)
{
EsScreeningChainDetailDTO
dto
=
this
.
esScreeningInitService
.
findChainDetail
(
widgetChainId
);
if
(
StringUtils
.
isNotBlank
(
dto
.
getWidget
().
getWidgetValues
()))
{
List
<
WidgetValuesOldVO
>
oldVOS
=
JSONObject
.
parseArray
(
dto
.
getWidget
().
getWidgetValues
(),
WidgetValuesOldVO
.
class
);
List
<
WidgetValuesNewVO
>
newVOList
=
oldVOS
.
stream
().
map
(
data
->
new
WidgetValuesNewVO
(
data
.
getKey
(),
data
.
getValue
(),
data
.
getName
())).
collect
(
Collectors
.
toList
());
dto
.
getWidget
().
setWidgetValues
(
JSON
.
toJSONString
(
newVOList
));
}
return
RestResponse
.
success
(
dto
);
}
}
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