备品备件出入库新增单价与总价字段

master
FCD 2 months ago
parent b06d7c038d
commit 437cb0e259

@ -36,6 +36,12 @@ public class EquSparepartsInOut extends BaseEntity {
@Excel(name = "数量")
private BigDecimal amount;
@Excel(name = "单价")
private BigDecimal unitPrice;
@Excel(name = "总价")
private BigDecimal allPrice;
@Excel(name = "备用1")
private String attr1;
@ -180,6 +186,22 @@ public class EquSparepartsInOut extends BaseEntity {
return storageId;
}
public BigDecimal getUnitPrice() {
return unitPrice;
}
public void setUnitPrice(BigDecimal unitPrice) {
this.unitPrice = unitPrice;
}
public BigDecimal getAllPrice() {
return allPrice;
}
public void setAllPrice(BigDecimal allPrice) {
this.allPrice = allPrice;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

@ -22,6 +22,8 @@
<result property="delFlag" column="del_flag"/>
<result property="factoryCode" column="factory_code"/>
<result property="nickName" column="nick_name" />
<result property="unitPrice" column="unit_price"/>
<result property="allPrice" column="allPrice"/>
</resultMap>
<sql id="selectEquSparepartsInOutVo">
@ -30,26 +32,28 @@
<select id="selectEquSparepartsInOutList" parameterType="EquSparepartsInOut" resultMap="EquSparepartsInOutResult">
SELECT
id,
in_out_type,
order_no,
spare_code,
spare_name,
amount,
attr1,
attr2,
attr3,
esio.create_by,
esio.create_time,
esio.update_by,
esio.update_time,
esio.del_flag,
factory_code,
storage_id,
su.nick_name
FROM
equ_spareparts_in_out esio
esio.id,
esio.in_out_type,
esio.order_no,
esio.spare_code,
esio.spare_name,
esio.amount,
esio.attr1,
esio.attr2,
esio.attr3,
esio.create_by,
esio.create_time,
esio.update_by,
esio.update_time,
esio.del_flag,
esio.factory_code,
esio.storage_id,
su.nick_name,
esl.unit_price,
(esl.unit_price * esio.amount) allPrice
FROM equ_spareparts_in_out esio
LEFT JOIN lanju_op_cloud.dbo.sys_user su ON esio.create_by = su.user_name
LEFT JOIN equ_spareparts_ledger esl ON esio.spare_code = esl.material_code AND esl.del_flag = 0
<where>
<if test="inOutType != null and inOutType != ''">and in_out_type = #{inOutType}</if>
<if test="orderNo != null and orderNo != ''">and order_no = #{orderNo}</if>

Loading…
Cancel
Save