Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dcs-plan
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
INET-TWO
server
dcs-plan
Commits
ff8c0826
Commit
ff8c0826
authored
Sep 22, 2024
by
wei
🎱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预警分页
parent
a1d4936a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
+14
-9
ExtSupplierManageService.java
...yonde/dcs/plan/core/service/ExtSupplierManageService.java
+2
-1
ExtSupplierManageServiceImpl.java
.../plan/core/service/impl/ExtSupplierManageServiceImpl.java
+12
-8
No files found.
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/ExtSupplierManageService.java
View file @
ff8c0826
...
...
@@ -4,6 +4,7 @@ import com.yonde.dcs.plan.common.vo.ExtSupplierManageVO;
import
com.yonde.dcs.plan.common.vo.SupplierEarlyWarningVO
;
import
com.yonde.dcs.plan.core.service.shadow.ExtSupplierManageServiceShadow
;
import
com.yonde.dex.basedata.data.search.SearchQueryCondition
;
import
com.yonde.dex.basedata.entity.data.DxPageImpl
;
import
java.util.List
;
...
...
@@ -17,7 +18,7 @@ public interface ExtSupplierManageService<V extends ExtSupplierManageVO> extends
ExtSupplierManageVO
startWorkflow
(
Long
id
);
List
<
SupplierEarlyWarningVO
>
earlyWarning
(
SearchQueryCondition
searchQueryCondition
,
int
warningDay
);
DxPageImpl
earlyWarning
(
SearchQueryCondition
searchQueryCondition
,
int
warningDay
);
List
<
SupplierEarlyWarningVO
>
exportEarlyWarningData
(
SearchQueryCondition
searchQueryCondition
,
int
warningDay
);
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtSupplierManageServiceImpl.java
View file @
ff8c0826
...
...
@@ -11,6 +11,7 @@ import com.yonde.dcs.plan.core.service.ExtSupplierManageService;
import
com.yonde.dcs.plan.entity.po.ExtSupplierManage
;
import
com.yonde.dex.basedata.data.search.SearchItem
;
import
com.yonde.dex.basedata.data.search.SearchQueryCondition
;
import
com.yonde.dex.basedata.entity.data.DxPageImpl
;
import
com.yonde.dex.basedata.exception.DxBusinessException
;
import
com.yonde.dex.wfc.feign.api.WfcProcessFeign
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -55,21 +56,24 @@ public class ExtSupplierManageServiceImpl<V extends ExtSupplierManageVO> impleme
}
@Override
public
List
<
SupplierEarlyWarningVO
>
earlyWarning
(
SearchQueryCondition
searchQueryCondition
,
int
warningDay
)
{
public
DxPageImpl
earlyWarning
(
SearchQueryCondition
searchQueryCondition
,
int
warningDay
)
{
List
<
SupplierEarlyWarningVO
>
list
=
Lists
.
newArrayList
();
LocalDate
warningDate
=
LocalDate
.
now
().
minusDays
(
warningDay
);
List
<
ExtSupplierManageLinkVO
>
extSupplierManageLinkVOS
=
this
.
recursionSupplierManageLinks
(
searchQueryCondition
,
warningDate
.
toString
());
for
(
ExtSupplierManageLinkVO
extSupplierManageLinkVO
:
extSupplierManageLinkVOS
)
{
DxPageImpl
dxPage
=
this
.
recursionSupplierManageLinks
(
searchQueryCondition
,
warningDate
.
toString
());
List
<
ExtSupplierManageLinkVO
>
content
=
dxPage
.
getContent
();
for
(
ExtSupplierManageLinkVO
extSupplierManageLinkVO
:
content
)
{
ExtSupplierManageVO
source
=
extSupplierManageLinkVO
.
getSource
();
ExtQualificationsVO
target
=
extSupplierManageLinkVO
.
getTarget
();
list
.
add
(
this
.
buildSupplierEarlyWarningVO
(
source
,
target
));
}
return
list
;
dxPage
.
setContent
(
list
);
return
dxPage
;
}
@Override
public
List
<
SupplierEarlyWarningVO
>
exportEarlyWarningData
(
SearchQueryCondition
searchQueryCondition
,
int
warningDay
)
{
return
earlyWarning
(
searchQueryCondition
,
warningDay
);
DxPageImpl
dxPage
=
this
.
earlyWarning
(
searchQueryCondition
,
warningDay
);
return
dxPage
.
getContent
();
}
private
SupplierEarlyWarningVO
buildSupplierEarlyWarningVO
(
ExtSupplierManageVO
source
,
ExtQualificationsVO
target
)
{
...
...
@@ -82,7 +86,7 @@ public class ExtSupplierManageServiceImpl<V extends ExtSupplierManageVO> impleme
return
supplierEarlyWarningVO
;
}
private
List
<
ExtSupplierManageLinkVO
>
recursionSupplierManageLinks
(
SearchQueryCondition
searchQueryCondition
,
String
warningDate
)
{
private
DxPageImpl
recursionSupplierManageLinks
(
SearchQueryCondition
searchQueryCondition
,
String
warningDate
)
{
/*SearchQueryCondition condition = SearchQueryCondition.builder().searchItems(
SearchItems.of(
SearchItems.BooleanOperator.AND,
...
...
@@ -93,8 +97,8 @@ public class ExtSupplierManageServiceImpl<V extends ExtSupplierManageVO> impleme
SearchItem
searchItem
=
new
SearchItem
(
"target.certificateTime"
,
SearchItem
.
Operator
.
GT
,
warningDate
);
searchQueryCondition
.
getSearchItems
().
getItems
().
add
(
searchItem
);
List
<
ExtSupplierManageLinkVO
>
content
=
extSupplierManageLinkService
.
findRecursion
(
searchQueryCondition
).
getContent
(
);
return
content
;
DxPageImpl
recursion
=
extSupplierManageLinkService
.
findRecursion
(
searchQueryCondition
);
return
recursion
;
}
}
...
...
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