chenlu
2025-03-07 3ab330b8aefb3cd781c9b8730b4ab7ac65e7e9d7
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -2858,7 +2858,7 @@
    </select>
    <select id="flowCardToOptimizeCount">
        select count(*) from pp.flow_card where order_id = #{orderId} and engineering_occupancy=1
        select count(*) from pp.flow_card where order_id = #{orderId} and project_no is not null
    </select>
    <select id="getFlowCardDetail" >
@@ -2899,13 +2899,28 @@
    
    <select id="getOrderDetailByProductionId">
        select * from (select a.*,
                              a.quantity as 'baiscQuantity',
                              #{glassThickness} as 'thickness',
        IF(a.height >= a.width, a.height, a.width) as 'long',
        IF(a.height &lt; a.width, a.height, a.width) as 'short'
        from sd.order_detail as a
        left join sd.order_glass_detail as b
        on a.order_id = b.order_id and a.order_number = b.order_number
        where a.order_id = #{orderId} and b.production_id = #{productionId}
        group by a.order_number) as c
        <if test="type=='scope'">
            where  c.`long` &lt;= #{inLenMax}
                and c.`long` >= #{inLenMin}
                and c.`short` >= #{inShortMin}
                and c.`short` &lt;= #{inShortMax}
        </if>
        <if test="type=='notScope'">
            where  !(c.`long` &lt;= #{inLenMax}
            and c.`long` >= #{inLenMin}
            and c.`short` >= #{inShortMin}
            and c.`short` &lt;= #{inShortMax})
        </if>
        order by c.`long` desc
    </select>