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
edb44974
Commit
edb44974
authored
Jan 19, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# update
parent
48ec7fb5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
5 deletions
+17
-5
mybatis-config.xml
data-common/src/main/resources/mybatis-config.xml
+2
-2
AutoTurnoverJob.java
...over/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
+7
-1
AutoTurnoverTest.java
...ow/show-auto-turnover/src/test/java/AutoTurnoverTest.java
+8
-2
No files found.
data-common/src/main/resources/mybatis-config.xml
View file @
edb44974
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
<configuration>
<configuration>
<!--<properties resource="db-tj.properties"/>-->
<!--<properties resource="db-tj.properties"/>-->
<
!-- <properties resource="db-dev.properties"/>--
>
<
properties
resource=
"db-dev.properties"
/
>
<
properties
resource=
"db-prod.properties"
/
>
<
!-- <properties resource="db-prod.properties"/>--
>
<settings>
<settings>
<setting
name=
"mapUnderscoreToCamelCase"
value=
"true"
/>
<setting
name=
"mapUnderscoreToCamelCase"
value=
"true"
/>
</settings>
</settings>
...
...
data-show/show-auto-turnover/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
View file @
edb44974
...
@@ -123,7 +123,10 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -123,7 +123,10 @@ public class AutoTurnoverJob extends PointJob {
.
example
());
.
example
());
this
.
autoTurnoverFromStock
(
queryTime
,
dcBaseStock
);
this
.
autoTurnoverFromStock
(
queryTime
,
dcBaseStock
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
DcAutoException
dcAutoException
=
new
DcAutoException
();
dcAutoException
.
setBailunSku
(
dcBaseStock
.
getBailunSku
());
dcAutoException
.
setWarehouseCode
(
dcBaseStock
.
getWarehouseCode
());
dcAutoException
.
setMessage
(
e
.
getMessage
()
+
e
.
getStackTrace
().
toString
());
}
finally
{
}
finally
{
SessionUtil
.
closeSession
();
SessionUtil
.
closeSession
();
}
}
...
@@ -390,7 +393,10 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -390,7 +393,10 @@ public class AutoTurnoverJob extends PointJob {
* 均值, 配置安全库存法: 销量上下限 根据过去30天销量,计算出合理的销量封顶值和销量最低值
* 均值, 配置安全库存法: 销量上下限 根据过去30天销量,计算出合理的销量封顶值和销量最低值
* 曲线拟合 :销量预测, 根据销量走势和上下限,计算出销量预测曲线, 如果历史销量包含0, 无法使用指数函数拟合
* 曲线拟合 :销量预测, 根据销量走势和上下限,计算出销量预测曲线, 如果历史销量包含0, 无法使用指数函数拟合
*/
*/
long
time
=
System
.
currentTimeMillis
();
log
.
info
(
Long
.
toString
(
time
));
forecastSalesList
=
autoTurnoverService
.
getAutoTurnoverSaleDetails
(
dcAutoTurnover
,
turnoverDays
,
autoForecastDay
);
forecastSalesList
=
autoTurnoverService
.
getAutoTurnoverSaleDetails
(
dcAutoTurnover
,
turnoverDays
,
autoForecastDay
);
log
.
info
(
Long
.
toString
(
System
.
currentTimeMillis
()
-
time
));
AtomicReference
<
LocalDate
>
localDate
=
new
AtomicReference
<>(
LocalDate
.
now
());
AtomicReference
<
LocalDate
>
localDate
=
new
AtomicReference
<>(
LocalDate
.
now
());
...
...
data-show/show-auto-turnover/src/test/java/AutoTurnoverTest.java
View file @
edb44974
...
@@ -22,6 +22,7 @@ import com.bailuntec.utils.SessionUtil;
...
@@ -22,6 +22,7 @@ import com.bailuntec.utils.SessionUtil;
import
com.dangdang.ddframe.job.api.ShardingContext
;
import
com.dangdang.ddframe.job.api.ShardingContext
;
import
com.dangdang.ddframe.job.executor.ShardingContexts
;
import
com.dangdang.ddframe.job.executor.ShardingContexts
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.ibatis.session.ExecutorType
;
import
org.apache.ibatis.session.ExecutorType
;
import
org.apache.ibatis.session.SqlSession
;
import
org.apache.ibatis.session.SqlSession
;
import
org.junit.jupiter.api.Test
;
import
org.junit.jupiter.api.Test
;
...
@@ -39,6 +40,7 @@ import java.util.ArrayList;
...
@@ -39,6 +40,7 @@ import java.util.ArrayList;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
@Slf4j
public
class
AutoTurnoverTest
{
public
class
AutoTurnoverTest
{
// @Test
// @Test
public
void
test1
()
throws
Exception
{
public
void
test1
()
throws
Exception
{
...
@@ -259,12 +261,16 @@ public class AutoTurnoverTest {
...
@@ -259,12 +261,16 @@ public class AutoTurnoverTest {
public
void
testXX2
()
{
public
void
testXX2
()
{
DcBaseStock
dcBaseStock
=
SessionUtil
.
getSession
().
getMapper
(
DcBaseStockMapper
.
class
)
DcBaseStock
dcBaseStock
=
SessionUtil
.
getSession
().
getMapper
(
DcBaseStockMapper
.
class
)
.
selectOneByExample
(
DcBaseStockExample
.
newAndCreateCriteria
()
.
selectOneByExample
(
DcBaseStockExample
.
newAndCreateCriteria
()
.
andBailunSkuEqualTo
(
"94
4579124
"
)
.
andBailunSkuEqualTo
(
"94
8276501
"
)
.
andWarehouseCodeEqualTo
(
"G
ZBLWH
"
)
.
andWarehouseCodeEqualTo
(
"G
B4PXBL
"
)
.
example
());
.
example
());
try
{
try
{
AutoTurnoverJob
autoTurnoverJob
=
new
AutoTurnoverJob
();
AutoTurnoverJob
autoTurnoverJob
=
new
AutoTurnoverJob
();
long
time
=
System
.
currentTimeMillis
();
log
.
info
(
Long
.
toString
(
time
));
autoTurnoverJob
.
autoTurnoverFromStock
(
DateTimeFormatter
.
ofPattern
(
CommonConstant
.
DATE_FORMAT
).
format
(
LocalDate
.
now
()),
dcBaseStock
);
autoTurnoverJob
.
autoTurnoverFromStock
(
DateTimeFormatter
.
ofPattern
(
CommonConstant
.
DATE_FORMAT
).
format
(
LocalDate
.
now
()),
dcBaseStock
);
log
.
info
(
String
.
valueOf
((
System
.
currentTimeMillis
()
-
time
)));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
...
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