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
a8f63e36
Commit
a8f63e36
authored
May 27, 2020
by
yinyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WMS物流费用接口数据对接
parent
2dc8ab0c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
WmsLogisticsJob.java
...-wms/src/main/java/com/bailuntec/job/WmsLogisticsJob.java
+10
-9
No files found.
data-base/base-sync-stock-wms/src/main/java/com/bailuntec/job/WmsLogisticsJob.java
View file @
a8f63e36
...
@@ -23,6 +23,7 @@ import org.apache.commons.beanutils.BeanUtils;
...
@@ -23,6 +23,7 @@ import org.apache.commons.beanutils.BeanUtils;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.math.RoundingMode
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.List
;
import
java.util.List
;
...
@@ -61,7 +62,7 @@ public class WmsLogisticsJob extends PointJob {
...
@@ -61,7 +62,7 @@ public class WmsLogisticsJob extends PointJob {
}
}
if
(
StringUtils
.
isNotBlank
(
resultStr
))
{
if
(
StringUtils
.
isNotBlank
(
resultStr
))
{
WmsLogisticsInfo
wmsLogisticsInfo
=
JSON
.
parseObject
(
resultStr
,
WmsLogisticsInfo
.
class
);
WmsLogisticsInfo
wmsLogisticsInfo
=
JSON
.
parseObject
(
resultStr
,
WmsLogisticsInfo
.
class
);
if
(
wmsLogisticsInfo
.
getSuccess
()
!=
null
&&
wmsLogisticsInfo
.
getSuccess
())
{
if
(
wmsLogisticsInfo
.
getSuccess
()
!=
null
&&
wmsLogisticsInfo
.
getSuccess
())
{
WmsLogisticsInfo
.
Result
result
=
wmsLogisticsInfo
.
getResult
();
WmsLogisticsInfo
.
Result
result
=
wmsLogisticsInfo
.
getResult
();
List
<
WmsLogisticsInfo
.
Result
.
LogisticsInner
>
items
=
result
.
getResult
();
List
<
WmsLogisticsInfo
.
Result
.
LogisticsInner
>
items
=
result
.
getResult
();
if
(
jobPointLog
.
getPageIndex
().
equals
(
0
))
{
if
(
jobPointLog
.
getPageIndex
().
equals
(
0
))
{
...
@@ -75,14 +76,14 @@ public class WmsLogisticsJob extends PointJob {
...
@@ -75,14 +76,14 @@ public class WmsLogisticsJob extends PointJob {
items
.
forEach
(
wmsStockItem
->
{
items
.
forEach
(
wmsStockItem
->
{
try
{
try
{
BeanUtils
.
copyProperties
(
dcBaseLogistics
,
wmsStockItem
);
BeanUtils
.
copyProperties
(
dcBaseLogistics
,
wmsStockItem
);
dcBaseLogistics
.
setMerchantOutputWeightKg
(
dcBaseLogistics
.
getMerchantOutputWeightKg
().
setScale
(
4
,
RoundingMode
.
HALF_EVEN
));
dcBaseLogistics
.
setMerchantOutputWeightKg
(
dcBaseLogistics
.
getMerchantOutputWeightKg
()
==
null
?
BigDecimal
.
ZERO
:
dcBaseLogistics
.
getMerchantOutputWeightKg
()
.
setScale
(
4
,
RoundingMode
.
HALF_EVEN
));
dcBaseLogistics
.
setMerchantShipmentCostCny
(
dcBaseLogistics
.
getMerchantShipmentCostCny
().
setScale
(
4
,
RoundingMode
.
HALF_EVEN
));
dcBaseLogistics
.
setMerchantShipmentCostCny
(
dcBaseLogistics
.
getMerchantShipmentCostCny
()
==
null
?
BigDecimal
.
ZERO
:
dcBaseLogistics
.
getMerchantShipmentCostCny
()
.
setScale
(
4
,
RoundingMode
.
HALF_EVEN
));
dcBaseLogistics
.
setOutputWeightKg
(
dcBaseLogistics
.
getOutputWeightKg
().
setScale
(
4
,
RoundingMode
.
HALF_EVEN
));
dcBaseLogistics
.
setOutputWeightKg
(
dcBaseLogistics
.
getOutputWeightKg
()
==
null
?
BigDecimal
.
ZERO
:
dcBaseLogistics
.
getOutputWeightKg
()
.
setScale
(
4
,
RoundingMode
.
HALF_EVEN
));
dcBaseLogistics
.
setBailunShipmentCostCny
(
dcBaseLogistics
.
getBailunShipmentCostCny
().
setScale
(
4
,
RoundingMode
.
HALF_EVEN
));
dcBaseLogistics
.
setBailunShipmentCostCny
(
dcBaseLogistics
.
getBailunShipmentCostCny
()
==
null
?
BigDecimal
.
ZERO
:
dcBaseLogistics
.
getBailunShipmentCostCny
()
.
setScale
(
4
,
RoundingMode
.
HALF_EVEN
));
dcBaseLogistics
.
setMerchantOutputWeightKgOriginal
(
dcBaseLogistics
.
getMerchantOutputWeightKgOriginal
().
setScale
(
4
,
RoundingMode
.
HALF_EVEN
));
dcBaseLogistics
.
setMerchantOutputWeightKgOriginal
(
dcBaseLogistics
.
getMerchantOutputWeightKgOriginal
()
==
null
?
BigDecimal
.
ZERO
:
dcBaseLogistics
.
getMerchantOutputWeightKgOriginal
()
.
setScale
(
4
,
RoundingMode
.
HALF_EVEN
));
dcBaseLogistics
.
setMerchantShipmentCostSnyOriginal
(
dcBaseLogistics
.
getMerchantShipmentCostSnyOriginal
().
setScale
(
4
,
RoundingMode
.
HALF_EVEN
));
dcBaseLogistics
.
setMerchantShipmentCostSnyOriginal
(
dcBaseLogistics
.
getMerchantShipmentCostSnyOriginal
()
==
null
?
BigDecimal
.
ZERO
:
dcBaseLogistics
.
getMerchantShipmentCostSnyOriginal
()
.
setScale
(
4
,
RoundingMode
.
HALF_EVEN
));
dcBaseLogistics
.
setCostDiffDecimal
(
dcBaseLogistics
.
getCostDiffDecimal
().
setScale
(
4
,
RoundingMode
.
HALF_EVEN
));
dcBaseLogistics
.
setCostDiffDecimal
(
dcBaseLogistics
.
getCostDiffDecimal
()
==
null
?
BigDecimal
.
ZERO
:
dcBaseLogistics
.
getCostDiffDecimal
()
.
setScale
(
4
,
RoundingMode
.
HALF_EVEN
));
dcBaseLogistics
.
setWeightDiffDecimal
(
dcBaseLogistics
.
getWeightDiffDecimal
().
setScale
(
4
,
RoundingMode
.
HALF_EVEN
));
dcBaseLogistics
.
setWeightDiffDecimal
(
dcBaseLogistics
.
getWeightDiffDecimal
()
==
null
?
BigDecimal
.
ZERO
:
dcBaseLogistics
.
getWeightDiffDecimal
()
.
setScale
(
4
,
RoundingMode
.
HALF_EVEN
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
"WMS物流BeanUtils.copyProperties失败"
);
throw
new
RuntimeException
(
"WMS物流BeanUtils.copyProperties失败"
);
...
...
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