Commit 5b174e16 by yinyong

周转--jit 备货天数配置新增30天日均匹配条件、新增日志

parent db77a037
......@@ -82,6 +82,33 @@ public class DcAutoJitTag {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_jit_tag.is_gt_30
*
* @mbg.generated
*/
private Integer isGt30;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_jit_tag.enable_30
*
* @mbg.generated
*/
private Integer enable30;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_jit_tag.quantity_sales30
*
* @mbg.generated
*/
private BigDecimal quantitySales30;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_jit_tag.quantity_safe_inventory
*
* @mbg.generated
......@@ -144,6 +171,9 @@ public class DcAutoJitTag {
sb.append(", isGt14=").append(isGt14);
sb.append(", enable14=").append(enable14);
sb.append(", quantitySales14=").append(quantitySales14);
sb.append(", isGt30=").append(isGt30);
sb.append(", enable30=").append(enable30);
sb.append(", quantitySales30=").append(quantitySales30);
sb.append(", quantitySafeInventory=").append(quantitySafeInventory);
sb.append(", level=").append(level);
sb.append(", isEliminate=").append(isEliminate);
......@@ -179,6 +209,9 @@ public class DcAutoJitTag {
&& (this.getIsGt14() == null ? other.getIsGt14() == null : this.getIsGt14().equals(other.getIsGt14()))
&& (this.getEnable14() == null ? other.getEnable14() == null : this.getEnable14().equals(other.getEnable14()))
&& (this.getQuantitySales14() == null ? other.getQuantitySales14() == null : this.getQuantitySales14().equals(other.getQuantitySales14()))
&& (this.getIsGt30() == null ? other.getIsGt30() == null : this.getIsGt30().equals(other.getIsGt30()))
&& (this.getEnable30() == null ? other.getEnable30() == null : this.getEnable30().equals(other.getEnable30()))
&& (this.getQuantitySales30() == null ? other.getQuantitySales30() == null : this.getQuantitySales30().equals(other.getQuantitySales30()))
&& (this.getQuantitySafeInventory() == null ? other.getQuantitySafeInventory() == null : this.getQuantitySafeInventory().equals(other.getQuantitySafeInventory()))
&& (this.getLevel() == null ? other.getLevel() == null : this.getLevel().equals(other.getLevel()))
&& (this.getIsEliminate() == null ? other.getIsEliminate() == null : this.getIsEliminate().equals(other.getIsEliminate()))
......@@ -204,6 +237,9 @@ public class DcAutoJitTag {
result = prime * result + ((getIsGt14() == null) ? 0 : getIsGt14().hashCode());
result = prime * result + ((getEnable14() == null) ? 0 : getEnable14().hashCode());
result = prime * result + ((getQuantitySales14() == null) ? 0 : getQuantitySales14().hashCode());
result = prime * result + ((getIsGt30() == null) ? 0 : getIsGt30().hashCode());
result = prime * result + ((getEnable30() == null) ? 0 : getEnable30().hashCode());
result = prime * result + ((getQuantitySales30() == null) ? 0 : getQuantitySales30().hashCode());
result = prime * result + ((getQuantitySafeInventory() == null) ? 0 : getQuantitySafeInventory().hashCode());
result = prime * result + ((getLevel() == null) ? 0 : getLevel().hashCode());
result = prime * result + ((getIsEliminate() == null) ? 0 : getIsEliminate().hashCode());
......
......@@ -71,6 +71,15 @@ public class DcAutoJitTagLog {
private BigDecimal quantitySales14;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_jit_tag_log.quantity_sales30
*
* @mbg.generated
*/
private BigDecimal quantitySales30;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_auto_jit_tag_log
*
......@@ -89,6 +98,7 @@ public class DcAutoJitTagLog {
sb.append(", tagJson=").append(tagJson);
sb.append(", quantitySales7=").append(quantitySales7);
sb.append(", quantitySales14=").append(quantitySales14);
sb.append(", quantitySales30=").append(quantitySales30);
sb.append("]");
return sb.toString();
}
......@@ -117,7 +127,8 @@ public class DcAutoJitTagLog {
&& (this.getTagId() == null ? other.getTagId() == null : this.getTagId().equals(other.getTagId()))
&& (this.getTagJson() == null ? other.getTagJson() == null : this.getTagJson().equals(other.getTagJson()))
&& (this.getQuantitySales7() == null ? other.getQuantitySales7() == null : this.getQuantitySales7().equals(other.getQuantitySales7()))
&& (this.getQuantitySales14() == null ? other.getQuantitySales14() == null : this.getQuantitySales14().equals(other.getQuantitySales14()));
&& (this.getQuantitySales14() == null ? other.getQuantitySales14() == null : this.getQuantitySales14().equals(other.getQuantitySales14()))
&& (this.getQuantitySales30() == null ? other.getQuantitySales30() == null : this.getQuantitySales30().equals(other.getQuantitySales30()));
}
/**
......@@ -137,6 +148,7 @@ public class DcAutoJitTagLog {
result = prime * result + ((getTagJson() == null) ? 0 : getTagJson().hashCode());
result = prime * result + ((getQuantitySales7() == null) ? 0 : getQuantitySales7().hashCode());
result = prime * result + ((getQuantitySales14() == null) ? 0 : getQuantitySales14().hashCode());
result = prime * result + ((getQuantitySales30() == null) ? 0 : getQuantitySales30().hashCode());
return result;
}
}
\ No newline at end of file
......@@ -861,6 +861,186 @@ public class DcAutoJitTagExample {
return (Criteria) this;
}
public Criteria andIsGt30IsNull() {
addCriterion("is_gt_30 is null");
return (Criteria) this;
}
public Criteria andIsGt30IsNotNull() {
addCriterion("is_gt_30 is not null");
return (Criteria) this;
}
public Criteria andIsGt30EqualTo(Integer value) {
addCriterion("is_gt_30 =", value, "isGt30");
return (Criteria) this;
}
public Criteria andIsGt30NotEqualTo(Integer value) {
addCriterion("is_gt_30 <>", value, "isGt30");
return (Criteria) this;
}
public Criteria andIsGt30GreaterThan(Integer value) {
addCriterion("is_gt_30 >", value, "isGt30");
return (Criteria) this;
}
public Criteria andIsGt30GreaterThanOrEqualTo(Integer value) {
addCriterion("is_gt_30 >=", value, "isGt30");
return (Criteria) this;
}
public Criteria andIsGt30LessThan(Integer value) {
addCriterion("is_gt_30 <", value, "isGt30");
return (Criteria) this;
}
public Criteria andIsGt30LessThanOrEqualTo(Integer value) {
addCriterion("is_gt_30 <=", value, "isGt30");
return (Criteria) this;
}
public Criteria andIsGt30In(List<Integer> values) {
addCriterion("is_gt_30 in", values, "isGt30");
return (Criteria) this;
}
public Criteria andIsGt30NotIn(List<Integer> values) {
addCriterion("is_gt_30 not in", values, "isGt30");
return (Criteria) this;
}
public Criteria andIsGt30Between(Integer value1, Integer value2) {
addCriterion("is_gt_30 between", value1, value2, "isGt30");
return (Criteria) this;
}
public Criteria andIsGt30NotBetween(Integer value1, Integer value2) {
addCriterion("is_gt_30 not between", value1, value2, "isGt30");
return (Criteria) this;
}
public Criteria andEnable30IsNull() {
addCriterion("enable_30 is null");
return (Criteria) this;
}
public Criteria andEnable30IsNotNull() {
addCriterion("enable_30 is not null");
return (Criteria) this;
}
public Criteria andEnable30EqualTo(Integer value) {
addCriterion("enable_30 =", value, "enable30");
return (Criteria) this;
}
public Criteria andEnable30NotEqualTo(Integer value) {
addCriterion("enable_30 <>", value, "enable30");
return (Criteria) this;
}
public Criteria andEnable30GreaterThan(Integer value) {
addCriterion("enable_30 >", value, "enable30");
return (Criteria) this;
}
public Criteria andEnable30GreaterThanOrEqualTo(Integer value) {
addCriterion("enable_30 >=", value, "enable30");
return (Criteria) this;
}
public Criteria andEnable30LessThan(Integer value) {
addCriterion("enable_30 <", value, "enable30");
return (Criteria) this;
}
public Criteria andEnable30LessThanOrEqualTo(Integer value) {
addCriterion("enable_30 <=", value, "enable30");
return (Criteria) this;
}
public Criteria andEnable30In(List<Integer> values) {
addCriterion("enable_30 in", values, "enable30");
return (Criteria) this;
}
public Criteria andEnable30NotIn(List<Integer> values) {
addCriterion("enable_30 not in", values, "enable30");
return (Criteria) this;
}
public Criteria andEnable30Between(Integer value1, Integer value2) {
addCriterion("enable_30 between", value1, value2, "enable30");
return (Criteria) this;
}
public Criteria andEnable30NotBetween(Integer value1, Integer value2) {
addCriterion("enable_30 not between", value1, value2, "enable30");
return (Criteria) this;
}
public Criteria andQuantitySales30IsNull() {
addCriterion("quantity_sales30 is null");
return (Criteria) this;
}
public Criteria andQuantitySales30IsNotNull() {
addCriterion("quantity_sales30 is not null");
return (Criteria) this;
}
public Criteria andQuantitySales30EqualTo(BigDecimal value) {
addCriterion("quantity_sales30 =", value, "quantitySales30");
return (Criteria) this;
}
public Criteria andQuantitySales30NotEqualTo(BigDecimal value) {
addCriterion("quantity_sales30 <>", value, "quantitySales30");
return (Criteria) this;
}
public Criteria andQuantitySales30GreaterThan(BigDecimal value) {
addCriterion("quantity_sales30 >", value, "quantitySales30");
return (Criteria) this;
}
public Criteria andQuantitySales30GreaterThanOrEqualTo(BigDecimal value) {
addCriterion("quantity_sales30 >=", value, "quantitySales30");
return (Criteria) this;
}
public Criteria andQuantitySales30LessThan(BigDecimal value) {
addCriterion("quantity_sales30 <", value, "quantitySales30");
return (Criteria) this;
}
public Criteria andQuantitySales30LessThanOrEqualTo(BigDecimal value) {
addCriterion("quantity_sales30 <=", value, "quantitySales30");
return (Criteria) this;
}
public Criteria andQuantitySales30In(List<BigDecimal> values) {
addCriterion("quantity_sales30 in", values, "quantitySales30");
return (Criteria) this;
}
public Criteria andQuantitySales30NotIn(List<BigDecimal> values) {
addCriterion("quantity_sales30 not in", values, "quantitySales30");
return (Criteria) this;
}
public Criteria andQuantitySales30Between(BigDecimal value1, BigDecimal value2) {
addCriterion("quantity_sales30 between", value1, value2, "quantitySales30");
return (Criteria) this;
}
public Criteria andQuantitySales30NotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("quantity_sales30 not between", value1, value2, "quantitySales30");
return (Criteria) this;
}
public Criteria andQuantitySafeInventoryIsNull() {
addCriterion("quantity_safe_inventory is null");
return (Criteria) this;
......
......@@ -810,6 +810,66 @@ public class DcAutoJitTagLogExample {
addCriterion("quantity_sales14 not between", value1, value2, "quantitySales14");
return (Criteria) this;
}
public Criteria andQuantitySales30IsNull() {
addCriterion("quantity_sales30 is null");
return (Criteria) this;
}
public Criteria andQuantitySales30IsNotNull() {
addCriterion("quantity_sales30 is not null");
return (Criteria) this;
}
public Criteria andQuantitySales30EqualTo(BigDecimal value) {
addCriterion("quantity_sales30 =", value, "quantitySales30");
return (Criteria) this;
}
public Criteria andQuantitySales30NotEqualTo(BigDecimal value) {
addCriterion("quantity_sales30 <>", value, "quantitySales30");
return (Criteria) this;
}
public Criteria andQuantitySales30GreaterThan(BigDecimal value) {
addCriterion("quantity_sales30 >", value, "quantitySales30");
return (Criteria) this;
}
public Criteria andQuantitySales30GreaterThanOrEqualTo(BigDecimal value) {
addCriterion("quantity_sales30 >=", value, "quantitySales30");
return (Criteria) this;
}
public Criteria andQuantitySales30LessThan(BigDecimal value) {
addCriterion("quantity_sales30 <", value, "quantitySales30");
return (Criteria) this;
}
public Criteria andQuantitySales30LessThanOrEqualTo(BigDecimal value) {
addCriterion("quantity_sales30 <=", value, "quantitySales30");
return (Criteria) this;
}
public Criteria andQuantitySales30In(List<BigDecimal> values) {
addCriterion("quantity_sales30 in", values, "quantitySales30");
return (Criteria) this;
}
public Criteria andQuantitySales30NotIn(List<BigDecimal> values) {
addCriterion("quantity_sales30 not in", values, "quantitySales30");
return (Criteria) this;
}
public Criteria andQuantitySales30Between(BigDecimal value1, BigDecimal value2) {
addCriterion("quantity_sales30 between", value1, value2, "quantitySales30");
return (Criteria) this;
}
public Criteria andQuantitySales30NotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("quantity_sales30 not between", value1, value2, "quantitySales30");
return (Criteria) this;
}
}
/**
......
......@@ -13,6 +13,7 @@
<result column="tag_json" jdbcType="VARCHAR" property="tagJson" />
<result column="quantity_sales7" jdbcType="DECIMAL" property="quantitySales7" />
<result column="quantity_sales14" jdbcType="DECIMAL" property="quantitySales14" />
<result column="quantity_sales30" jdbcType="DECIMAL" property="quantitySales30" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
......@@ -85,7 +86,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, bailun_sku, date, tag_id, tag_json, quantity_sales7, quantity_sales14
id, bailun_sku, date, tag_id, tag_json, quantity_sales7, quantity_sales14, quantity_sales30
</sql>
<select id="selectByExample" parameterType="com.bailuntec.domain.example.DcAutoJitTagLogExample" resultMap="BaseResultMap">
<!--
......@@ -148,10 +149,10 @@
-->
insert into dc_auto_jit_tag_log (id, bailun_sku, date,
tag_id, tag_json, quantity_sales7,
quantity_sales14)
quantity_sales14, quantity_sales30)
values (#{id,jdbcType=INTEGER}, #{bailunSku,jdbcType=VARCHAR}, #{date,jdbcType=DATE},
#{tagId,jdbcType=INTEGER}, #{tagJson,jdbcType=VARCHAR}, #{quantitySales7,jdbcType=DECIMAL},
#{quantitySales14,jdbcType=DECIMAL})
#{quantitySales14,jdbcType=DECIMAL}, #{quantitySales30,jdbcType=DECIMAL})
</insert>
<insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcAutoJitTagLog">
<!--
......@@ -181,6 +182,9 @@
<if test="quantitySales14 != null">
quantity_sales14,
</if>
<if test="quantitySales30 != null">
quantity_sales30,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
......@@ -204,6 +208,9 @@
<if test="quantitySales14 != null">
#{quantitySales14,jdbcType=DECIMAL},
</if>
<if test="quantitySales30 != null">
#{quantitySales30,jdbcType=DECIMAL},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.bailuntec.domain.example.DcAutoJitTagLogExample" resultType="java.lang.Long">
......@@ -244,6 +251,9 @@
<if test="record.quantitySales14 != null">
quantity_sales14 = #{record.quantitySales14,jdbcType=DECIMAL},
</if>
<if test="record.quantitySales30 != null">
quantity_sales30 = #{record.quantitySales30,jdbcType=DECIMAL},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
......@@ -261,7 +271,8 @@
tag_id = #{record.tagId,jdbcType=INTEGER},
tag_json = #{record.tagJson,jdbcType=VARCHAR},
quantity_sales7 = #{record.quantitySales7,jdbcType=DECIMAL},
quantity_sales14 = #{record.quantitySales14,jdbcType=DECIMAL}
quantity_sales14 = #{record.quantitySales14,jdbcType=DECIMAL},
quantity_sales30 = #{record.quantitySales30,jdbcType=DECIMAL}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -291,6 +302,9 @@
<if test="quantitySales14 != null">
quantity_sales14 = #{quantitySales14,jdbcType=DECIMAL},
</if>
<if test="quantitySales30 != null">
quantity_sales30 = #{quantitySales30,jdbcType=DECIMAL},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
......@@ -305,7 +319,8 @@
tag_id = #{tagId,jdbcType=INTEGER},
tag_json = #{tagJson,jdbcType=VARCHAR},
quantity_sales7 = #{quantitySales7,jdbcType=DECIMAL},
quantity_sales14 = #{quantitySales14,jdbcType=DECIMAL}
quantity_sales14 = #{quantitySales14,jdbcType=DECIMAL},
quantity_sales30 = #{quantitySales30,jdbcType=DECIMAL}
where id = #{id,jdbcType=INTEGER}
</update>
<insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcAutoJitTagLog">
......@@ -337,6 +352,9 @@
<if test="quantitySales14 != null">
quantity_sales14,
</if>
<if test="quantitySales30 != null">
quantity_sales30,
</if>
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
......@@ -361,6 +379,9 @@
<if test="quantitySales14 != null">
#{quantitySales14,jdbcType=DECIMAL},
</if>
<if test="quantitySales30 != null">
#{quantitySales30,jdbcType=DECIMAL},
</if>
</trim>
on duplicate key update
<trim suffixOverrides=",">
......@@ -385,6 +406,9 @@
<if test="quantitySales14 != null">
quantity_sales14 = #{quantitySales14,jdbcType=DECIMAL},
</if>
<if test="quantitySales30 != null">
quantity_sales30 = #{quantitySales30,jdbcType=DECIMAL},
</if>
</trim>
</insert>
<insert id="upsert" parameterType="com.bailuntec.domain.entity.DcAutoJitTagLog">
......@@ -394,11 +418,12 @@
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into dc_auto_jit_tag_log
(id, bailun_sku, date, tag_id, tag_json, quantity_sales7, quantity_sales14)
(id, bailun_sku, date, tag_id, tag_json, quantity_sales7, quantity_sales14, quantity_sales30
)
values
(#{id,jdbcType=INTEGER}, #{bailunSku,jdbcType=VARCHAR}, #{date,jdbcType=DATE}, #{tagId,jdbcType=INTEGER},
#{tagJson,jdbcType=VARCHAR}, #{quantitySales7,jdbcType=DECIMAL}, #{quantitySales14,jdbcType=DECIMAL}
)
#{tagJson,jdbcType=VARCHAR}, #{quantitySales7,jdbcType=DECIMAL}, #{quantitySales14,jdbcType=DECIMAL},
#{quantitySales30,jdbcType=DECIMAL})
on duplicate key update
id = #{id,jdbcType=INTEGER},
bailun_sku = #{bailunSku,jdbcType=VARCHAR},
......@@ -406,7 +431,8 @@
tag_id = #{tagId,jdbcType=INTEGER},
tag_json = #{tagJson,jdbcType=VARCHAR},
quantity_sales7 = #{quantitySales7,jdbcType=DECIMAL},
quantity_sales14 = #{quantitySales14,jdbcType=DECIMAL}
quantity_sales14 = #{quantitySales14,jdbcType=DECIMAL},
quantity_sales30 = #{quantitySales30,jdbcType=DECIMAL}
</insert>
<select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcAutoJitTagLogExample" resultMap="BaseResultMap">
<!--
......
......@@ -14,6 +14,9 @@
<result column="is_gt_14" jdbcType="INTEGER" property="isGt14" />
<result column="enable_14" jdbcType="INTEGER" property="enable14" />
<result column="quantity_sales14" jdbcType="DECIMAL" property="quantitySales14" />
<result column="is_gt_30" jdbcType="INTEGER" property="isGt30" />
<result column="enable_30" jdbcType="INTEGER" property="enable30" />
<result column="quantity_sales30" jdbcType="DECIMAL" property="quantitySales30" />
<result column="quantity_safe_inventory" jdbcType="DECIMAL" property="quantitySafeInventory" />
<result column="level" jdbcType="INTEGER" property="level" />
<result column="is_eliminate" jdbcType="INTEGER" property="isEliminate" />
......@@ -92,7 +95,8 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, tag_name, is_gt_7, enable_7, quantity_sales7, is_gt_14, enable_14, quantity_sales14,
quantity_safe_inventory, level, is_eliminate, gmt_update, group_id
is_gt_30, enable_30, quantity_sales30, quantity_safe_inventory, level, is_eliminate,
gmt_update, group_id
</sql>
<select id="selectByExample" parameterType="com.bailuntec.domain.example.DcAutoJitTagExample" resultMap="BaseResultMap">
<!--
......@@ -153,12 +157,14 @@
-->
insert into dc_auto_jit_tag (id, tag_name, is_gt_7,
enable_7, quantity_sales7, is_gt_14,
enable_14, quantity_sales14, quantity_safe_inventory,
enable_14, quantity_sales14, is_gt_30,
enable_30, quantity_sales30, quantity_safe_inventory,
level, is_eliminate, gmt_update,
group_id)
values (#{id,jdbcType=INTEGER}, #{tagName,jdbcType=VARCHAR}, #{isGt7,jdbcType=INTEGER},
#{enable7,jdbcType=INTEGER}, #{quantitySales7,jdbcType=DECIMAL}, #{isGt14,jdbcType=INTEGER},
#{enable14,jdbcType=INTEGER}, #{quantitySales14,jdbcType=DECIMAL}, #{quantitySafeInventory,jdbcType=DECIMAL},
#{enable14,jdbcType=INTEGER}, #{quantitySales14,jdbcType=DECIMAL}, #{isGt30,jdbcType=INTEGER},
#{enable30,jdbcType=INTEGER}, #{quantitySales30,jdbcType=DECIMAL}, #{quantitySafeInventory,jdbcType=DECIMAL},
#{level,jdbcType=INTEGER}, #{isEliminate,jdbcType=INTEGER}, #{gmtUpdate,jdbcType=TIMESTAMP},
#{groupId,jdbcType=INTEGER})
</insert>
......@@ -193,6 +199,15 @@
<if test="quantitySales14 != null">
quantity_sales14,
</if>
<if test="isGt30 != null">
is_gt_30,
</if>
<if test="enable30 != null">
enable_30,
</if>
<if test="quantitySales30 != null">
quantity_sales30,
</if>
<if test="quantitySafeInventory != null">
quantity_safe_inventory,
</if>
......@@ -234,6 +249,15 @@
<if test="quantitySales14 != null">
#{quantitySales14,jdbcType=DECIMAL},
</if>
<if test="isGt30 != null">
#{isGt30,jdbcType=INTEGER},
</if>
<if test="enable30 != null">
#{enable30,jdbcType=INTEGER},
</if>
<if test="quantitySales30 != null">
#{quantitySales30,jdbcType=DECIMAL},
</if>
<if test="quantitySafeInventory != null">
#{quantitySafeInventory,jdbcType=DECIMAL},
</if>
......@@ -292,6 +316,15 @@
<if test="record.quantitySales14 != null">
quantity_sales14 = #{record.quantitySales14,jdbcType=DECIMAL},
</if>
<if test="record.isGt30 != null">
is_gt_30 = #{record.isGt30,jdbcType=INTEGER},
</if>
<if test="record.enable30 != null">
enable_30 = #{record.enable30,jdbcType=INTEGER},
</if>
<if test="record.quantitySales30 != null">
quantity_sales30 = #{record.quantitySales30,jdbcType=DECIMAL},
</if>
<if test="record.quantitySafeInventory != null">
quantity_safe_inventory = #{record.quantitySafeInventory,jdbcType=DECIMAL},
</if>
......@@ -326,6 +359,9 @@
is_gt_14 = #{record.isGt14,jdbcType=INTEGER},
enable_14 = #{record.enable14,jdbcType=INTEGER},
quantity_sales14 = #{record.quantitySales14,jdbcType=DECIMAL},
is_gt_30 = #{record.isGt30,jdbcType=INTEGER},
enable_30 = #{record.enable30,jdbcType=INTEGER},
quantity_sales30 = #{record.quantitySales30,jdbcType=DECIMAL},
quantity_safe_inventory = #{record.quantitySafeInventory,jdbcType=DECIMAL},
level = #{record.level,jdbcType=INTEGER},
is_eliminate = #{record.isEliminate,jdbcType=INTEGER},
......@@ -363,6 +399,15 @@
<if test="quantitySales14 != null">
quantity_sales14 = #{quantitySales14,jdbcType=DECIMAL},
</if>
<if test="isGt30 != null">
is_gt_30 = #{isGt30,jdbcType=INTEGER},
</if>
<if test="enable30 != null">
enable_30 = #{enable30,jdbcType=INTEGER},
</if>
<if test="quantitySales30 != null">
quantity_sales30 = #{quantitySales30,jdbcType=DECIMAL},
</if>
<if test="quantitySafeInventory != null">
quantity_safe_inventory = #{quantitySafeInventory,jdbcType=DECIMAL},
</if>
......@@ -394,6 +439,9 @@
is_gt_14 = #{isGt14,jdbcType=INTEGER},
enable_14 = #{enable14,jdbcType=INTEGER},
quantity_sales14 = #{quantitySales14,jdbcType=DECIMAL},
is_gt_30 = #{isGt30,jdbcType=INTEGER},
enable_30 = #{enable30,jdbcType=INTEGER},
quantity_sales30 = #{quantitySales30,jdbcType=DECIMAL},
quantity_safe_inventory = #{quantitySafeInventory,jdbcType=DECIMAL},
level = #{level,jdbcType=INTEGER},
is_eliminate = #{isEliminate,jdbcType=INTEGER},
......@@ -433,6 +481,15 @@
<if test="quantitySales14 != null">
quantity_sales14,
</if>
<if test="isGt30 != null">
is_gt_30,
</if>
<if test="enable30 != null">
enable_30,
</if>
<if test="quantitySales30 != null">
quantity_sales30,
</if>
<if test="quantitySafeInventory != null">
quantity_safe_inventory,
</if>
......@@ -475,6 +532,15 @@
<if test="quantitySales14 != null">
#{quantitySales14,jdbcType=DECIMAL},
</if>
<if test="isGt30 != null">
#{isGt30,jdbcType=INTEGER},
</if>
<if test="enable30 != null">
#{enable30,jdbcType=INTEGER},
</if>
<if test="quantitySales30 != null">
#{quantitySales30,jdbcType=DECIMAL},
</if>
<if test="quantitySafeInventory != null">
#{quantitySafeInventory,jdbcType=DECIMAL},
</if>
......@@ -517,6 +583,15 @@
<if test="quantitySales14 != null">
quantity_sales14 = #{quantitySales14,jdbcType=DECIMAL},
</if>
<if test="isGt30 != null">
is_gt_30 = #{isGt30,jdbcType=INTEGER},
</if>
<if test="enable30 != null">
enable_30 = #{enable30,jdbcType=INTEGER},
</if>
<if test="quantitySales30 != null">
quantity_sales30 = #{quantitySales30,jdbcType=DECIMAL},
</if>
<if test="quantitySafeInventory != null">
quantity_safe_inventory = #{quantitySafeInventory,jdbcType=DECIMAL},
</if>
......@@ -542,11 +617,13 @@
-->
insert into dc_auto_jit_tag
(id, tag_name, is_gt_7, enable_7, quantity_sales7, is_gt_14, enable_14, quantity_sales14,
quantity_safe_inventory, level, is_eliminate, gmt_update, group_id)
is_gt_30, enable_30, quantity_sales30, quantity_safe_inventory, level, is_eliminate,
gmt_update, group_id)
values
(#{id,jdbcType=INTEGER}, #{tagName,jdbcType=VARCHAR}, #{isGt7,jdbcType=INTEGER},
#{enable7,jdbcType=INTEGER}, #{quantitySales7,jdbcType=DECIMAL}, #{isGt14,jdbcType=INTEGER},
#{enable14,jdbcType=INTEGER}, #{quantitySales14,jdbcType=DECIMAL}, #{quantitySafeInventory,jdbcType=DECIMAL},
#{enable14,jdbcType=INTEGER}, #{quantitySales14,jdbcType=DECIMAL}, #{isGt30,jdbcType=INTEGER},
#{enable30,jdbcType=INTEGER}, #{quantitySales30,jdbcType=DECIMAL}, #{quantitySafeInventory,jdbcType=DECIMAL},
#{level,jdbcType=INTEGER}, #{isEliminate,jdbcType=INTEGER}, #{gmtUpdate,jdbcType=TIMESTAMP},
#{groupId,jdbcType=INTEGER})
on duplicate key update
......@@ -558,6 +635,9 @@
is_gt_14 = #{isGt14,jdbcType=INTEGER},
enable_14 = #{enable14,jdbcType=INTEGER},
quantity_sales14 = #{quantitySales14,jdbcType=DECIMAL},
is_gt_30 = #{isGt30,jdbcType=INTEGER},
enable_30 = #{enable30,jdbcType=INTEGER},
quantity_sales30 = #{quantitySales30,jdbcType=DECIMAL},
quantity_safe_inventory = #{quantitySafeInventory,jdbcType=DECIMAL},
level = #{level,jdbcType=INTEGER},
is_eliminate = #{isEliminate,jdbcType=INTEGER},
......
......@@ -2158,6 +2158,43 @@ public class AutoTurnoverJob extends PointJob {
continue;
}
}
if(dcAutoJitTag.getEnable30() == 1) {
switch (dcAutoJitTag.getIsGt30()) {
case 1:
if (avgHistoryThirtydaySales.compareTo(dcAutoJitTag.getQuantitySales30()) == 1) {
break;
} else {
continue;
}
case 2:
if (avgHistoryThirtydaySales.compareTo(dcAutoJitTag.getQuantitySales30()) == 0) {
break;
} else {
continue;
}
case 3:
if (avgHistoryThirtydaySales.compareTo(dcAutoJitTag.getQuantitySales30()) == -1) {
break;
} else {
continue;
}
case 4:
if (avgHistoryThirtydaySales.compareTo(dcAutoJitTag.getQuantitySales30()) > -1) {
break;
} else {
continue;
}
case 5:
if (avgHistoryThirtydaySales.compareTo(dcAutoJitTag.getQuantitySales30()) < 1) {
break;
} else {
continue;
}
default:
continue;
}
}
saveDays = dcAutoJitTag.getQuantitySafeInventory();
if ("weightingAvgSales".equals(autoForecastDay)) {
DcAutoJitTagLogMapper dcAutoJitTagLogMapper = SessionUtil.getSession().getMapper(DcAutoJitTagLogMapper.class);
......@@ -2166,6 +2203,7 @@ public class AutoTurnoverJob extends PointJob {
dcAutoJitTagLog.setDate(LocalDate.now());
dcAutoJitTagLog.setQuantitySales7(avgHistorySevendaySales);
dcAutoJitTagLog.setQuantitySales14(avgHistoryFourteendaySales);
dcAutoJitTagLog.setQuantitySales30(avgHistoryThirtydaySales);
dcAutoJitTagLog.setTagId(dcAutoJitTag.getId());
dcAutoJitTagLog.setTagJson(JSONObject.toJSONString(dcAutoJitTag));
dcAutoJitTagLogMapper.upsertSelective(dcAutoJitTagLog);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment