自动化立体仓库 - WMS系统
bfwms
2025-09-30 b7b4510ab85d9c3a31645f56e3d799ad817d9762
src/main/resources/mapper/OrderDetlMapper.xml
@@ -46,6 +46,7 @@
        <result column="update_by" property="updateBy" />
        <result column="update_time" property="updateTime" />
        <result column="memo" property="memo" />
        <result column="owner" property="owner" />
    </resultMap>
@@ -79,6 +80,12 @@
        where 1=1
        and order_id = #{orderId}
        and qty &lt; anfme
    </select>
    <select id="selectTotalDetls" resultMap="BaseResultMap">
        select * from man_order_detl
        where 1=1
        and order_id = #{orderId}
    </select>
    <sql id="pakOutPageCondition">
@@ -126,6 +133,22 @@
        <include refid="pakOutPageCondition"></include>
    </select>
    <update id="increaseAnfme">
        update man_order_detl
        set anfme = anfme + #{qty}
        where 1=1
        and order_id = #{orderId}
        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="increase">
        update man_order_detl
        set qty = qty + #{qty}
@@ -165,4 +188,13 @@
        and order_id = #{orderId}
    </update>
    <select id="selectRemainder" resultMap="BaseResultMap">
        select
        *
        from man_order_detl
        where 1=1
        and anfme > qty
        and order_id = #{orderId}
    </select>
</mapper>