廖井涛
2024-08-29 ab335a89280e8bc22068c8dc42787959dfbfb466
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -480,8 +480,8 @@
                      ogdss.technology_number,
                      ogd.glass_address,
                      ROUND(sum(fc.quantity) / (count(DISTINCT fc.technology_number))) as quantity,
                      sum(ogd.total_area)                                              as total_area,
                      # SUM(ogd.child_width*child_height*fc.quantity/(count(DISTINCT ogd.technology_number))) as total_area,
                      # sum(ogd.total_area)                                              as total_area,
                      ROUND(SUM(ogd.child_width*ogd.child_height*fc.quantity)/1000000/(count(DISTINCT fc.technology_number)),2) as total_area,
                      od.product_name,
                      ogdss.concatenated_glass_child                                   as glass_child,
                      fc.founder,
@@ -523,8 +523,8 @@
                      ogdss.technology_number,
                      ogd.glass_address,
                      ROUND(sum(fc.quantity) / (count(DISTINCT fc.technology_number))) as quantity,
                      sum(ogd.total_area)                                              as total_area,
                      # SUM(ogd.child_width*child_height*fc.quantity/(count(DISTINCT ogd.technology_number))) as total_area,
                     #  sum(ogd.total_area)                                              as total_area,
                      ROUND(SUM(ogd.child_width*ogd.child_height*fc.quantity)/1000000/(count(DISTINCT fc.technology_number)),2) as total_area,
                      od.product_name,
                      ogdss.concatenated_glass_child                                   as glass_child,
                      fc.founder,
@@ -562,7 +562,7 @@
                      ogdss.technology_number,
                      ogd.glass_address,
                      ROUND(sum(fc.quantity) / (count(DISTINCT fc.technology_number))) as quantity,
                      sum(ogd.total_area)                                              as total_area,
                      ROUND(SUM(ogd.child_width*ogd.child_height*fc.quantity)/1000000/(count(DISTINCT fc.technology_number)),2) as total_area,
                      od.product_name,
                      ogdss.concatenated_glass_child                                   as glass_child,
                      fc.founder,
@@ -759,7 +759,7 @@
               o.customer_id,
               ogd.child_width                as width,
               ogd.child_height               as height,
               od.quantity,
               fc.quantity,
               od.order_number                as orderNumber,
               fc.technology_number           as technologyNumber,
               ogd.glass_child,
@@ -883,7 +883,7 @@
               od.processing_note                                    as processingNote,
               width,
               height,
               od.quantity,
               fc.quantity,
               od.order_number                                       as orderNumber,
               fc.technology_number                                  as technologyNumber,
               od.building_number                                    as buildingNumber,
@@ -945,7 +945,9 @@
               od.product_name,
               ogd.glass_child,
               fc.print_status,
               pl.reporting_work_id
               pl.reporting_work_id,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01'))                AS glassNumber
        from flow_card as fc
                 left join sd.order_glass_detail as ogd
                           on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number and
@@ -1128,7 +1130,8 @@
               pl.rework_processes,
               od.product_name,
               ogd.glass_child,
               pl.reporting_work_id
               pl.reporting_work_id,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')) AS glassNumber
        from flow_card as fc
                 left join sd.order_glass_detail as ogd
                           on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number and
@@ -1218,7 +1221,7 @@
    <select id="getDetailListRefund">
        select fc.order_number,
               concat(round(ogd.child_width), "*", round(ogd.child_height))   as child_width,
               (pl.patch_num)                                                 as quantity,
               sum(pl.patch_num)                                                 as quantity,
               round(ogd.total_area, 2)                                       as total_area,
               od.perimeter,
               od.bend_radius,
@@ -1264,7 +1267,8 @@
               dd.responsible_process,
               dd.responsible_team,
               concat('对应我司单号', o.batch)                 AS otherRemarks,
               dd.responsible_personnel
               dd.responsible_personnel,
               #{mergeTechnologyNumber} as  mergeTechnologyNumber
        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
@@ -1501,7 +1505,7 @@
               od.processing_note                                    as processingNote,
               round(ogd.child_width)                                as width,
               round(ogd.child_height)                               as height,
               od.quantity,
               fc.quantity,
               od.order_number                                       as orderNumber,
               fc.technology_number                                  as technologyNumber,
               od.building_number                                    as buildingNumber,
@@ -1541,7 +1545,7 @@
                               and fcs.process = #{process}
        where fc.process_id = #{processId}
          and position(fc.technology_number in #{technologyNumber})
        group by od.order_number, ogd.technology_number, ogd.child_width, ogd.child_height
        group by fc.process_id,od.order_number, ogd.technology_number, ogd.child_width, ogd.child_height
        order by IF(fcs.sort != NULL or fcs.sort != '', fcs.sort, fc.order_number)
    </select>
@@ -1554,8 +1558,8 @@
               fc.order_number,
               ogd.technology_number,
               ogd.glass_address,
               sum(od.quantity)         as quantity,
               sum(ogd.total_area)      as total_area,
               sum(fc.quantity)                                                          as quantity,
               round(sum(ogd.child_width * ogd.child_height * fc.quantity / 1000000), 2) as total_area,
               od.product_name,
               ogd.glass_child,
               fc.founder,