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
617b8c70
Commit
617b8c70
authored
Nov 29, 2019
by
yinyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动周转--排除掉FBA平台11-29~11月30||12月2号~12月3号时间段订单数据,增加jvm内存、优化销量预测
parent
a17fcbf2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
18 deletions
+18
-18
DcAutoSalesMapper.xml
.../src/main/java/com/bailuntec/mapper/DcAutoSalesMapper.xml
+0
-0
Dockerfile
data-show/show-auto-turnover/Dockerfile
+2
-2
AutoTurnoverJob.java
...over/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
+16
-16
No files found.
data-common/src/main/java/com/bailuntec/mapper/DcAutoSalesMapper.xml
View file @
617b8c70
This source diff could not be displayed because it is too large. You can
view the blob
instead.
data-show/show-auto-turnover/Dockerfile
View file @
617b8c70
...
...
@@ -20,4 +20,4 @@ RUN cd /usr/app/data-parent && mvn -T 1C install -pl ../data-show/show-auto-tur
#指定容器启动程序及参数 <ENTRYPOINT> "<CMD>"
EXPOSE
8080
ENTRYPOINT
["java","-Xms30m","-Xmx80m","-jar","/usr/app/data-show/show-auto-turnover/target/show-auto-turnover-1.0-SNAPSHOT.jar"]
\ No newline at end of file
ENTRYPOINT
["java","-Xms80m","-Xmx225m","-jar","/usr/app/data-show/show-auto-turnover/target/show-auto-turnover-1.0-SNAPSHOT.jar"]
\ No newline at end of file
data-show/show-auto-turnover/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
View file @
617b8c70
...
...
@@ -1052,10 +1052,21 @@ public class AutoTurnoverJob extends PointJob {
/*}*/
}
else
{
// y = ae^bx
BigDecimal
forecastSales
=
BigDecimal
.
ZERO
;
List
<
Integer
>
historySalesList
=
JSON
.
parseObject
(
dcAutoSales
.
getHistorySalesDetails
(),
new
TypeReference
<
List
<
Integer
>>()
{
});
List
<
Integer
>
weekRateList
=
null
;
int
weekTime
=
0
;
boolean
hasValue
=
true
;
if
(
dcAutoWarehouseweekSales
==
null
)
{
hasValue
=
false
;
}
else
{
weekRateList
=
JSON
.
parseObject
(
"["
+
dcAutoWarehouseweekSales
.
getRateDetail
()+
"]"
,
new
TypeReference
<
List
<
Integer
>>(){
});
weekTime
=
Integer
.
valueOf
(
dcAutoWarehouseweekSales
.
getWeekTime
());
}
for
(
int
j
=
0
;
j
<
autoForecastDay
;
j
++)
{
//20191127 预测销量更改为:(过去第四周*0.1 + 过去第三周*0.1 + 过去第二周*0.3 + 过去第一周*0.5)* 周系数
// y = ae^bx
/*double v;
if (dcAutoSales.getFitForecastFormula().contains("ln(x)")) {
//y = aln(x) + b
...
...
@@ -1065,19 +1076,8 @@ public class AutoTurnoverJob extends PointJob {
}
BigDecimal forecastSales = BigDecimal.valueOf(v < 0 ? 0 : v).setScale(0, RoundingMode.HALF_EVEN);
forecastSalesList.set(j, forecastSales.compareTo(salesUpperLimit) == 1 ? salesUpperLimit : forecastSales);*/
BigDecimal
forecastSales
=
BigDecimal
.
ZERO
;
List
<
Integer
>
historySalesList
=
JSON
.
parseObject
(
dcAutoSales
.
getHistorySalesDetails
(),
new
TypeReference
<
List
<
Integer
>>()
{
});
List
<
Integer
>
weekRateList
=
null
;
int
weekTime
=
0
;
boolean
hasValue
=
true
;
if
(
dcAutoWarehouseweekSales
==
null
)
{
hasValue
=
false
;
}
else
{
weekRateList
=
JSON
.
parseObject
(
"["
+
dcAutoWarehouseweekSales
.
getRateDetail
()+
"]"
,
new
TypeReference
<
List
<
Integer
>>(){
});
weekTime
=
Integer
.
valueOf
(
dcAutoWarehouseweekSales
.
getWeekTime
());
}
//20191127 预测销量更改为:(过去第四周*0.1 + 过去第三周*0.1 + 过去第二周*0.3 + 过去第一周*0.5)* 周系数
if
(
0
<=
j
&&
j
<
7
)
{
forecastSales
=
BigDecimal
.
valueOf
(
historySalesList
.
get
(
2
+
j
)).
multiply
(
BigDecimal
.
valueOf
(
0.1
)).
add
(
BigDecimal
.
valueOf
(
historySalesList
.
get
(
9
+
j
)).
multiply
(
BigDecimal
.
valueOf
(
0.1
))).
...
...
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