Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
ms-data-circulation-portal-service
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
dbc107bc
authored
2025-02-12 09:54:24 +0800
by
肖初晴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
【DAOP-1.0】数据需求
【功能点】联调问题处理
1 parent
c5b9143d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
27 deletions
src/main/java/com/csbr/qingcloud/portal/service/impl/DemandServiceImpl.java
src/main/java/com/csbr/qingcloud/portal/service/impl/DemandServiceImpl.java
View file @
dbc107b
...
...
@@ -121,8 +121,19 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService
if
(
entity
==
null
)
{
throw
new
CsbrSystemException
(
SystemError
.
DATA_NOT_EXISTS
,
messageSourceUtil
.
notExistsToSelectMessage
(
String
.
format
(
"获取%s详情数据"
,
FUNCTION_NAME
)));
}
Map
<
String
,
DemandUpdateStateVO
>
map
=
dataProcessBasicFeign
.
getOrderState
(
Collections
.
singletonList
(
entity
.
getProcessCompanyGuid
())).
getData
();
return
convertToVO
(
entity
,
map
);
return
convertToVO
(
entity
,
getStateMap
(
Collections
.
singletonList
(
entity
.
getProcessCompanyGuid
())));
}
private
Map
<
String
,
DemandUpdateStateVO
>
getStateMap
(
List
<
String
>
guids
){
if
(
CollectionUtils
.
isEmpty
(
guids
)){
return
null
;
}
guids
=
guids
.
stream
().
filter
(
Objects:
:
nonNull
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
guids
)){
return
null
;
}
Map
<
String
,
DemandUpdateStateVO
>
map
=
dataProcessBasicFeign
.
getOrderState
(
guids
).
getData
();
return
map
;
}
/**
...
...
@@ -314,8 +325,7 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService
if
(
CollectionUtils
.
isEmpty
(
list
)){
return
null
;
}
Map
<
String
,
DemandUpdateStateVO
>
map
=
dataProcessBasicFeign
.
getOrderState
(
Collections
.
singletonList
(
list
.
get
(
0
).
getProcessCompanyGuid
())).
getData
();
return
convertToVO
(
list
.
get
(
0
),
map
);
return
convertToVO
(
list
.
get
(
0
),
getStateMap
(
Collections
.
singletonList
(
list
.
get
(
0
).
getProcessCompanyGuid
())));
}
@Override
...
...
@@ -544,10 +554,9 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService
// 需要特殊处理数据时使用
if
(
CollectionUtils
.
isNotEmpty
(
pageList
.
getRecords
())){
List
<
String
>
guids
=
pageList
.
getRecords
().
stream
().
map
(
MfDemand:
:
getProcessCompanyGuid
).
collect
(
Collectors
.
toList
());
Map
<
String
,
DemandUpdateStateVO
>
map
=
dataProcessBasicFeign
.
getOrderState
(
guids
).
getData
();
List
<
DemandRSVO
>
results
=
new
ArrayList
<>();
for
(
MfDemand
item
:
pageList
.
getRecords
()){
DemandRSVO
vo
=
convertToVO
(
item
,
map
);
DemandRSVO
vo
=
convertToVO
(
item
,
getStateMap
(
guids
)
);
results
.
add
(
vo
);
}
rsPageList
.
setRecords
(
results
);
...
...
@@ -557,27 +566,6 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService
//region 辅助操作
/**
* 数据需求实体数据转换为视图对象数据(多个)
* @author xcq
* @date 2024-12-31 18:46
* @param entityList 实体数据列表
* @return java.util.List<com.csbr.qingcloud.portal.domain.vo.DemandRSVO> 视图对象列表
*/
private
List
<
DemandRSVO
>
convertToVO
(
List
<
MfDemand
>
entityList
)
{
if
(
CollectionUtils
.
isEmpty
(
entityList
))
{
// W00012 = {0}:参数[{1}]不能为空!
throw
new
CsbrSystemException
(
SystemError
.
DATA_INPUT_ERROR
,
messageSourceUtil
.
getMessage
(
"W00012"
,
"实体数据转换为视图对象实体数据"
,
"实体数据"
));
}
List
<
DemandRSVO
>
voList
=
new
ArrayList
<>(
entityList
.
size
());
for
(
MfDemand
item
:
entityList
)
{
DemandRSVO
vo
=
convertToVO
(
item
,
null
);
voList
.
add
(
vo
);
}
return
voList
;
}
/**
* 数据需求实体数据转换为视图对象数据
* @author xcq
* @date 2024-12-31 18:46
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment