1、给系统参数表增加移动平均价标记 2、给实时库存表增加当前单价字段

This commit is contained in:
jishenghua
2024-05-21 23:22:29 +08:00
parent 45176c40fa
commit 9eaffcd88e
8 changed files with 211 additions and 17 deletions

View File

@@ -6,6 +6,7 @@
<result column="material_id" jdbcType="BIGINT" property="materialId" />
<result column="depot_id" jdbcType="BIGINT" property="depotId" />
<result column="current_number" jdbcType="DECIMAL" property="currentNumber" />
<result column="current_unit_price" jdbcType="DECIMAL" property="currentUnitPrice" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
</resultMap>
@@ -68,7 +69,7 @@
</where>
</sql>
<sql id="Base_Column_List">
id, material_id, depot_id, current_number, tenant_id, delete_flag
id, material_id, depot_id, current_number, current_unit_price, tenant_id, delete_flag
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.MaterialCurrentStockExample" resultMap="BaseResultMap">
select
@@ -102,11 +103,11 @@
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.MaterialCurrentStock">
insert into jsh_material_current_stock (id, material_id, depot_id,
current_number, tenant_id, delete_flag
)
current_number, current_unit_price, tenant_id,
delete_flag)
values (#{id,jdbcType=BIGINT}, #{materialId,jdbcType=BIGINT}, #{depotId,jdbcType=BIGINT},
#{currentNumber,jdbcType=DECIMAL}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
)
#{currentNumber,jdbcType=DECIMAL}, #{currentUnitPrice,jdbcType=DECIMAL}, #{tenantId,jdbcType=BIGINT},
#{deleteFlag,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.MaterialCurrentStock">
insert into jsh_material_current_stock
@@ -123,6 +124,9 @@
<if test="currentNumber != null">
current_number,
</if>
<if test="currentUnitPrice != null">
current_unit_price,
</if>
<if test="tenantId != null">
tenant_id,
</if>
@@ -143,6 +147,9 @@
<if test="currentNumber != null">
#{currentNumber,jdbcType=DECIMAL},
</if>
<if test="currentUnitPrice != null">
#{currentUnitPrice,jdbcType=DECIMAL},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
@@ -172,6 +179,9 @@
<if test="record.currentNumber != null">
current_number = #{record.currentNumber,jdbcType=DECIMAL},
</if>
<if test="record.currentUnitPrice != null">
current_unit_price = #{record.currentUnitPrice,jdbcType=DECIMAL},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
@@ -189,6 +199,7 @@
material_id = #{record.materialId,jdbcType=BIGINT},
depot_id = #{record.depotId,jdbcType=BIGINT},
current_number = #{record.currentNumber,jdbcType=DECIMAL},
current_unit_price = #{record.currentUnitPrice,jdbcType=DECIMAL},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
@@ -207,6 +218,9 @@
<if test="currentNumber != null">
current_number = #{currentNumber,jdbcType=DECIMAL},
</if>
<if test="currentUnitPrice != null">
current_unit_price = #{currentUnitPrice,jdbcType=DECIMAL},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
@@ -221,6 +235,7 @@
set material_id = #{materialId,jdbcType=BIGINT},
depot_id = #{depotId,jdbcType=BIGINT},
current_number = #{currentNumber,jdbcType=DECIMAL},
current_unit_price = #{currentUnitPrice,jdbcType=DECIMAL},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}