给单据明细增加采购单价字段
This commit is contained in:
@@ -22,6 +22,8 @@ public class DepotItem {
|
||||
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
private BigDecimal purchaseUnitPrice;
|
||||
|
||||
private BigDecimal taxUnitPrice;
|
||||
|
||||
private BigDecimal allPrice;
|
||||
@@ -124,6 +126,14 @@ public class DepotItem {
|
||||
this.unitPrice = unitPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getPurchaseUnitPrice() {
|
||||
return purchaseUnitPrice;
|
||||
}
|
||||
|
||||
public void setPurchaseUnitPrice(BigDecimal purchaseUnitPrice) {
|
||||
this.purchaseUnitPrice = purchaseUnitPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getTaxUnitPrice() {
|
||||
return taxUnitPrice;
|
||||
}
|
||||
|
||||
@@ -666,6 +666,66 @@ public class DepotItemExample {
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPurchaseUnitPriceIsNull() {
|
||||
addCriterion("purchase_unit_price is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPurchaseUnitPriceIsNotNull() {
|
||||
addCriterion("purchase_unit_price is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPurchaseUnitPriceEqualTo(BigDecimal value) {
|
||||
addCriterion("purchase_unit_price =", value, "purchaseUnitPrice");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPurchaseUnitPriceNotEqualTo(BigDecimal value) {
|
||||
addCriterion("purchase_unit_price <>", value, "purchaseUnitPrice");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPurchaseUnitPriceGreaterThan(BigDecimal value) {
|
||||
addCriterion("purchase_unit_price >", value, "purchaseUnitPrice");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPurchaseUnitPriceGreaterThanOrEqualTo(BigDecimal value) {
|
||||
addCriterion("purchase_unit_price >=", value, "purchaseUnitPrice");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPurchaseUnitPriceLessThan(BigDecimal value) {
|
||||
addCriterion("purchase_unit_price <", value, "purchaseUnitPrice");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPurchaseUnitPriceLessThanOrEqualTo(BigDecimal value) {
|
||||
addCriterion("purchase_unit_price <=", value, "purchaseUnitPrice");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPurchaseUnitPriceIn(List<BigDecimal> values) {
|
||||
addCriterion("purchase_unit_price in", values, "purchaseUnitPrice");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPurchaseUnitPriceNotIn(List<BigDecimal> values) {
|
||||
addCriterion("purchase_unit_price not in", values, "purchaseUnitPrice");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPurchaseUnitPriceBetween(BigDecimal value1, BigDecimal value2) {
|
||||
addCriterion("purchase_unit_price between", value1, value2, "purchaseUnitPrice");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPurchaseUnitPriceNotBetween(BigDecimal value1, BigDecimal value2) {
|
||||
addCriterion("purchase_unit_price not between", value1, value2, "purchaseUnitPrice");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTaxUnitPriceIsNull() {
|
||||
addCriterion("tax_unit_price is null");
|
||||
return (Criteria) this;
|
||||
|
||||
@@ -525,6 +525,11 @@ public class DepotItemService {
|
||||
}
|
||||
}
|
||||
}
|
||||
//如果是销售出库单则给采购单价字段赋值
|
||||
if(BusinessConstants.DEPOTHEAD_TYPE_OUT.equals(depotHead.getType()) &&
|
||||
BusinessConstants.SUB_TYPE_SALES.equals(depotHead.getSubType())) {
|
||||
depotItem.setPurchaseUnitPrice(materialExtend.getPurchaseDecimal());
|
||||
}
|
||||
if (StringUtil.isExist(rowObj.get("taxUnitPrice"))) {
|
||||
depotItem.setTaxUnitPrice(rowObj.getBigDecimal("taxUnitPrice"));
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<result column="oper_number" jdbcType="DECIMAL" property="operNumber" />
|
||||
<result column="basic_number" jdbcType="DECIMAL" property="basicNumber" />
|
||||
<result column="unit_price" jdbcType="DECIMAL" property="unitPrice" />
|
||||
<result column="purchase_unit_price" jdbcType="DECIMAL" property="purchaseUnitPrice" />
|
||||
<result column="tax_unit_price" jdbcType="DECIMAL" property="taxUnitPrice" />
|
||||
<result column="all_price" jdbcType="DECIMAL" property="allPrice" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
@@ -87,9 +88,9 @@
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, header_id, material_id, material_extend_id, material_unit, sku, oper_number,
|
||||
basic_number, unit_price, tax_unit_price, all_price, remark, depot_id, another_depot_id,
|
||||
tax_rate, tax_money, tax_last_money, material_type, sn_list, batch_number, expiration_date,
|
||||
link_id, tenant_id, delete_flag
|
||||
basic_number, unit_price, purchase_unit_price, tax_unit_price, all_price, remark,
|
||||
depot_id, another_depot_id, tax_rate, tax_money, tax_last_money, material_type, sn_list,
|
||||
batch_number, expiration_date, link_id, tenant_id, delete_flag
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="BaseResultMap">
|
||||
select
|
||||
@@ -125,21 +126,21 @@
|
||||
insert into jsh_depot_item (id, header_id, material_id,
|
||||
material_extend_id, material_unit, sku,
|
||||
oper_number, basic_number, unit_price,
|
||||
tax_unit_price, all_price, remark,
|
||||
depot_id, another_depot_id, tax_rate,
|
||||
tax_money, tax_last_money, material_type,
|
||||
sn_list, batch_number, expiration_date,
|
||||
link_id, tenant_id, delete_flag
|
||||
)
|
||||
purchase_unit_price, tax_unit_price, all_price,
|
||||
remark, depot_id, another_depot_id,
|
||||
tax_rate, tax_money, tax_last_money,
|
||||
material_type, sn_list, batch_number,
|
||||
expiration_date, link_id, tenant_id,
|
||||
delete_flag)
|
||||
values (#{id,jdbcType=BIGINT}, #{headerId,jdbcType=BIGINT}, #{materialId,jdbcType=BIGINT},
|
||||
#{materialExtendId,jdbcType=BIGINT}, #{materialUnit,jdbcType=VARCHAR}, #{sku,jdbcType=VARCHAR},
|
||||
#{operNumber,jdbcType=DECIMAL}, #{basicNumber,jdbcType=DECIMAL}, #{unitPrice,jdbcType=DECIMAL},
|
||||
#{taxUnitPrice,jdbcType=DECIMAL}, #{allPrice,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR},
|
||||
#{depotId,jdbcType=BIGINT}, #{anotherDepotId,jdbcType=BIGINT}, #{taxRate,jdbcType=DECIMAL},
|
||||
#{taxMoney,jdbcType=DECIMAL}, #{taxLastMoney,jdbcType=DECIMAL}, #{materialType,jdbcType=VARCHAR},
|
||||
#{snList,jdbcType=VARCHAR}, #{batchNumber,jdbcType=VARCHAR}, #{expirationDate,jdbcType=TIMESTAMP},
|
||||
#{linkId,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
|
||||
)
|
||||
#{purchaseUnitPrice,jdbcType=DECIMAL}, #{taxUnitPrice,jdbcType=DECIMAL}, #{allPrice,jdbcType=DECIMAL},
|
||||
#{remark,jdbcType=VARCHAR}, #{depotId,jdbcType=BIGINT}, #{anotherDepotId,jdbcType=BIGINT},
|
||||
#{taxRate,jdbcType=DECIMAL}, #{taxMoney,jdbcType=DECIMAL}, #{taxLastMoney,jdbcType=DECIMAL},
|
||||
#{materialType,jdbcType=VARCHAR}, #{snList,jdbcType=VARCHAR}, #{batchNumber,jdbcType=VARCHAR},
|
||||
#{expirationDate,jdbcType=TIMESTAMP}, #{linkId,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT},
|
||||
#{deleteFlag,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.DepotItem">
|
||||
insert into jsh_depot_item
|
||||
@@ -171,6 +172,9 @@
|
||||
<if test="unitPrice != null">
|
||||
unit_price,
|
||||
</if>
|
||||
<if test="purchaseUnitPrice != null">
|
||||
purchase_unit_price,
|
||||
</if>
|
||||
<if test="taxUnitPrice != null">
|
||||
tax_unit_price,
|
||||
</if>
|
||||
@@ -245,6 +249,9 @@
|
||||
<if test="unitPrice != null">
|
||||
#{unitPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="purchaseUnitPrice != null">
|
||||
#{purchaseUnitPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="taxUnitPrice != null">
|
||||
#{taxUnitPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
@@ -328,6 +335,9 @@
|
||||
<if test="record.unitPrice != null">
|
||||
unit_price = #{record.unitPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="record.purchaseUnitPrice != null">
|
||||
purchase_unit_price = #{record.purchaseUnitPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="record.taxUnitPrice != null">
|
||||
tax_unit_price = #{record.taxUnitPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
@@ -389,6 +399,7 @@
|
||||
oper_number = #{record.operNumber,jdbcType=DECIMAL},
|
||||
basic_number = #{record.basicNumber,jdbcType=DECIMAL},
|
||||
unit_price = #{record.unitPrice,jdbcType=DECIMAL},
|
||||
purchase_unit_price = #{record.purchaseUnitPrice,jdbcType=DECIMAL},
|
||||
tax_unit_price = #{record.taxUnitPrice,jdbcType=DECIMAL},
|
||||
all_price = #{record.allPrice,jdbcType=DECIMAL},
|
||||
remark = #{record.remark,jdbcType=VARCHAR},
|
||||
@@ -435,6 +446,9 @@
|
||||
<if test="unitPrice != null">
|
||||
unit_price = #{unitPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="purchaseUnitPrice != null">
|
||||
purchase_unit_price = #{purchaseUnitPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="taxUnitPrice != null">
|
||||
tax_unit_price = #{taxUnitPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
@@ -493,6 +507,7 @@
|
||||
oper_number = #{operNumber,jdbcType=DECIMAL},
|
||||
basic_number = #{basicNumber,jdbcType=DECIMAL},
|
||||
unit_price = #{unitPrice,jdbcType=DECIMAL},
|
||||
purchase_unit_price = #{purchaseUnitPrice,jdbcType=DECIMAL},
|
||||
tax_unit_price = #{taxUnitPrice,jdbcType=DECIMAL},
|
||||
all_price = #{allPrice,jdbcType=DECIMAL},
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
|
||||
Reference in New Issue
Block a user