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
7592468b
Commit
7592468b
authored
Mar 05, 2020
by
yinyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aims--动态备货规则-安全库存天数匹配规则新增采购员判断
parent
d8ff60eb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
121 additions
and
26 deletions
+121
-26
DcAutoJitTag.java
...c/main/java/com/bailuntec/domain/entity/DcAutoJitTag.java
+14
-1
DcAutoJitTagExample.java
...ava/com/bailuntec/domain/example/DcAutoJitTagExample.java
+70
-0
DcAutoJitTagMapper.xml
...src/main/java/com/bailuntec/mapper/DcAutoJitTagMapper.xml
+33
-8
AutoTurnoverJob.java
...over/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
+4
-17
No files found.
data-common/src/main/java/com/bailuntec/domain/entity/DcAutoJitTag.java
View file @
7592468b
...
@@ -152,6 +152,15 @@ public class DcAutoJitTag {
...
@@ -152,6 +152,15 @@ public class DcAutoJitTag {
private
Integer
groupId
;
private
Integer
groupId
;
/**
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_jit_tag.buyer_name
*
* @mbg.generated
*/
private
String
buyerName
;
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_auto_jit_tag
* This method corresponds to the database table dc_auto_jit_tag
*
*
...
@@ -179,6 +188,7 @@ public class DcAutoJitTag {
...
@@ -179,6 +188,7 @@ public class DcAutoJitTag {
sb
.
append
(
", isEliminate="
).
append
(
isEliminate
);
sb
.
append
(
", isEliminate="
).
append
(
isEliminate
);
sb
.
append
(
", gmtUpdate="
).
append
(
gmtUpdate
);
sb
.
append
(
", gmtUpdate="
).
append
(
gmtUpdate
);
sb
.
append
(
", groupId="
).
append
(
groupId
);
sb
.
append
(
", groupId="
).
append
(
groupId
);
sb
.
append
(
", buyerName="
).
append
(
buyerName
);
sb
.
append
(
"]"
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
return
sb
.
toString
();
}
}
...
@@ -216,7 +226,8 @@ public class DcAutoJitTag {
...
@@ -216,7 +226,8 @@ public class DcAutoJitTag {
&&
(
this
.
getLevel
()
==
null
?
other
.
getLevel
()
==
null
:
this
.
getLevel
().
equals
(
other
.
getLevel
()))
&&
(
this
.
getLevel
()
==
null
?
other
.
getLevel
()
==
null
:
this
.
getLevel
().
equals
(
other
.
getLevel
()))
&&
(
this
.
getIsEliminate
()
==
null
?
other
.
getIsEliminate
()
==
null
:
this
.
getIsEliminate
().
equals
(
other
.
getIsEliminate
()))
&&
(
this
.
getIsEliminate
()
==
null
?
other
.
getIsEliminate
()
==
null
:
this
.
getIsEliminate
().
equals
(
other
.
getIsEliminate
()))
&&
(
this
.
getGmtUpdate
()
==
null
?
other
.
getGmtUpdate
()
==
null
:
this
.
getGmtUpdate
().
equals
(
other
.
getGmtUpdate
()))
&&
(
this
.
getGmtUpdate
()
==
null
?
other
.
getGmtUpdate
()
==
null
:
this
.
getGmtUpdate
().
equals
(
other
.
getGmtUpdate
()))
&&
(
this
.
getGroupId
()
==
null
?
other
.
getGroupId
()
==
null
:
this
.
getGroupId
().
equals
(
other
.
getGroupId
()));
&&
(
this
.
getGroupId
()
==
null
?
other
.
getGroupId
()
==
null
:
this
.
getGroupId
().
equals
(
other
.
getGroupId
()))
&&
(
this
.
getBuyerName
()
==
null
?
other
.
getBuyerName
()
==
null
:
this
.
getBuyerName
().
equals
(
other
.
getBuyerName
()));
}
}
/**
/**
...
@@ -245,6 +256,7 @@ public class DcAutoJitTag {
...
@@ -245,6 +256,7 @@ public class DcAutoJitTag {
result
=
prime
*
result
+
((
getIsEliminate
()
==
null
)
?
0
:
getIsEliminate
().
hashCode
());
result
=
prime
*
result
+
((
getIsEliminate
()
==
null
)
?
0
:
getIsEliminate
().
hashCode
());
result
=
prime
*
result
+
((
getGmtUpdate
()
==
null
)
?
0
:
getGmtUpdate
().
hashCode
());
result
=
prime
*
result
+
((
getGmtUpdate
()
==
null
)
?
0
:
getGmtUpdate
().
hashCode
());
result
=
prime
*
result
+
((
getGroupId
()
==
null
)
?
0
:
getGroupId
().
hashCode
());
result
=
prime
*
result
+
((
getGroupId
()
==
null
)
?
0
:
getGroupId
().
hashCode
());
result
=
prime
*
result
+
((
getBuyerName
()
==
null
)
?
0
:
getBuyerName
().
hashCode
());
return
result
;
return
result
;
}
}
}
}
\ No newline at end of file
data-common/src/main/java/com/bailuntec/domain/example/DcAutoJitTagExample.java
View file @
7592468b
...
@@ -1340,6 +1340,76 @@ public class DcAutoJitTagExample {
...
@@ -1340,6 +1340,76 @@ public class DcAutoJitTagExample {
addCriterion
(
"group_id not between"
,
value1
,
value2
,
"groupId"
);
addCriterion
(
"group_id not between"
,
value1
,
value2
,
"groupId"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andBuyerNameIsNull
()
{
addCriterion
(
"buyer_name is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBuyerNameIsNotNull
()
{
addCriterion
(
"buyer_name is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBuyerNameEqualTo
(
String
value
)
{
addCriterion
(
"buyer_name ="
,
value
,
"buyerName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBuyerNameNotEqualTo
(
String
value
)
{
addCriterion
(
"buyer_name <>"
,
value
,
"buyerName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBuyerNameGreaterThan
(
String
value
)
{
addCriterion
(
"buyer_name >"
,
value
,
"buyerName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBuyerNameGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"buyer_name >="
,
value
,
"buyerName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBuyerNameLessThan
(
String
value
)
{
addCriterion
(
"buyer_name <"
,
value
,
"buyerName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBuyerNameLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"buyer_name <="
,
value
,
"buyerName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBuyerNameLike
(
String
value
)
{
addCriterion
(
"buyer_name like"
,
value
,
"buyerName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBuyerNameNotLike
(
String
value
)
{
addCriterion
(
"buyer_name not like"
,
value
,
"buyerName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBuyerNameIn
(
List
<
String
>
values
)
{
addCriterion
(
"buyer_name in"
,
values
,
"buyerName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBuyerNameNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"buyer_name not in"
,
values
,
"buyerName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBuyerNameBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"buyer_name between"
,
value1
,
value2
,
"buyerName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBuyerNameNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"buyer_name not between"
,
value1
,
value2
,
"buyerName"
);
return
(
Criteria
)
this
;
}
}
}
/**
/**
...
...
data-common/src/main/java/com/bailuntec/mapper/DcAutoJitTagMapper.xml
View file @
7592468b
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
<result
column=
"is_eliminate"
jdbcType=
"INTEGER"
property=
"isEliminate"
/>
<result
column=
"is_eliminate"
jdbcType=
"INTEGER"
property=
"isEliminate"
/>
<result
column=
"gmt_update"
jdbcType=
"TIMESTAMP"
property=
"gmtUpdate"
/>
<result
column=
"gmt_update"
jdbcType=
"TIMESTAMP"
property=
"gmtUpdate"
/>
<result
column=
"group_id"
jdbcType=
"INTEGER"
property=
"groupId"
/>
<result
column=
"group_id"
jdbcType=
"INTEGER"
property=
"groupId"
/>
<result
column=
"buyer_name"
jdbcType=
"VARCHAR"
property=
"buyerName"
/>
</resultMap>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<sql
id=
"Example_Where_Clause"
>
<!--
<!--
...
@@ -96,7 +97,7 @@
...
@@ -96,7 +97,7 @@
-->
-->
id, tag_name, is_gt_7, enable_7, quantity_sales7, is_gt_14, enable_14, quantity_sales14,
id, tag_name, is_gt_7, enable_7, quantity_sales7, is_gt_14, enable_14, quantity_sales14,
is_gt_30, enable_30, quantity_sales30, quantity_safe_inventory, level, is_eliminate,
is_gt_30, enable_30, quantity_sales30, quantity_safe_inventory, level, is_eliminate,
gmt_update, group_id
gmt_update, group_id
, buyer_name
</sql>
</sql>
<select
id=
"selectByExample"
parameterType=
"com.bailuntec.domain.example.DcAutoJitTagExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByExample"
parameterType=
"com.bailuntec.domain.example.DcAutoJitTagExample"
resultMap=
"BaseResultMap"
>
<!--
<!--
...
@@ -160,13 +161,13 @@
...
@@ -160,13 +161,13 @@
enable_14, quantity_sales14, is_gt_30,
enable_14, quantity_sales14, is_gt_30,
enable_30, quantity_sales30, quantity_safe_inventory,
enable_30, quantity_sales30, quantity_safe_inventory,
level, is_eliminate, gmt_update,
level, is_eliminate, gmt_update,
group_id)
group_id
, buyer_name
)
values (#{id,jdbcType=INTEGER}, #{tagName,jdbcType=VARCHAR}, #{isGt7,jdbcType=INTEGER},
values (#{id,jdbcType=INTEGER}, #{tagName,jdbcType=VARCHAR}, #{isGt7,jdbcType=INTEGER},
#{enable7,jdbcType=INTEGER}, #{quantitySales7,jdbcType=DECIMAL}, #{isGt14,jdbcType=INTEGER},
#{enable7,jdbcType=INTEGER}, #{quantitySales7,jdbcType=DECIMAL}, #{isGt14,jdbcType=INTEGER},
#{enable14,jdbcType=INTEGER}, #{quantitySales14,jdbcType=DECIMAL}, #{isGt30,jdbcType=INTEGER},
#{enable14,jdbcType=INTEGER}, #{quantitySales14,jdbcType=DECIMAL}, #{isGt30,jdbcType=INTEGER},
#{enable30,jdbcType=INTEGER}, #{quantitySales30,jdbcType=DECIMAL}, #{quantitySafeInventory,jdbcType=DECIMAL},
#{enable30,jdbcType=INTEGER}, #{quantitySales30,jdbcType=DECIMAL}, #{quantitySafeInventory,jdbcType=DECIMAL},
#{level,jdbcType=INTEGER}, #{isEliminate,jdbcType=INTEGER}, #{gmtUpdate,jdbcType=TIMESTAMP},
#{level,jdbcType=INTEGER}, #{isEliminate,jdbcType=INTEGER}, #{gmtUpdate,jdbcType=TIMESTAMP},
#{groupId,jdbcType=INTEGER})
#{groupId,jdbcType=INTEGER}
, #{buyerName,jdbcType=VARCHAR}
)
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.bailuntec.domain.entity.DcAutoJitTag"
>
<insert
id=
"insertSelective"
parameterType=
"com.bailuntec.domain.entity.DcAutoJitTag"
>
<!--
<!--
...
@@ -223,6 +224,9 @@
...
@@ -223,6 +224,9 @@
<if
test=
"groupId != null"
>
<if
test=
"groupId != null"
>
group_id,
group_id,
</if>
</if>
<if
test=
"buyerName != null"
>
buyer_name,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
<if
test=
"id != null"
>
...
@@ -273,6 +277,9 @@
...
@@ -273,6 +277,9 @@
<if
test=
"groupId != null"
>
<if
test=
"groupId != null"
>
#{groupId,jdbcType=INTEGER},
#{groupId,jdbcType=INTEGER},
</if>
</if>
<if
test=
"buyerName != null"
>
#{buyerName,jdbcType=VARCHAR},
</if>
</trim>
</trim>
</insert>
</insert>
<select
id=
"countByExample"
parameterType=
"com.bailuntec.domain.example.DcAutoJitTagExample"
resultType=
"java.lang.Long"
>
<select
id=
"countByExample"
parameterType=
"com.bailuntec.domain.example.DcAutoJitTagExample"
resultType=
"java.lang.Long"
>
...
@@ -340,6 +347,9 @@
...
@@ -340,6 +347,9 @@
<if
test=
"record.groupId != null"
>
<if
test=
"record.groupId != null"
>
group_id = #{record.groupId,jdbcType=INTEGER},
group_id = #{record.groupId,jdbcType=INTEGER},
</if>
</if>
<if
test=
"record.buyerName != null"
>
buyer_name = #{record.buyerName,jdbcType=VARCHAR},
</if>
</set>
</set>
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
@@ -366,7 +376,8 @@
...
@@ -366,7 +376,8 @@
level = #{record.level,jdbcType=INTEGER},
level = #{record.level,jdbcType=INTEGER},
is_eliminate = #{record.isEliminate,jdbcType=INTEGER},
is_eliminate = #{record.isEliminate,jdbcType=INTEGER},
gmt_update = #{record.gmtUpdate,jdbcType=TIMESTAMP},
gmt_update = #{record.gmtUpdate,jdbcType=TIMESTAMP},
group_id = #{record.groupId,jdbcType=INTEGER}
group_id = #{record.groupId,jdbcType=INTEGER},
buyer_name = #{record.buyerName,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</if>
...
@@ -423,6 +434,9 @@
...
@@ -423,6 +434,9 @@
<if
test=
"groupId != null"
>
<if
test=
"groupId != null"
>
group_id = #{groupId,jdbcType=INTEGER},
group_id = #{groupId,jdbcType=INTEGER},
</if>
</if>
<if
test=
"buyerName != null"
>
buyer_name = #{buyerName,jdbcType=VARCHAR},
</if>
</set>
</set>
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</update>
...
@@ -446,7 +460,8 @@
...
@@ -446,7 +460,8 @@
level = #{level,jdbcType=INTEGER},
level = #{level,jdbcType=INTEGER},
is_eliminate = #{isEliminate,jdbcType=INTEGER},
is_eliminate = #{isEliminate,jdbcType=INTEGER},
gmt_update = #{gmtUpdate,jdbcType=TIMESTAMP},
gmt_update = #{gmtUpdate,jdbcType=TIMESTAMP},
group_id = #{groupId,jdbcType=INTEGER}
group_id = #{groupId,jdbcType=INTEGER},
buyer_name = #{buyerName,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</update>
<insert
id=
"upsertSelective"
parameterType=
"com.bailuntec.domain.entity.DcAutoJitTag"
>
<insert
id=
"upsertSelective"
parameterType=
"com.bailuntec.domain.entity.DcAutoJitTag"
>
...
@@ -505,6 +520,9 @@
...
@@ -505,6 +520,9 @@
<if
test=
"groupId != null"
>
<if
test=
"groupId != null"
>
group_id,
group_id,
</if>
</if>
<if
test=
"buyerName != null"
>
buyer_name,
</if>
</trim>
</trim>
values
values
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
...
@@ -556,6 +574,9 @@
...
@@ -556,6 +574,9 @@
<if
test=
"groupId != null"
>
<if
test=
"groupId != null"
>
#{groupId,jdbcType=INTEGER},
#{groupId,jdbcType=INTEGER},
</if>
</if>
<if
test=
"buyerName != null"
>
#{buyerName,jdbcType=VARCHAR},
</if>
</trim>
</trim>
on duplicate key update
on duplicate key update
<trim
suffixOverrides=
","
>
<trim
suffixOverrides=
","
>
...
@@ -607,6 +628,9 @@
...
@@ -607,6 +628,9 @@
<if
test=
"groupId != null"
>
<if
test=
"groupId != null"
>
group_id = #{groupId,jdbcType=INTEGER},
group_id = #{groupId,jdbcType=INTEGER},
</if>
</if>
<if
test=
"buyerName != null"
>
buyer_name = #{buyerName,jdbcType=VARCHAR},
</if>
</trim>
</trim>
</insert>
</insert>
<insert
id=
"upsert"
parameterType=
"com.bailuntec.domain.entity.DcAutoJitTag"
>
<insert
id=
"upsert"
parameterType=
"com.bailuntec.domain.entity.DcAutoJitTag"
>
...
@@ -618,14 +642,14 @@
...
@@ -618,14 +642,14 @@
insert into dc_auto_jit_tag
insert into dc_auto_jit_tag
(id, tag_name, is_gt_7, enable_7, quantity_sales7, is_gt_14, enable_14, quantity_sales14,
(id, tag_name, is_gt_7, enable_7, quantity_sales7, is_gt_14, enable_14, quantity_sales14,
is_gt_30, enable_30, quantity_sales30, quantity_safe_inventory, level, is_eliminate,
is_gt_30, enable_30, quantity_sales30, quantity_safe_inventory, level, is_eliminate,
gmt_update, group_id)
gmt_update, group_id
, buyer_name
)
values
values
(#{id,jdbcType=INTEGER}, #{tagName,jdbcType=VARCHAR}, #{isGt7,jdbcType=INTEGER},
(#{id,jdbcType=INTEGER}, #{tagName,jdbcType=VARCHAR}, #{isGt7,jdbcType=INTEGER},
#{enable7,jdbcType=INTEGER}, #{quantitySales7,jdbcType=DECIMAL}, #{isGt14,jdbcType=INTEGER},
#{enable7,jdbcType=INTEGER}, #{quantitySales7,jdbcType=DECIMAL}, #{isGt14,jdbcType=INTEGER},
#{enable14,jdbcType=INTEGER}, #{quantitySales14,jdbcType=DECIMAL}, #{isGt30,jdbcType=INTEGER},
#{enable14,jdbcType=INTEGER}, #{quantitySales14,jdbcType=DECIMAL}, #{isGt30,jdbcType=INTEGER},
#{enable30,jdbcType=INTEGER}, #{quantitySales30,jdbcType=DECIMAL}, #{quantitySafeInventory,jdbcType=DECIMAL},
#{enable30,jdbcType=INTEGER}, #{quantitySales30,jdbcType=DECIMAL}, #{quantitySafeInventory,jdbcType=DECIMAL},
#{level,jdbcType=INTEGER}, #{isEliminate,jdbcType=INTEGER}, #{gmtUpdate,jdbcType=TIMESTAMP},
#{level,jdbcType=INTEGER}, #{isEliminate,jdbcType=INTEGER}, #{gmtUpdate,jdbcType=TIMESTAMP},
#{groupId,jdbcType=INTEGER})
#{groupId,jdbcType=INTEGER}
, #{buyerName,jdbcType=VARCHAR}
)
on duplicate key update
on duplicate key update
id = #{id,jdbcType=INTEGER},
id = #{id,jdbcType=INTEGER},
tag_name = #{tagName,jdbcType=VARCHAR},
tag_name = #{tagName,jdbcType=VARCHAR},
...
@@ -642,7 +666,8 @@
...
@@ -642,7 +666,8 @@
level = #{level,jdbcType=INTEGER},
level = #{level,jdbcType=INTEGER},
is_eliminate = #{isEliminate,jdbcType=INTEGER},
is_eliminate = #{isEliminate,jdbcType=INTEGER},
gmt_update = #{gmtUpdate,jdbcType=TIMESTAMP},
gmt_update = #{gmtUpdate,jdbcType=TIMESTAMP},
group_id = #{groupId,jdbcType=INTEGER}
group_id = #{groupId,jdbcType=INTEGER},
buyer_name = #{buyerName,jdbcType=VARCHAR}
</insert>
</insert>
<select
id=
"selectOneByExample"
parameterType=
"com.bailuntec.domain.example.DcAutoJitTagExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectOneByExample"
parameterType=
"com.bailuntec.domain.example.DcAutoJitTagExample"
resultMap=
"BaseResultMap"
>
<!--
<!--
...
...
data-show/show-auto-turnover/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
View file @
7592468b
...
@@ -42,7 +42,6 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -42,7 +42,6 @@ public class AutoTurnoverJob extends PointJob {
@Override
@Override
public
void
executeJob
(
ShardingContext
shardingContext
,
JobPointLog
jobPointLog
)
{
public
void
executeJob
(
ShardingContext
shardingContext
,
JobPointLog
jobPointLog
)
{
Long
st
=
System
.
currentTimeMillis
();
long
count
=
getTotalCount
(
shardingContext
.
getJobParameter
());
long
count
=
getTotalCount
(
shardingContext
.
getJobParameter
());
int
totalPage
=
getTotalPage
(
count
,
jobPointLog
.
getPageSize
());
int
totalPage
=
getTotalPage
(
count
,
jobPointLog
.
getPageSize
());
/*
/*
...
@@ -89,10 +88,6 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -89,10 +88,6 @@ public class AutoTurnoverJob extends PointJob {
}
finally
{
}
finally
{
SessionUtil
.
closeSession
();
SessionUtil
.
closeSession
();
}
}
Long
st2
=
System
.
currentTimeMillis
();
if
(
st2
-
st
>
1000
)
{
System
.
out
.
println
(
" t0:"
+
String
.
valueOf
(
st2
-
st
));
}
if
(
dcBaseStockList
!=
null
&&
dcBaseStockList
.
size
()
>
0
)
{
if
(
dcBaseStockList
!=
null
&&
dcBaseStockList
.
size
()
>
0
)
{
for
(
DcBaseStock
dcBaseStock
:
dcBaseStockList
)
{
for
(
DcBaseStock
dcBaseStock
:
dcBaseStockList
)
{
try
{
try
{
...
@@ -151,7 +146,6 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -151,7 +146,6 @@ public class AutoTurnoverJob extends PointJob {
* @throws Exception
* @throws Exception
*/
*/
public
void
autoTurnoverFromStock
(
String
queryTime
,
DcBaseStock
dcBaseStock
)
throws
Exception
{
public
void
autoTurnoverFromStock
(
String
queryTime
,
DcBaseStock
dcBaseStock
)
throws
Exception
{
Long
st
=
System
.
currentTimeMillis
();
String
bailunSku
=
dcBaseStock
.
getBailunSku
();
String
bailunSku
=
dcBaseStock
.
getBailunSku
();
String
warehouseCode
=
dcBaseStock
.
getWarehouseCode
();
String
warehouseCode
=
dcBaseStock
.
getWarehouseCode
();
DcAutoSales
dcAutoSales
=
null
;
DcAutoSales
dcAutoSales
=
null
;
...
@@ -202,12 +196,7 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -202,12 +196,7 @@ public class AutoTurnoverJob extends PointJob {
}
finally
{
}
finally
{
SessionUtil
.
closeSession
();
SessionUtil
.
closeSession
();
}
}
Long
st1
=
System
.
currentTimeMillis
();
autoTurnoverUseDcAutoSales
(
bailunSku
,
warehouseCode
,
dcAutoSales
,
dcBaseStock
,
dcBaseWarehouse
,
dcAutoWarehouseweekSales
);
autoTurnoverUseDcAutoSales
(
bailunSku
,
warehouseCode
,
dcAutoSales
,
dcBaseStock
,
dcBaseWarehouse
,
dcAutoWarehouseweekSales
);
Long
st2
=
System
.
currentTimeMillis
();
if
(
st2
-
st
>
2000
)
{
System
.
out
.
println
(
"sku:"
+
bailunSku
+
" warehouse:"
+
warehouseCode
+
"st1:"
+
String
.
valueOf
(
st1
-
st
)
+
" t2:"
+
String
.
valueOf
(
st2
-
st
));
}
}
}
/*
/*
...
@@ -260,10 +249,7 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -260,10 +249,7 @@ public class AutoTurnoverJob extends PointJob {
}
}
}
}
Long
st1
=
System
.
currentTimeMillis
();
Integer
bailunFirstLevelCatagoryId
=
getBailunCatagoryId
(
turnoverSku
);
//百伦第一级分类Id, 可以为null
Integer
bailunFirstLevelCatagoryId
=
getBailunCatagoryId
(
turnoverSku
);
//百伦第一级分类Id, 可以为null
Long
st2
=
System
.
currentTimeMillis
();
System
.
out
.
println
(
"调用接口耗时:"
+
String
.
valueOf
(
st2
-
st1
));
// 获取调拨头程 + 调拨打包 + 海外仓入库天数 的配置
// 获取调拨头程 + 调拨打包 + 海外仓入库天数 的配置
DcAutoConfigDelivery
dcAutoConfigDelivery
=
getDcAutoConfigDelivery
(
bailunSku
,
warehouseCode
,
dcBaseWarehouse
);
DcAutoConfigDelivery
dcAutoConfigDelivery
=
getDcAutoConfigDelivery
(
bailunSku
,
warehouseCode
,
dcBaseWarehouse
);
//获取周转天数计算配置, 数据来源于.net同事计算的均值
//获取周转天数计算配置, 数据来源于.net同事计算的均值
...
@@ -1292,7 +1278,7 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -1292,7 +1278,7 @@ public class AutoTurnoverJob extends PointJob {
dcAutoStockUpRange
.
setWarehouseName
(
"百伦【广州-03仓】"
);
dcAutoStockUpRange
.
setWarehouseName
(
"百伦【广州-03仓】"
);
dcAutoStockUpRangeMapper
.
insertSelective
(
dcAutoStockUpRange
);
dcAutoStockUpRangeMapper
.
insertSelective
(
dcAutoStockUpRange
);
}
}
BigDecimal
saveDays
=
getSaveDays
(
dcAutoSales
,
dcAutoTurnover
,
bailunSku
,
"weightingAvgSales"
,
dcAutoStockUpRange
);
BigDecimal
saveDays
=
getSaveDays
(
dcAutoSales
,
dcAutoTurnover
,
bailunSku
,
turnoverSku
.
getBuyerName
(),
"weightingAvgSales"
,
dcAutoStockUpRange
);
saveDaysMap
.
put
(
"saveDays"
,
saveDays
);
saveDaysMap
.
put
(
"saveDays"
,
saveDays
);
dcAutoTurnover
.
setDailyWeightedSales
(
weightingAvgSales
);
dcAutoTurnover
.
setDailyWeightedSales
(
weightingAvgSales
);
weightingAvgSales
=
weightingAvgSales
.
multiply
(
saveDays
);
weightingAvgSales
=
weightingAvgSales
.
multiply
(
saveDays
);
...
@@ -2057,7 +2043,7 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -2057,7 +2043,7 @@ public class AutoTurnoverJob extends PointJob {
return
(
int
)
totalPage
;
return
(
int
)
totalPage
;
}
}
public
BigDecimal
getSaveDays
(
DcAutoSales
dcAutoSales
,
DcAutoTurnover
dcAutoTurnover
,
String
bailunSku
,
String
autoForecastDay
,
DcAutoStockUpRange
dcAutoStockUpRange
)
{
public
BigDecimal
getSaveDays
(
DcAutoSales
dcAutoSales
,
DcAutoTurnover
dcAutoTurnover
,
String
bailunSku
,
String
buyerName
,
String
autoForecastDay
,
DcAutoStockUpRange
dcAutoStockUpRange
)
{
List
<
Integer
>
historySalesList
=
JSON
.
parseObject
(
dcAutoSales
.
getHistorySalesDetails
(),
new
TypeReference
<
List
<
Integer
>>()
{
List
<
Integer
>
historySalesList
=
JSON
.
parseObject
(
dcAutoSales
.
getHistorySalesDetails
(),
new
TypeReference
<
List
<
Integer
>>()
{
});
});
/*
/*
...
@@ -2206,7 +2192,8 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -2206,7 +2192,8 @@ public class AutoTurnoverJob extends PointJob {
continue
;
continue
;
}
}
}
}
if
(
StringUtils
.
isNotBlank
(
buyerName
)
&&
StringUtils
.
isNotBlank
(
dcAutoJitTag
.
getBuyerName
())
&&
!
buyerName
.
equals
(
dcAutoJitTag
.
getBuyerName
()))
continue
;
saveDays
=
dcAutoJitTag
.
getQuantitySafeInventory
();
saveDays
=
dcAutoJitTag
.
getQuantitySafeInventory
();
if
(
"weightingAvgSales"
.
equals
(
autoForecastDay
))
{
if
(
"weightingAvgSales"
.
equals
(
autoForecastDay
))
{
DcAutoJitTagLogMapper
dcAutoJitTagLogMapper
=
SessionUtil
.
getSession
().
getMapper
(
DcAutoJitTagLogMapper
.
class
);
DcAutoJitTagLogMapper
dcAutoJitTagLogMapper
=
SessionUtil
.
getSession
().
getMapper
(
DcAutoJitTagLogMapper
.
class
);
...
...
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