自动化立体仓库 - WMS系统
pang.jiabao
2024-10-24 ef19ce2bc384c00b590ebdbd4e8c14ebfa9f0188
src/main/resources/mapper/OrderMapper.xml
@@ -52,14 +52,37 @@
        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 top 5 *
        from man_order
        where 1=1
        and settle = 4
        and status = 1
        order by create_time asc
        select
            top 5 mo.*
        from
            man_order mo
                inner join man_doc_type mt on
                mo.doc_type = mt.doc_id
        where
            mt.pakout = 1
          and mo.settle = 4
          and mo.status = 1
        order by
            mo.create_time asc
    </select>
    <insert id="addToLogTable">
@@ -74,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>