库存管理

This commit is contained in:
gaowdong 2025-07-08 11:30:57 +08:00
parent f85a440b2b
commit 134d541eb9
1 changed files with 6 additions and 2 deletions

View File

@ -105,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialNum != null">material_num = #{materialNum},</if>
<if test="fetchNum != null">material_num = material_num - #{fetchNum},</if>
<if test="inventoryStatus != null">inventory_status = #{inventoryStatus},</if>
<if test="inventoryStatus == null">
<if test="inventoryStatus == null and fetchNum != null">
inventory_status = CASE
WHEN (material_num - #{fetchNum}) <![CDATA[ < ]]> min_num THEN 2
WHEN (material_num - #{fetchNum}) <![CDATA[ > ]]> max_num THEN 3
@ -119,7 +119,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where inventory_id = #{inventoryId} and material_num <![CDATA[ >= ]]> #{fetchNum} and del_flag = '0'
where inventory_id = #{inventoryId}
<if test="fetchNum != null">
and material_num <![CDATA[ >= ]]> #{fetchNum}
</if>
and del_flag = '0'
</update>
<delete id="deleteImsInventoryByInventoryId" parameterType="Long">