#
Junjie
2024-05-30 ba09c6c753de16da201e4d04ff77c549358c9fc3
zy-asrs-common/src/main/resources/mapper/wms/OrderDetlMapper.xml
@@ -39,6 +39,21 @@
        </choose>
    </select>
    <select id="selectItem2" resultType="com.zy.asrs.common.wms.entity.OrderDetl">
        select * from wms_order_detl
        where 1=1
        and order_no = #{orderNo}
        and matnr = #{matnr}
        <choose>
            <when test="batch != null and batch != ''">
                and batch = #{batch}
            </when>
            <otherwise>
                and (batch IS NULL OR batch = '')
            </otherwise>
        </choose>
    </select>
    <select id="getPakoutPage" resultType="com.zy.asrs.common.wms.entity.OrderDetl">
        select
        mod.*
@@ -86,4 +101,36 @@
        </choose>
    </update>
    <update id="increaseQtyByOrderNo">
        update wms_order_detl
        set qty = qty + #{qty}
        where 1=1
        and order_no = #{orderNo}
        and matnr = #{matnr}
        <choose>
            <when test="batch != null and batch != ''">
                and batch = #{batch}
            </when>
            <otherwise>
                and (batch IS NULL OR batch = '')
            </otherwise>
        </choose>
    </update>
    <update id="increaseWorkQtyByOrderNo">
        update wms_order_detl
        set work_qty = work_qty + #{qty}
        where 1=1
        and order_no = #{orderNo}
        and matnr = #{matnr}
        <choose>
            <when test="batch != null and batch != ''">
                and batch = #{batch}
            </when>
            <otherwise>
                and (batch IS NULL OR batch = '')
            </otherwise>
        </choose>
    </update>
</mapper>