Commit 9096c47e by yinyong

数据中心--订单头程费用判断更新

parent c664ce3d
...@@ -569,7 +569,12 @@ public class OrderSyncJob extends PointJob { ...@@ -569,7 +569,12 @@ public class OrderSyncJob extends PointJob {
dcMidCostFirst = new DcMidCostFirst(); dcMidCostFirst = new DcMidCostFirst();
dcMidCostFirst.setCostFirst(bailunSkuStructure.getBailunSkuWeight().multiply(Constant.COST_FIRST_PRICE).setScale(5, RoundingMode.HALF_EVEN)); dcMidCostFirst.setCostFirst(bailunSkuStructure.getBailunSkuWeight().multiply(Constant.COST_FIRST_PRICE).setScale(5, RoundingMode.HALF_EVEN));
} }
dcBaseOmsSku.setCostFirst(dcMidCostFirst.getCostFirst()); if(dcMidCostFirst.getHasCalculation()) {
dcBaseOmsSku.setCostFirst(dcMidCostFirst.getCostFirst());
}else{
dcBaseOmsOrder.setCostFirst(BigDecimal.ZERO);
}
//GBBLJW这个仓库有些SKU是单独配置的单价 //GBBLJW这个仓库有些SKU是单独配置的单价
if ("GBBLJW".equals(dcBaseWarehouse.getWarehouseCode())) { if ("GBBLJW".equals(dcBaseWarehouse.getWarehouseCode())) {
DcBaseOmsConfigCostFirstMapper costFirstMapper = SessionUtil.getSession().getMapper(DcBaseOmsConfigCostFirstMapper.class); DcBaseOmsConfigCostFirstMapper costFirstMapper = SessionUtil.getSession().getMapper(DcBaseOmsConfigCostFirstMapper.class);
......
...@@ -43,6 +43,24 @@ public class DcMidCostFirst { ...@@ -43,6 +43,24 @@ public class DcMidCostFirst {
private String warehouseCode; private String warehouseCode;
/** /**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_mid_cost_first.company_id
*
* @mbg.generated
*/
private Integer companyId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_mid_cost_first.has_calculation
*
* @mbg.generated
*/
private Boolean hasCalculation;
/**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_mid_cost_first * This method corresponds to the database table dc_mid_cost_first
* *
...@@ -58,6 +76,8 @@ public class DcMidCostFirst { ...@@ -58,6 +76,8 @@ public class DcMidCostFirst {
sb.append(", costFirst=").append(costFirst); sb.append(", costFirst=").append(costFirst);
sb.append(", bailunSku=").append(bailunSku); sb.append(", bailunSku=").append(bailunSku);
sb.append(", warehouseCode=").append(warehouseCode); sb.append(", warehouseCode=").append(warehouseCode);
sb.append(", companyId=").append(companyId);
sb.append(", hasCalculation=").append(hasCalculation);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }
...@@ -83,7 +103,9 @@ public class DcMidCostFirst { ...@@ -83,7 +103,9 @@ public class DcMidCostFirst {
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.getCostFirst() == null ? other.getCostFirst() == null : this.getCostFirst().equals(other.getCostFirst())) && (this.getCostFirst() == null ? other.getCostFirst() == null : this.getCostFirst().equals(other.getCostFirst()))
&& (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.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
&& (this.getHasCalculation() == null ? other.getHasCalculation() == null : this.getHasCalculation().equals(other.getHasCalculation()));
} }
/** /**
...@@ -100,6 +122,8 @@ public class DcMidCostFirst { ...@@ -100,6 +122,8 @@ public class DcMidCostFirst {
result = prime * result + ((getCostFirst() == null) ? 0 : getCostFirst().hashCode()); result = prime * result + ((getCostFirst() == null) ? 0 : getCostFirst().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 + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
result = prime * result + ((getHasCalculation() == null) ? 0 : getHasCalculation().hashCode());
return result; return result;
} }
} }
\ No newline at end of file
...@@ -629,6 +629,126 @@ public class DcMidCostFirstExample { ...@@ -629,6 +629,126 @@ public class DcMidCostFirstExample {
addCriterion("warehouse_code not between", value1, value2, "warehouseCode"); addCriterion("warehouse_code not between", value1, value2, "warehouseCode");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCompanyIdIsNull() {
addCriterion("company_id is null");
return (Criteria) this;
}
public Criteria andCompanyIdIsNotNull() {
addCriterion("company_id is not null");
return (Criteria) this;
}
public Criteria andCompanyIdEqualTo(Integer value) {
addCriterion("company_id =", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotEqualTo(Integer value) {
addCriterion("company_id <>", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdGreaterThan(Integer value) {
addCriterion("company_id >", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdGreaterThanOrEqualTo(Integer value) {
addCriterion("company_id >=", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdLessThan(Integer value) {
addCriterion("company_id <", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdLessThanOrEqualTo(Integer value) {
addCriterion("company_id <=", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdIn(List<Integer> values) {
addCriterion("company_id in", values, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotIn(List<Integer> values) {
addCriterion("company_id not in", values, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdBetween(Integer value1, Integer value2) {
addCriterion("company_id between", value1, value2, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotBetween(Integer value1, Integer value2) {
addCriterion("company_id not between", value1, value2, "companyId");
return (Criteria) this;
}
public Criteria andHasCalculationIsNull() {
addCriterion("has_calculation is null");
return (Criteria) this;
}
public Criteria andHasCalculationIsNotNull() {
addCriterion("has_calculation is not null");
return (Criteria) this;
}
public Criteria andHasCalculationEqualTo(Boolean value) {
addCriterion("has_calculation =", value, "hasCalculation");
return (Criteria) this;
}
public Criteria andHasCalculationNotEqualTo(Boolean value) {
addCriterion("has_calculation <>", value, "hasCalculation");
return (Criteria) this;
}
public Criteria andHasCalculationGreaterThan(Boolean value) {
addCriterion("has_calculation >", value, "hasCalculation");
return (Criteria) this;
}
public Criteria andHasCalculationGreaterThanOrEqualTo(Boolean value) {
addCriterion("has_calculation >=", value, "hasCalculation");
return (Criteria) this;
}
public Criteria andHasCalculationLessThan(Boolean value) {
addCriterion("has_calculation <", value, "hasCalculation");
return (Criteria) this;
}
public Criteria andHasCalculationLessThanOrEqualTo(Boolean value) {
addCriterion("has_calculation <=", value, "hasCalculation");
return (Criteria) this;
}
public Criteria andHasCalculationIn(List<Boolean> values) {
addCriterion("has_calculation in", values, "hasCalculation");
return (Criteria) this;
}
public Criteria andHasCalculationNotIn(List<Boolean> values) {
addCriterion("has_calculation not in", values, "hasCalculation");
return (Criteria) this;
}
public Criteria andHasCalculationBetween(Boolean value1, Boolean value2) {
addCriterion("has_calculation between", value1, value2, "hasCalculation");
return (Criteria) this;
}
public Criteria andHasCalculationNotBetween(Boolean value1, Boolean value2) {
addCriterion("has_calculation not between", value1, value2, "hasCalculation");
return (Criteria) this;
}
} }
/** /**
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
<result column="cost_first" jdbcType="DECIMAL" property="costFirst" /> <result column="cost_first" jdbcType="DECIMAL" property="costFirst" />
<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="company_id" jdbcType="INTEGER" property="companyId" />
<result column="has_calculation" jdbcType="BIT" property="hasCalculation" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<!-- <!--
...@@ -82,7 +84,7 @@ ...@@ -82,7 +84,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, cost_first, bailun_sku, warehouse_code id, cost_first, bailun_sku, warehouse_code, company_id, has_calculation
</sql> </sql>
<select id="selectByExample" parameterType="com.bailuntec.domain.example.DcMidCostFirstExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.bailuntec.domain.example.DcMidCostFirstExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -144,9 +146,11 @@ ...@@ -144,9 +146,11 @@
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_mid_cost_first (id, cost_first, bailun_sku, insert into dc_mid_cost_first (id, cost_first, bailun_sku,
warehouse_code) warehouse_code, company_id, has_calculation
)
values (#{id,jdbcType=INTEGER}, #{costFirst,jdbcType=DECIMAL}, #{bailunSku,jdbcType=VARCHAR}, values (#{id,jdbcType=INTEGER}, #{costFirst,jdbcType=DECIMAL}, #{bailunSku,jdbcType=VARCHAR},
#{warehouseCode,jdbcType=VARCHAR}) #{warehouseCode,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{hasCalculation,jdbcType=BIT}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcMidCostFirst"> <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcMidCostFirst">
<!-- <!--
...@@ -167,6 +171,12 @@ ...@@ -167,6 +171,12 @@
<if test="warehouseCode != null"> <if test="warehouseCode != null">
warehouse_code, warehouse_code,
</if> </if>
<if test="companyId != null">
company_id,
</if>
<if test="hasCalculation != null">
has_calculation,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
...@@ -181,6 +191,12 @@ ...@@ -181,6 +191,12 @@
<if test="warehouseCode != null"> <if test="warehouseCode != null">
#{warehouseCode,jdbcType=VARCHAR}, #{warehouseCode,jdbcType=VARCHAR},
</if> </if>
<if test="companyId != null">
#{companyId,jdbcType=INTEGER},
</if>
<if test="hasCalculation != null">
#{hasCalculation,jdbcType=BIT},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.bailuntec.domain.example.DcMidCostFirstExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.bailuntec.domain.example.DcMidCostFirstExample" resultType="java.lang.Long">
...@@ -212,6 +228,12 @@ ...@@ -212,6 +228,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.companyId != null">
company_id = #{record.companyId,jdbcType=INTEGER},
</if>
<if test="record.hasCalculation != null">
has_calculation = #{record.hasCalculation,jdbcType=BIT},
</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" />
...@@ -226,7 +248,9 @@ ...@@ -226,7 +248,9 @@
set id = #{record.id,jdbcType=INTEGER}, set id = #{record.id,jdbcType=INTEGER},
cost_first = #{record.costFirst,jdbcType=DECIMAL}, cost_first = #{record.costFirst,jdbcType=DECIMAL},
bailun_sku = #{record.bailunSku,jdbcType=VARCHAR}, bailun_sku = #{record.bailunSku,jdbcType=VARCHAR},
warehouse_code = #{record.warehouseCode,jdbcType=VARCHAR} warehouse_code = #{record.warehouseCode,jdbcType=VARCHAR},
company_id = #{record.companyId,jdbcType=INTEGER},
has_calculation = #{record.hasCalculation,jdbcType=BIT}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
...@@ -247,6 +271,12 @@ ...@@ -247,6 +271,12 @@
<if test="warehouseCode != null"> <if test="warehouseCode != null">
warehouse_code = #{warehouseCode,jdbcType=VARCHAR}, warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
</if> </if>
<if test="companyId != null">
company_id = #{companyId,jdbcType=INTEGER},
</if>
<if test="hasCalculation != null">
has_calculation = #{hasCalculation,jdbcType=BIT},
</if>
</set> </set>
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
...@@ -258,7 +288,9 @@ ...@@ -258,7 +288,9 @@
update dc_mid_cost_first update dc_mid_cost_first
set cost_first = #{costFirst,jdbcType=DECIMAL}, set cost_first = #{costFirst,jdbcType=DECIMAL},
bailun_sku = #{bailunSku,jdbcType=VARCHAR}, bailun_sku = #{bailunSku,jdbcType=VARCHAR},
warehouse_code = #{warehouseCode,jdbcType=VARCHAR} warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
company_id = #{companyId,jdbcType=INTEGER},
has_calculation = #{hasCalculation,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcMidCostFirst"> <insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcMidCostFirst">
...@@ -281,6 +313,12 @@ ...@@ -281,6 +313,12 @@
<if test="warehouseCode != null"> <if test="warehouseCode != null">
warehouse_code, warehouse_code,
</if> </if>
<if test="companyId != null">
company_id,
</if>
<if test="hasCalculation != null">
has_calculation,
</if>
</trim> </trim>
values values
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -296,6 +334,12 @@ ...@@ -296,6 +334,12 @@
<if test="warehouseCode != null"> <if test="warehouseCode != null">
#{warehouseCode,jdbcType=VARCHAR}, #{warehouseCode,jdbcType=VARCHAR},
</if> </if>
<if test="companyId != null">
#{companyId,jdbcType=INTEGER},
</if>
<if test="hasCalculation != null">
#{hasCalculation,jdbcType=BIT},
</if>
</trim> </trim>
on duplicate key update on duplicate key update
<trim suffixOverrides=","> <trim suffixOverrides=",">
...@@ -311,6 +355,12 @@ ...@@ -311,6 +355,12 @@
<if test="warehouseCode != null"> <if test="warehouseCode != null">
warehouse_code = #{warehouseCode,jdbcType=VARCHAR}, warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
</if> </if>
<if test="companyId != null">
company_id = #{companyId,jdbcType=INTEGER},
</if>
<if test="hasCalculation != null">
has_calculation = #{hasCalculation,jdbcType=BIT},
</if>
</trim> </trim>
</insert> </insert>
<insert id="upsert" parameterType="com.bailuntec.domain.entity.DcMidCostFirst"> <insert id="upsert" parameterType="com.bailuntec.domain.entity.DcMidCostFirst">
...@@ -320,15 +370,18 @@ ...@@ -320,15 +370,18 @@
@project https://github.com/itfsw/mybatis-generator-plugin @project https://github.com/itfsw/mybatis-generator-plugin
--> -->
insert into dc_mid_cost_first insert into dc_mid_cost_first
(id, cost_first, bailun_sku, warehouse_code) (id, cost_first, bailun_sku, warehouse_code, company_id, has_calculation)
values values
(#{id,jdbcType=INTEGER}, #{costFirst,jdbcType=DECIMAL}, #{bailunSku,jdbcType=VARCHAR}, (#{id,jdbcType=INTEGER}, #{costFirst,jdbcType=DECIMAL}, #{bailunSku,jdbcType=VARCHAR},
#{warehouseCode,jdbcType=VARCHAR}) #{warehouseCode,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{hasCalculation,jdbcType=BIT}
)
on duplicate key update on duplicate key update
id = #{id,jdbcType=INTEGER}, id = #{id,jdbcType=INTEGER},
cost_first = #{costFirst,jdbcType=DECIMAL}, cost_first = #{costFirst,jdbcType=DECIMAL},
bailun_sku = #{bailunSku,jdbcType=VARCHAR}, bailun_sku = #{bailunSku,jdbcType=VARCHAR},
warehouse_code = #{warehouseCode,jdbcType=VARCHAR} warehouse_code = #{warehouseCode,jdbcType=VARCHAR},
company_id = #{companyId,jdbcType=INTEGER},
has_calculation = #{hasCalculation,jdbcType=BIT}
</insert> </insert>
<select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcMidCostFirstExample" resultMap="BaseResultMap"> <select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcMidCostFirstExample" resultMap="BaseResultMap">
<!-- <!--
......
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