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
06de27ab
Commit
06de27ab
authored
Oct 11, 2019
by
yinyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FBA平台费为空读取历史数据
parent
e66e90f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
OrderSyncJob.java
...s-order/src/main/java/com/bailuntec/job/OrderSyncJob.java
+13
-1
No files found.
data-base/base-sync-oms-order/src/main/java/com/bailuntec/job/OrderSyncJob.java
View file @
06de27ab
...
...
@@ -139,7 +139,9 @@ public class OrderSyncJob extends PointJob {
//SKU总个数
dcBaseOmsOrder
.
setQuantityBailunSku
(
bailunSkuCumulative
.
getTotalQuantity
());
//计算每个SKU采购价占总采购价比重(用于摊分SKU售价之类) 以及 每个SKU重量价占总重量的比重
BigDecimal
omsOrderFBAFee
=
BigDecimal
.
valueOf
(
0
);
BigDecimal
omsOrderFBAFee
=
BigDecimal
.
ZERO
;
BigDecimal
totalCostPlatformFee
=
BigDecimal
.
ZERO
;
boolean
hasCostPlatformFee
=
true
;
dcBaseOmsOrder
.
setHasFbaFee
(
false
);
for
(
BailunSku
bailunSkuObj
:
omsResult
.
getBailunSku
())
{
BailunSkuStructure
bailunSkuStructure
=
new
BailunSkuStructure
();
...
...
@@ -204,6 +206,13 @@ public class OrderSyncJob extends PointJob {
dcBaseOmsSku
.
setCostFbaFee
(
FBAFee
==
null
?
BigDecimal
.
valueOf
(
0
)
:
FBAFee
);
omsOrderFBAFee
=
omsOrderFBAFee
.
add
(
dcBaseOmsSku
.
getCostFbaFee
());
}
if
((
dcBaseOmsOrder
.
getCostPlatformFee
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
&&
(
initTotalCost
.
compareTo
(
BigDecimal
.
valueOf
(
0
))
==
1
))
{
DcBaseOmsSkuMapper
dcBaseOmsSkuMapper
=
SessionUtil
.
getSession
().
getMapper
(
DcBaseOmsSkuMapper
.
class
);
BigDecimal
costPlatformFee
=
dcBaseOmsSkuMapper
.
selectCostPlatformFee
(
dcBaseOmsSku
.
getBailunSku
(),
dcBaseOmsSku
.
getWebsite
());
totalCostPlatformFee
=
totalCostPlatformFee
.
add
(
costPlatformFee
==
null
?
BigDecimal
.
ZERO
:
costPlatformFee
);
hasCostPlatformFee
=
false
;
}
//FBA的发货数不用从配货单信息拿, FBA只要下单亚马逊就发货
dcBaseOmsSku
.
setBailunSkuQuantityShipped
(
bailunSkuObj
.
getBailunSkuQuantityOrdered
());
checkFbaFee
(
dcBaseOmsSku
,
dcBaseOmsOrder
);
...
...
@@ -214,6 +223,9 @@ public class OrderSyncJob extends PointJob {
if
(!
dcBaseOmsOrder
.
getHasFbaFee
())
{
dcBaseOmsOrder
.
setCostFbaFee
(
omsOrderFBAFee
);
}
if
(!
hasCostPlatformFee
)
{
dcBaseOmsOrder
.
setCostPlatformFee
(
totalCostPlatformFee
);
}
/*
* 按规则计算百伦处理费
* 处理费算到订单维度
...
...
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