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
b41b1cfc
Commit
b41b1cfc
authored
Apr 17, 2019
by
wutong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复自动周转多算了一天销量的问题
parent
de9893fd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
AutoTurnoverJob.java
...over/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
+8
-4
No files found.
data-show/show-auto-turnover/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
View file @
b41b1cfc
...
@@ -1177,7 +1177,7 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -1177,7 +1177,7 @@ public class AutoTurnoverJob extends PointJob {
if
(
j
<
Constant
.
TURNOVER_MULTIPLE
*
turnoverDays
&&
forecastSalesList
.
get
(
j
).
compareTo
(
forecastInventory
)
!=
1
)
{
if
(
j
<
Constant
.
TURNOVER_MULTIPLE
*
turnoverDays
&&
forecastSalesList
.
get
(
j
).
compareTo
(
forecastInventory
)
!=
1
)
{
inventoryAvailableDays
++;
inventoryAvailableDays
++;
}
}
totalSales
=
totalSales
.
add
(
forecastSalesList
.
get
(
j
));
//库存 - 销量, 继续跑, 这是周转期最后一天和周转期外的
//库存 - 销量, 继续跑, 这是周转期最后一天和周转期外的
if
(
j
>=
turnoverDays
)
{
if
(
j
>=
turnoverDays
)
{
if
(
j
==
turnoverDays
)
{
//周转期内总销量
if
(
j
==
turnoverDays
)
{
//周转期内总销量
...
@@ -1205,6 +1205,8 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -1205,6 +1205,8 @@ public class AutoTurnoverJob extends PointJob {
moqPurchaseAdvisedList
.
add
(
moqDecimal
);
moqPurchaseAdvisedList
.
add
(
moqDecimal
);
}
}
}
}
totalSales
=
totalSales
.
add
(
forecastSalesList
.
get
(
j
));
}
}
return
inventoryAvailableDays
;
return
inventoryAvailableDays
;
}
}
...
@@ -1313,12 +1315,11 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -1313,12 +1315,11 @@ public class AutoTurnoverJob extends PointJob {
inventoryAvailableDays
++;
inventoryAvailableDays
++;
}
}
totalSales
=
totalSales
.
add
(
forecastSalesList
.
get
(
j
));
//库存 - 销量, 继续跑
if
(
j
>=
turnoverDays
)
{
if
(
j
==
turnoverDays
)
{
if
(
j
==
turnoverDays
)
{
dcAutoTurnover
.
setTurnoverSales
(
totalSales
);
dcAutoTurnover
.
setTurnoverSales
(
totalSales
);
}
}
//库存 - 销量, 继续跑
if
(
j
>=
turnoverDays
)
{
//采购建议 = 安全库存缺少值 + 今日的实际缺货 + 本次采购到货日期前一天的累计销量 - 本次采购到货日期累计到货数量 + 预计销量
//采购建议 = 安全库存缺少值 + 今日的实际缺货 + 本次采购到货日期前一天的累计销量 - 本次采购到货日期累计到货数量 + 预计销量
BigDecimal
totalAdvised
=
totalSafeInventory
.
subtract
(
forecastInventoryList
.
get
(
j
))
//安全库存缺少值= 理论安全库存 - 预测库存
BigDecimal
totalAdvised
=
totalSafeInventory
.
subtract
(
forecastInventoryList
.
get
(
j
))
//安全库存缺少值= 理论安全库存 - 预测库存
.
add
(
BigDecimal
.
valueOf
(
outStock
.
longValue
()))
//今天的实际缺货
.
add
(
BigDecimal
.
valueOf
(
outStock
.
longValue
()))
//今天的实际缺货
...
@@ -1341,6 +1342,9 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -1341,6 +1342,9 @@ public class AutoTurnoverJob extends PointJob {
moqPurchaseAdvisedList
.
add
(
moqDecimal
);
moqPurchaseAdvisedList
.
add
(
moqDecimal
);
}
}
}
}
totalSales
=
totalSales
.
add
(
forecastSalesList
.
get
(
j
));
/*
/*
* 如果库存数量 > 安全库存 + 预计销量, 就是预测冗余;
* 如果库存数量 > 安全库存 + 预计销量, 就是预测冗余;
* 如果forecastShortSupplyList.get(j) > 0, 就是预测断货
* 如果forecastShortSupplyList.get(j) > 0, 就是预测断货
...
...
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