库存表新增字段以及存值

This commit is contained in:
2026-02-25 16:53:28 +08:00
parent 2183528894
commit d29b336252
3 changed files with 45 additions and 2 deletions

View File

@@ -67,13 +67,18 @@
<result property="fycde2" column="fycde_2"/>
<result property="isUpdate" column="is_update"/>
<result property="scene" column="scene"/>
<result property="sceneName" column="sceneName"/>
</resultMap>
<!-- ========================= 公共查询 SQL联表完整版 ========================= -->
<sql id="selectRkInfoVo">
SELECT
ri.*,
CASE
WHEN ri.scene = 'HJ' THEN '货架'
WHEN ri.scene = 'DC' THEN '堆场'
ELSE ri.scene
END AS sceneName,
/* ===== 新增:计算总金额 ===== */
ri.real_qty * ri.ht_dj AS total_amount,
@@ -155,7 +160,9 @@
<if test="remark != null and remark != ''">
AND ri.remark LIKE CONCAT('%', #{remark}, '%')
</if>
<if test="scene != null and scene != ''">
AND ri.scene LIKE CONCAT('%', #{scene}, '%')
</if>
<if test="isDelete != null and isDelete != ''">
AND ri.is_delete = #{isDelete}
</if>
@@ -241,6 +248,9 @@
<if test="wlMs != null and wlMs != ''">
AND ri.wl_ms LIKE CONCAT('%', #{wlMs}, '%')
</if>
<if test="scene != null and scene != ''">
AND ri.scene LIKE CONCAT('%', #{scene}, '%')
</if>
<if test="gysMc != null and gysMc != ''">
AND ri.gys_mc LIKE CONCAT('%', #{gysMc}, '%')
</if>
@@ -373,6 +383,7 @@
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="isDelete != null">is_delete = #{isDelete},</if>
<if test="scene != null">scene = #{scene}</if>
</trim>
WHERE id = #{id}
</update>