Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-java
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
bltdc
dc-java
Commits
916786f0
Commit
916786f0
authored
May 30, 2019
by
wutong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改同步采购流水为降序同步
parent
615d8c2b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
PurchaseDetailsServiceImpl.java
...in/java/com/bailuntec/job/PurchaseDetailsServiceImpl.java
+6
-6
No files found.
data-base/base-sync-purchase/src/main/java/com/bailuntec/job/PurchaseDetailsServiceImpl.java
View file @
916786f0
...
...
@@ -34,10 +34,8 @@ public class PurchaseDetailsServiceImpl {
map
.
put
(
"end"
,
DateTimeFormatter
.
ofPattern
(
CommonConstant
.
TIME_FORMAT
).
format
(
jobPointLog
.
getEndTime
()));
map
.
put
(
"type"
,
jobPointLog
.
getType
());
map
.
put
(
"pagesize"
,
jobPointLog
.
getPageSize
());
Integer
page
=
1
;
Integer
pagetotal
=
0
;
do
{
map
.
put
(
"page"
,
page
);
map
.
put
(
"page"
,
jobPointLog
.
getPageIndex
()
>
0
?
jobPointLog
.
getPageIndex
()
:
1
);
RequestBody
body
=
RequestBody
.
create
(
mediaType
,
JSON
.
toJSONString
(
map
));
String
purchaseStr
=
null
;
Response
response
=
null
;
...
...
@@ -59,7 +57,9 @@ public class PurchaseDetailsServiceImpl {
if
(
StringUtils
.
isNotBlank
(
purchaseStr
))
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
purchaseStr
);
if
(
jsonObject
!=
null
)
{
pagetotal
=
jsonObject
.
getInteger
(
"pagetotal"
);
if
(
jobPointLog
.
getPageIndex
()
==
0
)
{
jobPointLog
.
setPageIndex
(
jsonObject
.
getInteger
(
"pagetotal"
)
+
1
);
}
List
<
PurchaseDetailDTO
>
purchaseDetailDTOList
=
jsonObject
.
getObject
(
"data"
,
new
TypeReference
<
List
<
PurchaseDetailDTO
>>()
{
});
if
(
purchaseDetailDTOList
!=
null
&&
purchaseDetailDTOList
.
size
()
>
0
)
{
...
...
@@ -207,8 +207,8 @@ public class PurchaseDetailsServiceImpl {
}
else
{
throw
new
RuntimeException
(
"调用采购单sku流水接口失败"
);
}
page
++
;
}
while
(
page
<=
pagetotal
);
jobPointLog
.
setPageIndex
(
jobPointLog
.
getPageIndex
()
-
1
)
;
}
while
(
jobPointLog
.
getPageIndex
()
>
0
);
jobPointLog
.
setStartTime
(
jobPointLog
.
getEndTime
());
jobPointLog
.
setEndTime
(
jobPointLog
.
getStartTime
().
plusDays
(
jobPointLog
.
getIntervalTime
().
longValue
()).
isAfter
(
LocalDateTime
.
now
())
?
LocalDateTime
.
now
()
:
jobPointLog
.
getStartTime
().
plusDays
(
jobPointLog
.
getIntervalTime
().
longValue
()));
}
...
...
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