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
huluobin
dc-java
Commits
c166ae9e
Commit
c166ae9e
authored
Apr 03, 2019
by
wutong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单SKU维度利润只到单SKU.
parent
bfc4c773
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
OrderSyncJob.java
...s-order/src/main/java/com/bailuntec/job/OrderSyncJob.java
+3
-2
No files found.
data-base/base-sync-oms-order/src/main/java/com/bailuntec/job/OrderSyncJob.java
View file @
c166ae9e
...
@@ -335,10 +335,11 @@ public class OrderSyncJob extends PointJob {
...
@@ -335,10 +335,11 @@ public class OrderSyncJob extends PointJob {
dcBaseOmsSku
.
setCostTotal
(
rmbCost
);
dcBaseOmsSku
.
setCostTotal
(
rmbCost
);
//利润都转为人民币计算
//利润都转为人民币计算
BigDecimal
unitSkuProfit
=
unitSkuAmountSalesRMB
.
subtract
(
dcBaseOmsSku
.
getCostTotal
());
BigDecimal
unitSkuProfit
=
unitSkuAmountSalesRMB
.
subtract
(
dcBaseOmsSku
.
getCostTotal
());
//只有发货的SKU才去算利润
//只有发货的SKU才去算
订单维度
利润
BigDecimal
skuShippedProfit
=
unitSkuProfit
.
multiply
(
BigDecimal
.
valueOf
(
dcBaseOmsSku
.
getBailunSkuQuantityShipped
()));
BigDecimal
skuShippedProfit
=
unitSkuProfit
.
multiply
(
BigDecimal
.
valueOf
(
dcBaseOmsSku
.
getBailunSkuQuantityShipped
()));
totalProfit
=
totalProfit
.
add
(
skuShippedProfit
);
totalProfit
=
totalProfit
.
add
(
skuShippedProfit
);
dcBaseOmsSku
.
setProfitTotal
(
skuShippedProfit
);
//SKU只放单个利润
dcBaseOmsSku
.
setProfitTotal
(
unitSkuProfit
);
if
(
skuAmountSalesRMB
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
if
(
skuAmountSalesRMB
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
dcBaseOmsSku
.
setProfitRate
(
BigDecimal
.
ZERO
);
dcBaseOmsSku
.
setProfitRate
(
BigDecimal
.
ZERO
);
}
else
{
}
else
{
...
...
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