guoyujie
3 天以前 3d9e0ec1c1e457ed3fd2b334cf4c4dd66c10eead
north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml
@@ -61,6 +61,8 @@
        <result column="batch" property="order.batch"/>
        <result column="order_quantity" property="order.quantity"/>
        <result column="calculate_type" property="order.calculateType"/>
        <result column="customer_name" property="order.customerName"/>
        <result column="building_number" property="orderDetail.buildingNumber"/>
        <result column="width" property="orderDetail.width"/>
@@ -714,6 +716,7 @@
        od.height,
        o.creator,
        o.project,
        o.customer_name,
        fc.order_number,
        od.quantity,
        fc.quantity as fc_quantity,
@@ -757,6 +760,9 @@
            <if test="flowCard.order != null and flowCard.order.project != null and flowCard.order.project != ''">
                and o.project regexp #{flowCard.order.project}
            </if>
            <if test="flowCard.order != null and flowCard.order.customerName != null and flowCard.order.customerName != ''">
                and o.customer_name regexp #{flowCard.order.customerName}
            </if>
            <if test="flowCard.orderNumber != null and flowCard.orderNumber != ''">
                and fc.order_number regexp #{flowCard.orderNumber}
            </if>
@@ -785,10 +791,12 @@
    </select>
    <select id="getSelectWarehousingPageTotal" >
        select
        CEILING(count(zu.order_number)/#{pageSize}) as 'pageTotal',
        count(zu.order_number) as 'total' from (
        select fc.order_number as order_number,fc.process_id from pp.flow_card fc left join sd.order_detail od on
        fc.order_id=od.order_id and fc.order_number=od.order_number inner join sd.`order` o on o.order_id=fc.order_id
        CEILING(count(zu.id)/#{pageSize}) as 'pageTotal',
        count(zu.id) as 'total' from (
        select fc.id as id
        from (select *,min(inventory_quantity) as min_inventory_quantity from pp.flow_card  group by  order_id,order_number,process_id) as fc
        left join sd.order_detail od on fc.order_id=od.order_id and fc.order_number=od.order_number inner join sd.`order` o on
        o.order_id=fc.order_id
        <where>
            and fc.received_quantity <![CDATA[<]]> fc.inventory_quantity and o.create_order>0
            <if test="flowCard.order != null and flowCard.order.orderId != null and flowCard.order.orderId != ''">
@@ -815,6 +823,9 @@
            <if test="flowCard.order != null and flowCard.order.project != null and flowCard.order.project != ''">
                and o.project regexp #{flowCard.order.project}
            </if>
            <if test="flowCard.order != null and flowCard.order.customerName != null and flowCard.order.customerName != ''">
                and o.customer_name regexp #{flowCard.order.customerName}
            </if>
            <if test="flowCard.orderNumber != null and flowCard.orderNumber != ''">
                and fc.order_number regexp #{flowCard.orderNumber}
            </if>