Junjie
2024-07-05 62dc1e0176a62e023a361b76f4f59fa073d9eb8f
zy-asrs-common/src/main/resources/mapper/wms/OrderDetlMapper.xml
@@ -87,7 +87,7 @@
    <update id="decrease">
        update wms_order_detl
        set qty = qty - #{qty}
        set work_qty = work_qty - #{qty}
        where 1=1
        and order_no = #{orderNo}
        and matnr = #{matnr}
@@ -136,4 +136,21 @@
        </choose>
    </update>
    <update id="increaseWorkQty">
        update wms_order_detl
        set work_qty = work_qty + #{workQty}
        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>
</mapper>