guoyuji
2024-01-26 d01fa9d49a8c8a723493aecb681d4e1f3e25fce5
north-glass-erp/target/classes/mapper/mm/FinishedGoodsInventory.xml
@@ -34,7 +34,7 @@
    </resultMap>
    <select id="defaultfinishedGoodsInventory" resultMap="selectFinishedGoodsInventory">
    <select id="defaultfinishedGoods" resultMap="selectFinishedGoodsInventory">
        select od.order_number,
               o.order_id,
               o.project,
@@ -56,9 +56,35 @@
        from finished_goods_inventory fgi
                 left join sd.order_detail od on fgi.order_number = od.order_number
                 inner join sd.`order` o on fgi.order_id = o.order_id
        <where>
            <if test="finishedGoodsInventory.orderDetail.width != null and finishedGoodsInventory.orderDetail.width != ''">
                and od.width regexp #{finishedGoodsInventory.orderDetail.width}
            </if>
        </where>
        order by fgi.id
        limit #{offset},#{pageSize}
        ;
    </select>
    <select id="getPageTotal" >
        select
        CEILING(count(fgi.id)/#{pageSize})
        from finished_goods_inventory fgi
        left join sd.order_detail od on fgi.order_number = od.order_number
        inner join sd.`order` o on fgi.order_id = o.order_id
        <where>
            <if test="finishedGoodsInventory.orderDetail.width != null and finishedGoodsInventory.orderDetail.width != ''">
                and od.width regexp #{finishedGoodsInventory.orderDetail.width}
            </if>
        </where>
        order by fgi.id desc
        limit #{offset},#{pageSize}
        ;
    </select>
</mapper>