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
c5b9143d
authored
2025-02-11 16:00:44 +0800
by
肖初晴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
【DAOP-1.0】数据需求
【功能点】联调问题处理
1 parent
2818aed6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
15 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 @
c5b9143
...
...
@@ -121,7 +121,8 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService
if
(
entity
==
null
)
{
throw
new
CsbrSystemException
(
SystemError
.
DATA_NOT_EXISTS
,
messageSourceUtil
.
notExistsToSelectMessage
(
String
.
format
(
"获取%s详情数据"
,
FUNCTION_NAME
)));
}
return
convertToVO
(
entity
);
Map
<
String
,
DemandUpdateStateVO
>
map
=
dataProcessBasicFeign
.
getOrderState
(
Collections
.
singletonList
(
entity
.
getProcessCompanyGuid
())).
getData
();
return
convertToVO
(
entity
,
map
);
}
/**
...
...
@@ -313,7 +314,8 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService
if
(
CollectionUtils
.
isEmpty
(
list
)){
return
null
;
}
return
convertToVO
(
list
.
get
(
0
));
Map
<
String
,
DemandUpdateStateVO
>
map
=
dataProcessBasicFeign
.
getOrderState
(
Collections
.
singletonList
(
list
.
get
(
0
).
getProcessCompanyGuid
())).
getData
();
return
convertToVO
(
list
.
get
(
0
),
map
);
}
@Override
...
...
@@ -539,23 +541,13 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService
* @return void
*/
private
void
afterQuery
(
PageListVO
<
MfDemand
>
pageList
,
PageListVO
<
DemandRSVO
>
rsPageList
)
{
if
(
CollectionUtils
.
isNotEmpty
(
pageList
.
getRecords
()))
{
rsPageList
.
setRecords
(
convertToVO
(
pageList
.
getRecords
()));
}
// 需要特殊处理数据时使用
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
);
DemandUpdateStateVO
voState
=
map
.
get
(
item
.
getProcessCompanyGuid
());
if
(
voState
!=
null
){
vo
.
setResourceAcquisitionState
(
voState
.
getResourceAcquisitionState
());
vo
.
setProductProcessingState
(
voState
.
getProductProcessingState
());
vo
.
setProductDeliveryState
(
voState
.
getProductDeliveryState
());
vo
.
setProductAcceptState
(
voState
.
getProductAcceptState
());
}
DemandRSVO
vo
=
convertToVO
(
item
,
map
);
results
.
add
(
vo
);
}
rsPageList
.
setRecords
(
results
);
...
...
@@ -579,7 +571,7 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService
}
List
<
DemandRSVO
>
voList
=
new
ArrayList
<>(
entityList
.
size
());
for
(
MfDemand
item
:
entityList
)
{
DemandRSVO
vo
=
convertToVO
(
item
);
DemandRSVO
vo
=
convertToVO
(
item
,
null
);
voList
.
add
(
vo
);
}
return
voList
;
...
...
@@ -592,10 +584,19 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService
* @param entity
* @return com.csbr.qingcloud.portal.domain.vo.DemandRSVO
*/
private
DemandRSVO
convertToVO
(
MfDemand
entity
)
{
private
DemandRSVO
convertToVO
(
MfDemand
entity
,
Map
<
String
,
DemandUpdateStateVO
>
map
)
{
DemandRSVO
vo
=
csbrBeanUtil
.
convert
(
entity
,
DemandRSVO
.
class
);
//流程数据处理
vo
.
setApproveVO
(
approvalFlowUtil
.
getApprovalInfo
(
entity
.
getGuid
()));
if
(
map
!=
null
){
DemandUpdateStateVO
voState
=
map
.
get
(
entity
.
getProcessCompanyGuid
());
if
(
voState
!=
null
){
vo
.
setResourceAcquisitionState
(
voState
.
getResourceAcquisitionState
());
vo
.
setProductProcessingState
(
voState
.
getProductProcessingState
());
vo
.
setProductDeliveryState
(
voState
.
getProductDeliveryState
());
vo
.
setProductAcceptState
(
voState
.
getProductAcceptState
());
}
}
return
vo
;
}
...
...
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