廖井涛
2025-07-03 ec37ee18e2467fbde0eeb1539dcdb846f48ad59f
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -3084,4 +3084,35 @@
    <select id="getProcessNameList">
        SELECT id,basic_name,IFNULL(nickname,"") as nickname FROM sd.`basic_data` where basic_category='process'
    </select>
    <select id="exportDateProcessMp">
        select
        a.order_Id,
        a.process_Id,
        c.product_id,
        c.product_name,
        b.project,
        sum(a.quantity) as quantity,
        sum(a.quantity) * c.area as compute_gross_area,
        a.founder,
        c.processing_note,
        b.customer_name,
        layout_status as layout_status,
        a.merge,
        a.rack,
        b.batch
        from (select id,order_id,process_id,order_number, quantity,founder,max(layout_status) as layout_status,create_time,max(merge) as merge,rack from flow_card
        group by process_Id,order_number) as a
        left join sd.`order` as b on a.order_Id=b.order_id
        left join sd.order_detail as c on a.order_Id=c.order_id and a.order_Number=c.order_number
        where date(a.create_time) >= #{date[0]}
          and date(a.create_time) &lt;= #{date[1]}
        and b.create_order>0
        group by a.process_Id
        ORDER BY a.id desc
    </select>
    <select id="getSumQuantity">
        select quantity from  sd.`order` where order_id=#{orderId}
    </select>
</mapper>