廖井涛
2024-07-02 a607fcc60ff7861c8ee12f281167491fc63e97f6
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -563,6 +563,30 @@
        order by opd.stock_id
    </select>
    <select id="getPrintLabel1">
        select o.order_id ,
               o.project,
               o.customer_id ,
               od.width,
               od.height,
               od.quantity,
               od.order_number as orderNumber,
               fc.technology_number as technologyNumber,
               ogd.glass_child,
               c.customer_abbreviation as customer_name,
               ifnull(od.processing_note,'') as processing_note
        from sd.order as o
                 left join sd.order_detail as od on o.order_id = od.order_id
                 left join pp.flow_card as fc on o.order_id = fc.order_id and
                                                 od.order_number = fc.order_number
                 left join sd.product pt on pt.id=od.product_id
                 left join sd.customer c on c.id=o.customer_id
                    left join sd.order_glass_detail ogd on ogd.order_id=od.order_id and ogd.order_number=od.order_number
        where fc.process_id = #{processId}
          and fc.technology_number=#{technologyNumber}
        group by od.order_number,od.width,od.height
    </select>
    <select id="printFlowCardDetailsMp">
        SELECT fc.process_id,
               fc.order_number,
@@ -571,13 +595,15 @@
               ogd.child_width,
               ogd.child_height,
               fc.quantity,
               ROUND(ogd.child_width * ogd.child_height * fc.quantity / 1000000, 2) as area
               ROUND(ogd.child_width * ogd.child_height * fc.quantity / 1000000, 2) as area,
               fc.sort
        FROM flow_card AS fc
                 LEFT JOIN sd.order_glass_detail AS ogd ON fc.order_id = ogd.order_id
            AND fc.order_number = ogd.order_number
            AND fc.technology_number = ogd.technology_number
        where fc.process_id = #{processId}
          and fc.technology_number = #{technologyNumber}
        order by IF(fc.sort != NULL || fc.sort != '', fc.sort, fc.order_number)
    </select>
    <update id="printSortMp">
@@ -634,7 +660,7 @@
        select o.order_id           as orderId,
               project,
               customer_id          as customerId,
               customer_name        as customerName,
               o.customer_name        as customerName,
               order_type           as orderType,
               order_classify       as orderClassify,
               batch,
@@ -655,12 +681,15 @@
               fc.technology_number as technologyNumber,
               od.building_number   as buildingNumber,
               od.product_name      as productName,
               od.edging_type       as edgingType
               od.edging_type       as edgingType,
               p.remarks,
               c.customer_abbreviation as customerAbbreviation
        from sd.order as o
                 left join sd.order_detail as od on o.order_id = od.order_id
                 left join flow_card as fc on o.order_id = fc.order_id and
                                              od.order_number = fc.order_number
                 left join sd.product as p on p.id=od.product_id
                 left join sd.customer as c on c.id = o.customer_id
        where fc.process_id = #{processId}
          and fc.technology_number = #{technologyNumber}
        group by od.order_number, width, height