Commit be66dd56 by yinyong

自动周转备货范围新增分组规则

parent ca53ec40
...@@ -116,6 +116,15 @@ public class DcAutoJitTag { ...@@ -116,6 +116,15 @@ public class DcAutoJitTag {
private LocalDateTime gmtUpdate; private LocalDateTime gmtUpdate;
/** /**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_jit_tag.group_id
*
* @mbg.generated
*/
private Integer groupId;
/**
* 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
* *
...@@ -139,6 +148,7 @@ public class DcAutoJitTag { ...@@ -139,6 +148,7 @@ public class DcAutoJitTag {
sb.append(", level=").append(level); sb.append(", level=").append(level);
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("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }
...@@ -172,7 +182,8 @@ public class DcAutoJitTag { ...@@ -172,7 +182,8 @@ public class DcAutoJitTag {
&& (this.getQuantitySafeInventory() == null ? other.getQuantitySafeInventory() == null : this.getQuantitySafeInventory().equals(other.getQuantitySafeInventory())) && (this.getQuantitySafeInventory() == null ? other.getQuantitySafeInventory() == null : this.getQuantitySafeInventory().equals(other.getQuantitySafeInventory()))
&& (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()));
} }
/** /**
...@@ -197,6 +208,7 @@ public class DcAutoJitTag { ...@@ -197,6 +208,7 @@ public class DcAutoJitTag {
result = prime * result + ((getLevel() == null) ? 0 : getLevel().hashCode()); result = prime * result + ((getLevel() == null) ? 0 : getLevel().hashCode());
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());
return result; return result;
} }
} }
\ No newline at end of file
...@@ -32,6 +32,24 @@ public class DcAutoStockUpRange { ...@@ -32,6 +32,24 @@ public class DcAutoStockUpRange {
private String warehouseCode; private String warehouseCode;
/** /**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_stock_up_range.warehouse_name
*
* @mbg.generated
*/
private String warehouseName;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_stock_up_range.group_id
*
* @mbg.generated
*/
private Integer groupId;
/**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_auto_stock_up_range * This method corresponds to the database table dc_auto_stock_up_range
* *
...@@ -46,6 +64,8 @@ public class DcAutoStockUpRange { ...@@ -46,6 +64,8 @@ public class DcAutoStockUpRange {
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", bailunSku=").append(bailunSku); sb.append(", bailunSku=").append(bailunSku);
sb.append(", warehouseCode=").append(warehouseCode); sb.append(", warehouseCode=").append(warehouseCode);
sb.append(", warehouseName=").append(warehouseName);
sb.append(", groupId=").append(groupId);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }
...@@ -70,7 +90,9 @@ public class DcAutoStockUpRange { ...@@ -70,7 +90,9 @@ public class DcAutoStockUpRange {
DcAutoStockUpRange other = (DcAutoStockUpRange) that; DcAutoStockUpRange other = (DcAutoStockUpRange) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getBailunSku() == null ? other.getBailunSku() == null : this.getBailunSku().equals(other.getBailunSku())) && (this.getBailunSku() == null ? other.getBailunSku() == null : this.getBailunSku().equals(other.getBailunSku()))
&& (this.getWarehouseCode() == null ? other.getWarehouseCode() == null : this.getWarehouseCode().equals(other.getWarehouseCode())); && (this.getWarehouseCode() == null ? other.getWarehouseCode() == null : this.getWarehouseCode().equals(other.getWarehouseCode()))
&& (this.getWarehouseName() == null ? other.getWarehouseName() == null : this.getWarehouseName().equals(other.getWarehouseName()))
&& (this.getGroupId() == null ? other.getGroupId() == null : this.getGroupId().equals(other.getGroupId()));
} }
/** /**
...@@ -86,6 +108,8 @@ public class DcAutoStockUpRange { ...@@ -86,6 +108,8 @@ public class DcAutoStockUpRange {
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getBailunSku() == null) ? 0 : getBailunSku().hashCode()); result = prime * result + ((getBailunSku() == null) ? 0 : getBailunSku().hashCode());
result = prime * result + ((getWarehouseCode() == null) ? 0 : getWarehouseCode().hashCode()); result = prime * result + ((getWarehouseCode() == null) ? 0 : getWarehouseCode().hashCode());
result = prime * result + ((getWarehouseName() == null) ? 0 : getWarehouseName().hashCode());
result = prime * result + ((getGroupId() == null) ? 0 : getGroupId().hashCode());
return result; return result;
} }
} }
\ No newline at end of file
...@@ -1100,6 +1100,66 @@ public class DcAutoJitTagExample { ...@@ -1100,6 +1100,66 @@ public class DcAutoJitTagExample {
addCriterion("gmt_update not between", value1, value2, "gmtUpdate"); addCriterion("gmt_update not between", value1, value2, "gmtUpdate");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGroupIdIsNull() {
addCriterion("group_id is null");
return (Criteria) this;
}
public Criteria andGroupIdIsNotNull() {
addCriterion("group_id is not null");
return (Criteria) this;
}
public Criteria andGroupIdEqualTo(Integer value) {
addCriterion("group_id =", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdNotEqualTo(Integer value) {
addCriterion("group_id <>", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdGreaterThan(Integer value) {
addCriterion("group_id >", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdGreaterThanOrEqualTo(Integer value) {
addCriterion("group_id >=", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdLessThan(Integer value) {
addCriterion("group_id <", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdLessThanOrEqualTo(Integer value) {
addCriterion("group_id <=", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdIn(List<Integer> values) {
addCriterion("group_id in", values, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdNotIn(List<Integer> values) {
addCriterion("group_id not in", values, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdBetween(Integer value1, Integer value2) {
addCriterion("group_id between", value1, value2, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdNotBetween(Integer value1, Integer value2) {
addCriterion("group_id not between", value1, value2, "groupId");
return (Criteria) this;
}
} }
/** /**
......
...@@ -568,6 +568,136 @@ public class DcAutoStockUpRangeExample { ...@@ -568,6 +568,136 @@ public class DcAutoStockUpRangeExample {
addCriterion("warehouse_code not between", value1, value2, "warehouseCode"); addCriterion("warehouse_code not between", value1, value2, "warehouseCode");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andWarehouseNameIsNull() {
addCriterion("warehouse_name is null");
return (Criteria) this;
}
public Criteria andWarehouseNameIsNotNull() {
addCriterion("warehouse_name is not null");
return (Criteria) this;
}
public Criteria andWarehouseNameEqualTo(String value) {
addCriterion("warehouse_name =", value, "warehouseName");
return (Criteria) this;
}
public Criteria andWarehouseNameNotEqualTo(String value) {
addCriterion("warehouse_name <>", value, "warehouseName");
return (Criteria) this;
}
public Criteria andWarehouseNameGreaterThan(String value) {
addCriterion("warehouse_name >", value, "warehouseName");
return (Criteria) this;
}
public Criteria andWarehouseNameGreaterThanOrEqualTo(String value) {
addCriterion("warehouse_name >=", value, "warehouseName");
return (Criteria) this;
}
public Criteria andWarehouseNameLessThan(String value) {
addCriterion("warehouse_name <", value, "warehouseName");
return (Criteria) this;
}
public Criteria andWarehouseNameLessThanOrEqualTo(String value) {
addCriterion("warehouse_name <=", value, "warehouseName");
return (Criteria) this;
}
public Criteria andWarehouseNameLike(String value) {
addCriterion("warehouse_name like", value, "warehouseName");
return (Criteria) this;
}
public Criteria andWarehouseNameNotLike(String value) {
addCriterion("warehouse_name not like", value, "warehouseName");
return (Criteria) this;
}
public Criteria andWarehouseNameIn(List<String> values) {
addCriterion("warehouse_name in", values, "warehouseName");
return (Criteria) this;
}
public Criteria andWarehouseNameNotIn(List<String> values) {
addCriterion("warehouse_name not in", values, "warehouseName");
return (Criteria) this;
}
public Criteria andWarehouseNameBetween(String value1, String value2) {
addCriterion("warehouse_name between", value1, value2, "warehouseName");
return (Criteria) this;
}
public Criteria andWarehouseNameNotBetween(String value1, String value2) {
addCriterion("warehouse_name not between", value1, value2, "warehouseName");
return (Criteria) this;
}
public Criteria andGroupIdIsNull() {
addCriterion("group_id is null");
return (Criteria) this;
}
public Criteria andGroupIdIsNotNull() {
addCriterion("group_id is not null");
return (Criteria) this;
}
public Criteria andGroupIdEqualTo(Integer value) {
addCriterion("group_id =", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdNotEqualTo(Integer value) {
addCriterion("group_id <>", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdGreaterThan(Integer value) {
addCriterion("group_id >", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdGreaterThanOrEqualTo(Integer value) {
addCriterion("group_id >=", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdLessThan(Integer value) {
addCriterion("group_id <", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdLessThanOrEqualTo(Integer value) {
addCriterion("group_id <=", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdIn(List<Integer> values) {
addCriterion("group_id in", values, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdNotIn(List<Integer> values) {
addCriterion("group_id not in", values, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdBetween(Integer value1, Integer value2) {
addCriterion("group_id between", value1, value2, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdNotBetween(Integer value1, Integer value2) {
addCriterion("group_id not between", value1, value2, "groupId");
return (Criteria) this;
}
} }
/** /**
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<result column="level" jdbcType="INTEGER" property="level" /> <result column="level" jdbcType="INTEGER" property="level" />
<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" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<!-- <!--
...@@ -91,7 +92,7 @@ ...@@ -91,7 +92,7 @@
This element is automatically generated by MyBatis Generator, do not modify. 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, 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 quantity_safe_inventory, level, is_eliminate, gmt_update, group_id
</sql> </sql>
<select id="selectByExample" parameterType="com.bailuntec.domain.example.DcAutoJitTagExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.bailuntec.domain.example.DcAutoJitTagExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -153,13 +154,13 @@ ...@@ -153,13 +154,13 @@
insert into dc_auto_jit_tag (id, tag_name, is_gt_7, insert into dc_auto_jit_tag (id, tag_name, is_gt_7,
enable_7, quantity_sales7, is_gt_14, enable_7, quantity_sales7, is_gt_14,
enable_14, quantity_sales14, quantity_safe_inventory, enable_14, quantity_sales14, quantity_safe_inventory,
level, is_eliminate, gmt_update level, is_eliminate, gmt_update,
) group_id)
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}, #{quantitySafeInventory,jdbcType=DECIMAL}, #{enable14,jdbcType=INTEGER}, #{quantitySales14,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})
</insert> </insert>
<insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcAutoJitTag"> <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcAutoJitTag">
<!-- <!--
...@@ -204,6 +205,9 @@ ...@@ -204,6 +205,9 @@
<if test="gmtUpdate != null"> <if test="gmtUpdate != null">
gmt_update, gmt_update,
</if> </if>
<if test="groupId != null">
group_id,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
...@@ -242,6 +246,9 @@ ...@@ -242,6 +246,9 @@
<if test="gmtUpdate != null"> <if test="gmtUpdate != null">
#{gmtUpdate,jdbcType=TIMESTAMP}, #{gmtUpdate,jdbcType=TIMESTAMP},
</if> </if>
<if test="groupId != null">
#{groupId,jdbcType=INTEGER},
</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">
...@@ -297,6 +304,9 @@ ...@@ -297,6 +304,9 @@
<if test="record.gmtUpdate != null"> <if test="record.gmtUpdate != null">
gmt_update = #{record.gmtUpdate,jdbcType=TIMESTAMP}, gmt_update = #{record.gmtUpdate,jdbcType=TIMESTAMP},
</if> </if>
<if test="record.groupId != null">
group_id = #{record.groupId,jdbcType=INTEGER},
</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" />
...@@ -319,7 +329,8 @@ ...@@ -319,7 +329,8 @@
quantity_safe_inventory = #{record.quantitySafeInventory,jdbcType=DECIMAL}, quantity_safe_inventory = #{record.quantitySafeInventory,jdbcType=DECIMAL},
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}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
...@@ -364,6 +375,9 @@ ...@@ -364,6 +375,9 @@
<if test="gmtUpdate != null"> <if test="gmtUpdate != null">
gmt_update = #{gmtUpdate,jdbcType=TIMESTAMP}, gmt_update = #{gmtUpdate,jdbcType=TIMESTAMP},
</if> </if>
<if test="groupId != null">
group_id = #{groupId,jdbcType=INTEGER},
</if>
</set> </set>
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
...@@ -383,7 +397,8 @@ ...@@ -383,7 +397,8 @@
quantity_safe_inventory = #{quantitySafeInventory,jdbcType=DECIMAL}, quantity_safe_inventory = #{quantitySafeInventory,jdbcType=DECIMAL},
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}
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">
...@@ -430,6 +445,9 @@ ...@@ -430,6 +445,9 @@
<if test="gmtUpdate != null"> <if test="gmtUpdate != null">
gmt_update, gmt_update,
</if> </if>
<if test="groupId != null">
group_id,
</if>
</trim> </trim>
values values
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -469,6 +487,9 @@ ...@@ -469,6 +487,9 @@
<if test="gmtUpdate != null"> <if test="gmtUpdate != null">
#{gmtUpdate,jdbcType=TIMESTAMP}, #{gmtUpdate,jdbcType=TIMESTAMP},
</if> </if>
<if test="groupId != null">
#{groupId,jdbcType=INTEGER},
</if>
</trim> </trim>
on duplicate key update on duplicate key update
<trim suffixOverrides=","> <trim suffixOverrides=",">
...@@ -508,6 +529,9 @@ ...@@ -508,6 +529,9 @@
<if test="gmtUpdate != null"> <if test="gmtUpdate != null">
gmt_update = #{gmtUpdate,jdbcType=TIMESTAMP}, gmt_update = #{gmtUpdate,jdbcType=TIMESTAMP},
</if> </if>
<if test="groupId != null">
group_id = #{groupId,jdbcType=INTEGER},
</if>
</trim> </trim>
</insert> </insert>
<insert id="upsert" parameterType="com.bailuntec.domain.entity.DcAutoJitTag"> <insert id="upsert" parameterType="com.bailuntec.domain.entity.DcAutoJitTag">
...@@ -518,13 +542,13 @@ ...@@ -518,13 +542,13 @@
--> -->
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,
quantity_safe_inventory, level, is_eliminate, gmt_update) quantity_safe_inventory, level, is_eliminate, gmt_update, group_id)
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}, #{quantitySafeInventory,jdbcType=DECIMAL}, #{enable14,jdbcType=INTEGER}, #{quantitySales14,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})
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},
...@@ -537,7 +561,8 @@ ...@@ -537,7 +561,8 @@
quantity_safe_inventory = #{quantitySafeInventory,jdbcType=DECIMAL}, quantity_safe_inventory = #{quantitySafeInventory,jdbcType=DECIMAL},
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}
</insert> </insert>
<select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcAutoJitTagExample" resultMap="BaseResultMap"> <select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcAutoJitTagExample" resultMap="BaseResultMap">
<!-- <!--
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
<id column="id" jdbcType="INTEGER" property="id" /> <id column="id" jdbcType="INTEGER" property="id" />
<result column="bailun_sku" jdbcType="VARCHAR" property="bailunSku" /> <result column="bailun_sku" jdbcType="VARCHAR" property="bailunSku" />
<result column="warehouse_code" jdbcType="VARCHAR" property="warehouseCode" /> <result column="warehouse_code" jdbcType="VARCHAR" property="warehouseCode" />
<result column="warehouse_name" jdbcType="VARCHAR" property="warehouseName" />
<result column="group_id" jdbcType="INTEGER" property="groupId" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<!-- <!--
...@@ -81,7 +83,7 @@ ...@@ -81,7 +83,7 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
id, bailun_sku, warehouse_code id, bailun_sku, warehouse_code, warehouse_name, group_id
</sql> </sql>
<select id="selectByExample" parameterType="com.bailuntec.domain.example.DcAutoStockUpRangeExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.bailuntec.domain.example.DcAutoStockUpRangeExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -142,10 +144,10 @@ ...@@ -142,10 +144,10 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
insert into dc_auto_stock_up_range (id, bailun_sku, warehouse_code insert into dc_auto_stock_up_range (id, bailun_sku, warehouse_code,
) warehouse_name, group_id)
values (#{id,jdbcType=INTEGER}, #{bailunSku,jdbcType=VARCHAR}, #{warehouseCode,jdbcType=VARCHAR} values (#{id,jdbcType=INTEGER}, #{bailunSku,jdbcType=VARCHAR}, #{warehouseCode,jdbcType=VARCHAR},
) #{warehouseName,jdbcType=VARCHAR}, #{groupId,jdbcType=INTEGER})
</insert> </insert>
<insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcAutoStockUpRange"> <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcAutoStockUpRange">
<!-- <!--
...@@ -163,6 +165,12 @@ ...@@ -163,6 +165,12 @@
<if test="warehouseCode != null"> <if test="warehouseCode != null">
warehouse_code, warehouse_code,
</if> </if>
<if test="warehouseName != null">
warehouse_name,
</if>
<if test="groupId != null">
group_id,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
...@@ -174,6 +182,12 @@ ...@@ -174,6 +182,12 @@
<if test="warehouseCode != null"> <if test="warehouseCode != null">
#{warehouseCode,jdbcType=VARCHAR}, #{warehouseCode,jdbcType=VARCHAR},
</if> </if>
<if test="warehouseName != null">
#{warehouseName,jdbcType=VARCHAR},
</if>
<if test="groupId != null">
#{groupId,jdbcType=INTEGER},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.bailuntec.domain.example.DcAutoStockUpRangeExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.bailuntec.domain.example.DcAutoStockUpRangeExample" resultType="java.lang.Long">
...@@ -202,6 +216,12 @@ ...@@ -202,6 +216,12 @@
<if test="record.warehouseCode != null"> <if test="record.warehouseCode != null">
warehouse_code = #{record.warehouseCode,jdbcType=VARCHAR}, warehouse_code = #{record.warehouseCode,jdbcType=VARCHAR},
</if> </if>
<if test="record.warehouseName != null">
warehouse_name = #{record.warehouseName,jdbcType=VARCHAR},
</if>
<if test="record.groupId != null">
group_id = #{record.groupId,jdbcType=INTEGER},
</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" />
...@@ -215,7 +235,9 @@ ...@@ -215,7 +235,9 @@
update dc_auto_stock_up_range update dc_auto_stock_up_range
set id = #{record.id,jdbcType=INTEGER}, set id = #{record.id,jdbcType=INTEGER},
bailun_sku = #{record.bailunSku,jdbcType=VARCHAR}, bailun_sku = #{record.bailunSku,jdbcType=VARCHAR},
warehouse_code = #{record.warehouseCode,jdbcType=VARCHAR} warehouse_code = #{record.warehouseCode,jdbcType=VARCHAR},
warehouse_name = #{record.warehouseName,jdbcType=VARCHAR},
group_id = #{record.groupId,jdbcType=INTEGER}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
...@@ -233,6 +255,12 @@ ...@@ -233,6 +255,12 @@
<if test="warehouseCode != null"> <if test="warehouseCode != null">
warehouse_code = #{warehouseCode,jdbcType=VARCHAR}, warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
</if> </if>
<if test="warehouseName != null">
warehouse_name = #{warehouseName,jdbcType=VARCHAR},
</if>
<if test="groupId != null">
group_id = #{groupId,jdbcType=INTEGER},
</if>
</set> </set>
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
...@@ -243,7 +271,9 @@ ...@@ -243,7 +271,9 @@
--> -->
update dc_auto_stock_up_range update dc_auto_stock_up_range
set bailun_sku = #{bailunSku,jdbcType=VARCHAR}, set bailun_sku = #{bailunSku,jdbcType=VARCHAR},
warehouse_code = #{warehouseCode,jdbcType=VARCHAR} warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
warehouse_name = #{warehouseName,jdbcType=VARCHAR},
group_id = #{groupId,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcAutoStockUpRange"> <insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcAutoStockUpRange">
...@@ -263,6 +293,12 @@ ...@@ -263,6 +293,12 @@
<if test="warehouseCode != null"> <if test="warehouseCode != null">
warehouse_code, warehouse_code,
</if> </if>
<if test="warehouseName != null">
warehouse_name,
</if>
<if test="groupId != null">
group_id,
</if>
</trim> </trim>
values values
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -275,6 +311,12 @@ ...@@ -275,6 +311,12 @@
<if test="warehouseCode != null"> <if test="warehouseCode != null">
#{warehouseCode,jdbcType=VARCHAR}, #{warehouseCode,jdbcType=VARCHAR},
</if> </if>
<if test="warehouseName != null">
#{warehouseName,jdbcType=VARCHAR},
</if>
<if test="groupId != null">
#{groupId,jdbcType=INTEGER},
</if>
</trim> </trim>
on duplicate key update on duplicate key update
<trim suffixOverrides=","> <trim suffixOverrides=",">
...@@ -287,6 +329,12 @@ ...@@ -287,6 +329,12 @@
<if test="warehouseCode != null"> <if test="warehouseCode != null">
warehouse_code = #{warehouseCode,jdbcType=VARCHAR}, warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
</if> </if>
<if test="warehouseName != null">
warehouse_name = #{warehouseName,jdbcType=VARCHAR},
</if>
<if test="groupId != null">
group_id = #{groupId,jdbcType=INTEGER},
</if>
</trim> </trim>
</insert> </insert>
<insert id="upsert" parameterType="com.bailuntec.domain.entity.DcAutoStockUpRange"> <insert id="upsert" parameterType="com.bailuntec.domain.entity.DcAutoStockUpRange">
...@@ -296,14 +344,16 @@ ...@@ -296,14 +344,16 @@
@project https://github.com/itfsw/mybatis-generator-plugin @project https://github.com/itfsw/mybatis-generator-plugin
--> -->
insert into dc_auto_stock_up_range insert into dc_auto_stock_up_range
(id, bailun_sku, warehouse_code) (id, bailun_sku, warehouse_code, warehouse_name, group_id)
values values
(#{id,jdbcType=INTEGER}, #{bailunSku,jdbcType=VARCHAR}, #{warehouseCode,jdbcType=VARCHAR} (#{id,jdbcType=INTEGER}, #{bailunSku,jdbcType=VARCHAR}, #{warehouseCode,jdbcType=VARCHAR},
) #{warehouseName,jdbcType=VARCHAR}, #{groupId,jdbcType=INTEGER})
on duplicate key update on duplicate key update
id = #{id,jdbcType=INTEGER}, id = #{id,jdbcType=INTEGER},
bailun_sku = #{bailunSku,jdbcType=VARCHAR}, bailun_sku = #{bailunSku,jdbcType=VARCHAR},
warehouse_code = #{warehouseCode,jdbcType=VARCHAR} warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
warehouse_name = #{warehouseName,jdbcType=VARCHAR},
group_id = #{groupId,jdbcType=INTEGER}
</insert> </insert>
<select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcAutoStockUpRangeExample" resultMap="BaseResultMap"> <select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcAutoStockUpRangeExample" resultMap="BaseResultMap">
<!-- <!--
......
...@@ -1131,7 +1131,7 @@ public class AutoTurnoverJob extends PointJob { ...@@ -1131,7 +1131,7 @@ public class AutoTurnoverJob extends PointJob {
}); });
BigDecimal weightingAvgSales = caculateWeightingAvgSales(BigDecimal.valueOf(0.3), BigDecimal.valueOf(0.3), BigDecimal.valueOf(0.4), historyThirtySalesList); BigDecimal weightingAvgSales = caculateWeightingAvgSales(BigDecimal.valueOf(0.3), BigDecimal.valueOf(0.3), BigDecimal.valueOf(0.4), historyThirtySalesList);
BigDecimal saveDays = getSaveDays(dcAutoSales, dcAutoTurnover, bailunSku, "weightingAvgSales"); BigDecimal saveDays = getSaveDays(dcAutoSales, dcAutoTurnover, bailunSku, "weightingAvgSales", dcAutoStockUpRange);
dcAutoTurnover.setDailyWeightedSales(weightingAvgSales); dcAutoTurnover.setDailyWeightedSales(weightingAvgSales);
weightingAvgSales = weightingAvgSales.multiply(saveDays); weightingAvgSales = weightingAvgSales.multiply(saveDays);
return weightingAvgSales; return weightingAvgSales;
...@@ -1843,7 +1843,7 @@ public class AutoTurnoverJob extends PointJob { ...@@ -1843,7 +1843,7 @@ public class AutoTurnoverJob extends PointJob {
return (int) totalPage; return (int) totalPage;
} }
public BigDecimal getSaveDays(DcAutoSales dcAutoSales, DcAutoTurnover dcAutoTurnover, String bailunSku, String autoForecastDay) { public BigDecimal getSaveDays(DcAutoSales dcAutoSales, DcAutoTurnover dcAutoTurnover, String bailunSku, 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>>() {
}); });
/* /*
...@@ -1874,76 +1874,82 @@ public class AutoTurnoverJob extends PointJob { ...@@ -1874,76 +1874,82 @@ public class AutoTurnoverJob extends PointJob {
BigDecimal avgHistoryFourteendaySales = BigDecimal.valueOf(historyFourteenSales.longValue()).divide(Constant.BIGDECIMAL_FOURTEEN, 3, RoundingMode.HALF_EVEN); BigDecimal avgHistoryFourteendaySales = BigDecimal.valueOf(historyFourteenSales.longValue()).divide(Constant.BIGDECIMAL_FOURTEEN, 3, RoundingMode.HALF_EVEN);
BigDecimal avgHistoryThirtydaySales = BigDecimal.valueOf(historyThirtySales.longValue()).divide(Constant.BIGDECIMAL_THIRTY, 3, RoundingMode.HALF_EVEN); BigDecimal avgHistoryThirtydaySales = BigDecimal.valueOf(historyThirtySales.longValue()).divide(Constant.BIGDECIMAL_THIRTY, 3, RoundingMode.HALF_EVEN);
List<DcAutoJitTag> dcAutoJitTags = null;
DcAutoJitTagMapper dcAutoJitTagMapper = SessionUtil.getSession().getMapper(DcAutoJitTagMapper.class); DcAutoJitTagMapper dcAutoJitTagMapper = SessionUtil.getSession().getMapper(DcAutoJitTagMapper.class);
List<DcAutoJitTag> dcAutoJitTags = dcAutoJitTagMapper.selectByExample(DcAutoJitTagExample.newAndCreateCriteria().example()); if (dcAutoStockUpRange != null) {
dcAutoJitTags = dcAutoJitTagMapper.selectByExample(DcAutoJitTagExample.newAndCreateCriteria().andGroupIdEqualTo(dcAutoStockUpRange.getGroupId()).example());
} else {
dcAutoJitTags = dcAutoJitTagMapper.selectByExample(DcAutoJitTagExample.newAndCreateCriteria().example());
}
BigDecimal saveDays = BigDecimal.ZERO; BigDecimal saveDays = BigDecimal.ZERO;
for(DcAutoJitTag dcAutoJitTag : dcAutoJitTags) { if (dcAutoJitTags != null) {
if(dcAutoJitTag.getEnable7() == 1) { for (DcAutoJitTag dcAutoJitTag : dcAutoJitTags) {
switch (dcAutoJitTag.getIsGt7()){ if (dcAutoJitTag.getEnable7() == 1) {
switch (dcAutoJitTag.getIsGt7()) {
case 1: case 1:
if(avgHistorySevendaySales.compareTo(dcAutoJitTag.getQuantitySales7()) == 1) { if (avgHistorySevendaySales.compareTo(dcAutoJitTag.getQuantitySales7()) == 1) {
break; break;
}else { } else {
continue; continue;
} }
case 2: case 2:
if(avgHistorySevendaySales.compareTo(dcAutoJitTag.getQuantitySales7()) == 0) { if (avgHistorySevendaySales.compareTo(dcAutoJitTag.getQuantitySales7()) == 0) {
break; break;
}else { } else {
continue; continue;
} }
case 3: case 3:
if(avgHistorySevendaySales.compareTo(dcAutoJitTag.getQuantitySales7()) == -1) { if (avgHistorySevendaySales.compareTo(dcAutoJitTag.getQuantitySales7()) == -1) {
break; break;
}else { } else {
continue; continue;
} }
case 4: case 4:
if(avgHistorySevendaySales.compareTo(dcAutoJitTag.getQuantitySales7()) > -1) { if (avgHistorySevendaySales.compareTo(dcAutoJitTag.getQuantitySales7()) > -1) {
break; break;
}else { } else {
continue; continue;
} }
case 5: case 5:
if(avgHistorySevendaySales.compareTo(dcAutoJitTag.getQuantitySales7()) < 1) { if (avgHistorySevendaySales.compareTo(dcAutoJitTag.getQuantitySales7()) < 1) {
break; break;
}else { } else {
continue; continue;
} }
default: default:
continue; continue;
} }
} }
if(dcAutoJitTag.getEnable14() == 1) { if (dcAutoJitTag.getEnable14() == 1) {
switch (dcAutoJitTag.getIsGt14()){ switch (dcAutoJitTag.getIsGt14()) {
case 1: case 1:
if(avgHistoryFourteendaySales.compareTo(dcAutoJitTag.getQuantitySales14()) == 1) { if (avgHistoryFourteendaySales.compareTo(dcAutoJitTag.getQuantitySales14()) == 1) {
break; break;
}else { } else {
continue; continue;
} }
case 2: case 2:
if(avgHistoryFourteendaySales.compareTo(dcAutoJitTag.getQuantitySales14()) == 0) { if (avgHistoryFourteendaySales.compareTo(dcAutoJitTag.getQuantitySales14()) == 0) {
break; break;
}else { } else {
continue; continue;
} }
case 3: case 3:
if(avgHistoryFourteendaySales.compareTo(dcAutoJitTag.getQuantitySales14()) == -1) { if (avgHistoryFourteendaySales.compareTo(dcAutoJitTag.getQuantitySales14()) == -1) {
break; break;
}else { } else {
continue; continue;
} }
case 4: case 4:
if(avgHistoryFourteendaySales.compareTo(dcAutoJitTag.getQuantitySales14()) > -1) { if (avgHistoryFourteendaySales.compareTo(dcAutoJitTag.getQuantitySales14()) > -1) {
break; break;
}else { } else {
continue; continue;
} }
case 5: case 5:
if(avgHistoryFourteendaySales.compareTo(dcAutoJitTag.getQuantitySales14()) < 1) { if (avgHistoryFourteendaySales.compareTo(dcAutoJitTag.getQuantitySales14()) < 1) {
break; break;
}else { } else {
continue; continue;
} }
default: default:
...@@ -1951,7 +1957,7 @@ public class AutoTurnoverJob extends PointJob { ...@@ -1951,7 +1957,7 @@ public class AutoTurnoverJob extends PointJob {
} }
} }
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);
DcAutoJitTagLog dcAutoJitTagLog = new DcAutoJitTagLog(); DcAutoJitTagLog dcAutoJitTagLog = new DcAutoJitTagLog();
dcAutoJitTagLog.setBailunSku(bailunSku); dcAutoJitTagLog.setBailunSku(bailunSku);
...@@ -1965,6 +1971,7 @@ public class AutoTurnoverJob extends PointJob { ...@@ -1965,6 +1971,7 @@ public class AutoTurnoverJob extends PointJob {
} }
break; break;
} }
}
return saveDays; return saveDays;
} }
} }
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