自动化立体仓库 - WMS系统
pang.jiabao
2024-10-24 ef19ce2bc384c00b590ebdbd4e8c14ebfa9f0188
src/main/resources/mapper/OrderMapper.xml
@@ -52,6 +52,23 @@
        where 1=1
        and id = #{orderId}
    </update>
    <update id="updateSettleByOrderNo">
        update man_order
        set settle = #{status}
        ,update_time = getdate()
        <if test="userId != null">
            ,update_by = #{userId}
        </if>
        where 1=1
        and order_no = #{orderNo}
        and settle != #{status}
    </update>
    <update id="updateStatusByOrderNo">
        update man_order set account_day = #{status},update_time = getdate(),update_by = #{userId} where order_no = #{orderNo}
    </update>
    <update id="updatePendingSettleByOrderNo">
        update man_order set settle = #{status},update_time = getdate() where order_no = #{orderNo} and settle = 1
    </update>
    <select id="selectComplete" resultMap="BaseResultMap">
        select
@@ -80,5 +97,18 @@
            and order_no = #{orderNo}
        </if>
    </select>
    <select id="selectStockUpOrderDetl" resultType="java.lang.String">
        select
            DISTINCT md.brand
        from
            man_order mo
                left join man_order_detl md on
                mo.order_no = md.order_no
        where
            mo.doc_type = 21
          and mo.account_day = 1
          and md.inspect = 0
          and mo.settle = 1
    </select>
</mapper>