自动化立体仓库 - WMS系统
*
lsh
6 小时以前 f00281e8dd4f2b5297cf430d8440ff23a2f3e628
src/main/resources/mapper/OrderPakoutMapper.xml
@@ -145,22 +145,27 @@
    </update>
    <select id="selectOrderPakoutMainVoList" resultMap="PakoutMainResultMap">
        SELECT * FROM v_pakout_main
        WHERE status = 1
        <if test="itemName != null and itemName != ''">
            AND item_name LIKE CONCAT('%', #{itemName}, '%')
        </if>
        <if test="cstmrName != null and cstmrName != ''">
            AND cstmr_name LIKE CONCAT('%', #{cstmrName}, '%')
        </if>
        <if test="settle != null and settle != ''">
            AND settle = #{settle}
        </if>
        <if test="status != null and status != ''">
            AND status = #{status}
        </if>
        AND row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
        ORDER BY create_time DESC
        select d.* from (
            select
            ROW_NUMBER() over (order by c.update_time desc) as row1,
            c.* from (
                select a.* from v_pakout_main as a
                where 1=1 AND status = 1
                <if test="itemName != null and itemName != ''">
                    AND item_name LIKE CONCAT('%', #{itemName}, '%')
                </if>
                <if test="cstmrName != null and cstmrName != ''">
                    AND cstmr_name LIKE CONCAT('%', #{cstmrName}, '%')
                </if>
                <if test="settle != null and settle != ''">
                    AND settle = #{settle}
                </if>
                <if test="status != null and status != ''">
                    AND status = #{status}
                </if>
            ) as c
        ) as d
        where d.row1 between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) order by d.update_time desc
    </select>
    <select id="selectOrderPakoutMainVoListTotal" resultType="Long">