自动化立体仓库 - WMS系统
pang.jiabao
2024-11-26 a9325d1f1913890dd53296abc4490d9ef95a4e53
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
@@ -62,7 +79,7 @@
                mo.doc_type = mt.doc_id
        where
            mt.pakout = 1
          and mo.settle = 4
          and mo.settle = 5
          and mo.status = 1
        order by
            mo.create_time asc
@@ -80,5 +97,21 @@
            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>
    <select id="selectOrderNosByOrderNoLike" resultType="java.lang.String">
        select order_no from man_order where settle = 4 and order_no like '%' + #{orderNo} + '%'
    </select>
</mapper>