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
1e7b8395
Commit
1e7b8395
authored
Jan 02, 2020
by
yinyong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
02ae5ae6
0c4e6d82
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
AutoTurnoverJob.java
...over/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
+6
-6
No files found.
data-show/show-auto-turnover/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
View file @
1e7b8395
...
@@ -1089,7 +1089,7 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -1089,7 +1089,7 @@ public class AutoTurnoverJob extends PointJob {
add
(
BigDecimal
.
valueOf
(
historySalesList
.
get
(
16
+
j
)).
multiply
(
BigDecimal
.
valueOf
(
0.3
))).
add
(
BigDecimal
.
valueOf
(
historySalesList
.
get
(
16
+
j
)).
multiply
(
BigDecimal
.
valueOf
(
0.3
))).
add
(
BigDecimal
.
valueOf
(
historySalesList
.
get
(
23
+
j
)).
multiply
(
BigDecimal
.
valueOf
(
0.5
)));
add
(
BigDecimal
.
valueOf
(
historySalesList
.
get
(
23
+
j
)).
multiply
(
BigDecimal
.
valueOf
(
0.5
)));
if
(
hasValue
)
{
if
(
hasValue
)
{
forecastSales
=
forecastSales
.
multiply
(
BigDecimal
.
valueOf
(
weekRateList
.
get
(
weekTime
-
1
)).
compareTo
(
BigDecimal
.
ZERO
)
==
0
?
BigDecimal
.
ONE
:
BigDecimal
.
valueOf
(
weekRateList
.
get
(
weekTime
-
1
)));
forecastSales
=
forecastSales
.
multiply
(
BigDecimal
.
valueOf
(
weekRateList
.
get
(
weekTime
)).
compareTo
(
BigDecimal
.
ZERO
)
==
0
?
BigDecimal
.
ONE
:
BigDecimal
.
valueOf
(
weekRateList
.
get
(
weekTime
)));
}
}
}
else
if
(
7
<=
j
&&
j
<
14
)
{
}
else
if
(
7
<=
j
&&
j
<
14
)
{
forecastSales
=
(
BigDecimal
.
valueOf
(
historySalesList
.
get
(
2
+
j
)).
multiply
(
BigDecimal
.
valueOf
(
0.1
))).
forecastSales
=
(
BigDecimal
.
valueOf
(
historySalesList
.
get
(
2
+
j
)).
multiply
(
BigDecimal
.
valueOf
(
0.1
))).
...
@@ -1100,10 +1100,10 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -1100,10 +1100,10 @@ public class AutoTurnoverJob extends PointJob {
if
(
weekTime
>
51
)
{
if
(
weekTime
>
51
)
{
weekTime
=
weekTime
-
51
;
weekTime
=
weekTime
-
51
;
}
}
forecastSales
=
forecastSales
.
multiply
(
BigDecimal
.
valueOf
(
weekRateList
.
get
(
weekTime
-
1
)).
compareTo
(
BigDecimal
.
ZERO
)
==
0
?
BigDecimal
.
ONE
:
BigDecimal
.
valueOf
(
weekRateList
.
get
(
weekTime
-
1
)));
forecastSales
=
forecastSales
.
multiply
(
BigDecimal
.
valueOf
(
weekRateList
.
get
(
weekTime
)).
compareTo
(
BigDecimal
.
ZERO
)
==
0
?
BigDecimal
.
ONE
:
BigDecimal
.
valueOf
(
weekRateList
.
get
(
weekTime
)));
}
}
}
else
if
(
14
<=
j
&&
j
<
21
)
{
}
else
if
(
14
<=
j
&&
j
<
21
)
{
forecastSales
=
(
BigDecimal
.
valueOf
(
historySalesList
.
get
(
2
+
j
)).
multiply
(
BigDecimal
.
valueOf
(
0.1
))).
forecastSales
=
(
BigDecimal
.
valueOf
(
historySalesList
.
get
(
2
+
j
)).
multiply
(
BigDecimal
.
valueOf
(
0.1
))).
add
(
BigDecimal
.
valueOf
(
historySalesList
.
get
(
9
+
j
)).
multiply
(
BigDecimal
.
valueOf
(
0.1
))).
add
(
BigDecimal
.
valueOf
(
historySalesList
.
get
(
9
+
j
)).
multiply
(
BigDecimal
.
valueOf
(
0.1
))).
add
(
forecastSalesList
.
get
(
j
-
14
).
multiply
(
BigDecimal
.
valueOf
(
0.3
))).
add
(
forecastSalesList
.
get
(
j
-
14
).
multiply
(
BigDecimal
.
valueOf
(
0.3
))).
add
(
forecastSalesList
.
get
(
j
-
7
).
multiply
(
BigDecimal
.
valueOf
(
0.5
)));
add
(
forecastSalesList
.
get
(
j
-
7
).
multiply
(
BigDecimal
.
valueOf
(
0.5
)));
...
@@ -1111,7 +1111,7 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -1111,7 +1111,7 @@ public class AutoTurnoverJob extends PointJob {
if
(
weekTime
>
50
)
{
if
(
weekTime
>
50
)
{
weekTime
=
weekTime
-
50
;
weekTime
=
weekTime
-
50
;
}
}
forecastSales
=
forecastSales
.
multiply
(
BigDecimal
.
valueOf
(
weekRateList
.
get
(
weekTime
-
1
)).
compareTo
(
BigDecimal
.
ZERO
)
==
0
?
BigDecimal
.
ONE
:
BigDecimal
.
valueOf
(
weekRateList
.
get
(
weekTime
-
1
)));
forecastSales
=
forecastSales
.
multiply
(
BigDecimal
.
valueOf
(
weekRateList
.
get
(
weekTime
)).
compareTo
(
BigDecimal
.
ZERO
)
==
0
?
BigDecimal
.
ONE
:
BigDecimal
.
valueOf
(
weekRateList
.
get
(
weekTime
)));
}
}
}
else
if
(
21
<=
j
&&
j
<
27
)
{
}
else
if
(
21
<=
j
&&
j
<
27
)
{
forecastSales
=
(
BigDecimal
.
valueOf
(
historySalesList
.
get
(
2
+
j
)).
multiply
(
BigDecimal
.
valueOf
(
0.1
))).
forecastSales
=
(
BigDecimal
.
valueOf
(
historySalesList
.
get
(
2
+
j
)).
multiply
(
BigDecimal
.
valueOf
(
0.1
))).
...
@@ -1122,7 +1122,7 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -1122,7 +1122,7 @@ public class AutoTurnoverJob extends PointJob {
if
(
weekTime
>
49
)
{
if
(
weekTime
>
49
)
{
weekTime
=
weekTime
-
49
;
weekTime
=
weekTime
-
49
;
}
}
forecastSales
=
forecastSales
.
multiply
(
BigDecimal
.
valueOf
(
weekRateList
.
get
(
weekTime
-
1
)).
compareTo
(
BigDecimal
.
ZERO
)
==
0
?
BigDecimal
.
ONE
:
BigDecimal
.
valueOf
(
weekRateList
.
get
(
weekTime
-
1
)));
forecastSales
=
forecastSales
.
multiply
(
BigDecimal
.
valueOf
(
weekRateList
.
get
(
weekTime
)).
compareTo
(
BigDecimal
.
ZERO
)
==
0
?
BigDecimal
.
ONE
:
BigDecimal
.
valueOf
(
weekRateList
.
get
(
weekTime
)));
}
}
}
else
if
(
27
<=
j
&&
j
<
autoForecastDay
)
{
}
else
if
(
27
<=
j
&&
j
<
autoForecastDay
)
{
forecastSales
=
(
forecastSalesList
.
get
(
j
-
27
).
multiply
(
BigDecimal
.
valueOf
(
0.1
))).
forecastSales
=
(
forecastSalesList
.
get
(
j
-
27
).
multiply
(
BigDecimal
.
valueOf
(
0.1
))).
...
@@ -1133,7 +1133,7 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -1133,7 +1133,7 @@ public class AutoTurnoverJob extends PointJob {
if
(
weekTime
>
48
)
{
if
(
weekTime
>
48
)
{
weekTime
=
weekTime
-
48
;
weekTime
=
weekTime
-
48
;
}
}
forecastSales
=
forecastSales
.
multiply
(
BigDecimal
.
valueOf
(
weekRateList
.
get
(
weekTime
-
1
)).
compareTo
(
BigDecimal
.
ZERO
)
==
0
?
BigDecimal
.
ONE
:
BigDecimal
.
valueOf
(
weekRateList
.
get
(
weekTime
-
1
)));
forecastSales
=
forecastSales
.
multiply
(
BigDecimal
.
valueOf
(
weekRateList
.
get
(
weekTime
)).
compareTo
(
BigDecimal
.
ZERO
)
==
0
?
BigDecimal
.
ONE
:
BigDecimal
.
valueOf
(
weekRateList
.
get
(
weekTime
)));
}
}
}
}
forecastSalesList
.
set
(
j
,
forecastSales
.
compareTo
(
salesUpperLimit
)
==
1
?
salesUpperLimit
:
forecastSales
);
forecastSalesList
.
set
(
j
,
forecastSales
.
compareTo
(
salesUpperLimit
)
==
1
?
salesUpperLimit
:
forecastSales
);
...
...
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