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
b9183dca
Commit
b9183dca
authored
Apr 26, 2019
by
wutong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动周转安全库存小于0.8就置0,0.8-1 之间就置1
parent
ff312084
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
AutoTurnoverJob.java
...over/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
+4
-2
AutoTurnoverTest.java
...ow/show-auto-turnover/src/test/java/AutoTurnoverTest.java
+4
-0
No files found.
data-show/show-auto-turnover/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
View file @
b9183dca
...
@@ -1063,12 +1063,14 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -1063,12 +1063,14 @@ public class AutoTurnoverJob extends PointJob {
dcAutoConfigSafeInventory
=
autoConfigSafeInventoryMapper
.
selectOneByExample
(
DcAutoConfigSafeInventoryExample
.
newAndCreateCriteria
().
andVariableCodeEqualTo
(
""
).
andWarehouseCodeEqualTo
(
warehouseCode
).
andStatusEqualTo
(
1
).
andTypeEqualTo
(
3
).
example
());
dcAutoConfigSafeInventory
=
autoConfigSafeInventoryMapper
.
selectOneByExample
(
DcAutoConfigSafeInventoryExample
.
newAndCreateCriteria
().
andVariableCodeEqualTo
(
""
).
andWarehouseCodeEqualTo
(
warehouseCode
).
andStatusEqualTo
(
1
).
andTypeEqualTo
(
3
).
example
());
if
(
dcAutoConfigSafeInventory
!=
null
)
{
if
(
dcAutoConfigSafeInventory
!=
null
)
{
weightingAvgSales
=
caculateWeightingAvgSales
(
dcAutoConfigSafeInventory
.
getWeightingCoefficientSeven
(),
dcAutoConfigSafeInventory
.
getWeightingCoefficientFourteen
(),
dcAutoConfigSafeInventory
.
getWeightingCoefficientThirty
(),
historyThirtySalesList
);
weightingAvgSales
=
caculateWeightingAvgSales
(
dcAutoConfigSafeInventory
.
getWeightingCoefficientSeven
(),
dcAutoConfigSafeInventory
.
getWeightingCoefficientFourteen
(),
dcAutoConfigSafeInventory
.
getWeightingCoefficientThirty
(),
historyThirtySalesList
);
//进来这里就存一份没乘倍数的加权日均销量
//进来这里就存一份没乘倍数的加权日均销量
,小于0.8就置0 0.8-1 之间就置1
dcAutoTurnover
.
setDailyWeightedSales
(
weightingAvgSales
);
dcAutoTurnover
.
setDailyWeightedSales
(
weightingAvgSales
);
if
(
weightingAvgSales
.
compareTo
(
BigDecimal
.
ONE
)
==
1
)
{
if
(
weightingAvgSales
.
compareTo
(
BigDecimal
.
ONE
)
==
1
)
{
weightingAvgSales
=
weightingAvgSales
.
multiply
(
dcAutoConfigSafeInventory
.
getParam
()).
setScale
(
3
,
RoundingMode
.
HALF_EVEN
);
weightingAvgSales
=
weightingAvgSales
.
multiply
(
dcAutoConfigSafeInventory
.
getParam
()).
setScale
(
3
,
RoundingMode
.
HALF_EVEN
);
}
else
{
}
else
if
(
weightingAvgSales
.
compareTo
(
BigDecimal
.
valueOf
(
0.8
))
>=
0
)
{
weightingAvgSales
=
BigDecimal
.
ONE
;
weightingAvgSales
=
BigDecimal
.
ONE
;
}
else
{
weightingAvgSales
=
BigDecimal
.
ZERO
;
}
}
}
else
{
}
else
{
//啥配置都没有就给个默认取值
//啥配置都没有就给个默认取值
...
...
data-show/show-auto-turnover/src/test/java/AutoTurnoverTest.java
View file @
b9183dca
...
@@ -117,5 +117,9 @@ public class AutoTurnoverTest {
...
@@ -117,5 +117,9 @@ public class AutoTurnoverTest {
int
interval
=
Period
.
between
(
recordTime
.
toLocalDate
(),
finalEstimatedArrivalTime
.
toLocalDate
()).
getDays
();
int
interval
=
Period
.
between
(
recordTime
.
toLocalDate
(),
finalEstimatedArrivalTime
.
toLocalDate
()).
getDays
();
System
.
out
.
println
(
interval
);
System
.
out
.
println
(
interval
);
}
}
@Test
public
void
test66
()
{
}
}
}
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