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
1e6a90f5
Commit
1e6a90f5
authored
Apr 19, 2019
by
wutong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
跳过头程流水SKU不存在的问题.
parent
78f4ebd0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
CalculateCostFirstJob.java
...rc/main/java/com/bailuntec/job/CalculateCostFirstJob.java
+4
-1
No files found.
data-mid/mid-calculate-cost-first/src/main/java/com/bailuntec/job/CalculateCostFirstJob.java
View file @
1e6a90f5
...
@@ -99,7 +99,10 @@ public class CalculateCostFirstJob extends PointJob {
...
@@ -99,7 +99,10 @@ public class CalculateCostFirstJob extends PointJob {
DcMidCostFirstOrder
dcMidCostFirstOrder
=
new
DcMidCostFirstOrder
();
DcMidCostFirstOrder
dcMidCostFirstOrder
=
new
DcMidCostFirstOrder
();
for
(
Map
.
Entry
<
String
,
DcBaseCostFirst
>
entry
:
map
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
DcBaseCostFirst
>
entry
:
map
.
entrySet
())
{
DcBaseCostFirst
dcBaseCostFirst
=
entry
.
getValue
();
DcBaseCostFirst
dcBaseCostFirst
=
entry
.
getValue
();
BigDecimal
skuWeightRatio
=
dcBaseCostFirst
.
getSkuWeight
().
divide
(
totalWeight
,
3
,
RoundingMode
.
HALF_EVEN
);
BigDecimal
skuWeightRatio
=
BigDecimal
.
ONE
;
if
(
totalWeight
.
compareTo
(
BigDecimal
.
ZERO
)
==
1
)
{
skuWeightRatio
=
dcBaseCostFirst
.
getSkuWeight
().
divide
(
totalWeight
,
3
,
RoundingMode
.
HALF_EVEN
);
}
BigDecimal
skuCostFirst
=
dcBaseCostFirst
.
getCostFirst
().
multiply
(
skuWeightRatio
).
setScale
(
3
,
RoundingMode
.
HALF_EVEN
);
BigDecimal
skuCostFirst
=
dcBaseCostFirst
.
getCostFirst
().
multiply
(
skuWeightRatio
).
setScale
(
3
,
RoundingMode
.
HALF_EVEN
);
dcMidCostFirstOrder
.
setBailunSku
(
dcBaseCostFirst
.
getBailunSku
());
dcMidCostFirstOrder
.
setBailunSku
(
dcBaseCostFirst
.
getBailunSku
());
dcMidCostFirstOrder
.
setWarehouseCode
(
dcBaseCostFirst
.
getWarehouseCode
());
dcMidCostFirstOrder
.
setWarehouseCode
(
dcBaseCostFirst
.
getWarehouseCode
());
...
...
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