#
Junjie
2023-12-29 558333b7a634d346c0ec990ae9b1993fdae77344
zy-asrs-common/src/main/resources/mapper/wms/OrderDetlMapper.xml
@@ -45,4 +45,38 @@
        <include refid="pakOutPageCondition"></include>
    </select>
    <update id="increase">
        update wms_order_detl
        set qty = qty + #{qty}
        where 1=1
        and order_id = #{orderId}
        and matnr = #{matnr}
        and host_id = #{hostId}
        <choose>
            <when test="batch != null and batch != ''">
                and batch = #{batch}
            </when>
            <otherwise>
                and (batch IS NULL OR batch = '')
            </otherwise>
        </choose>
    </update>
    <update id="decrease">
        update wms_order_detl
        set qty = qty - #{qty}
        where 1=1
        and order_no = #{orderNo}
        and matnr = #{matnr}
        and host_id = #{hostId}
        <choose>
            <when test="batch != null and batch != ''">
                and batch = #{batch}
            </when>
            <otherwise>
                and (batch IS NULL OR batch = '')
            </otherwise>
        </choose>
    </update>
</mapper>