廖井涛
2025-07-28 59d34cb3d22f4f99805f78997b7229a46bec4fe5
north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -169,6 +169,7 @@
               b.glass_child,
               d.order_type,
               concat(c.process_id, '/', c.technology_number) as process_id,
               c.order_id,
               c.order_number,
               c.technology_number,
               b.child_width,
@@ -177,6 +178,7 @@
#                c.quantity,
               c.quantity as thisQuantity,/*用于判断是否改变颜色*/
               e.reportWorkQuantity,
               e.reportWorkQuantityShow,
               e.reportWorkQuantityCount,
               e.reportWorkTime,
               e.broken_num,
@@ -193,7 +195,9 @@
               if(c.technology_number=1,ifnull(dd.quantity, 0) ,0)                          as shippedQuantity,
               ifnull(JSON_UNQUOTE(JSON_EXTRACT(a.other_columns, '$.S01')),'') AS glassNumber
               ifnull(JSON_UNQUOTE(JSON_EXTRACT(a.other_columns, '$.S01')),'') AS glassNumber,
               b.`group`
        from pp.flow_card as c
                 left join
             sd.order_detail as a
@@ -216,6 +220,10 @@
                                          GROUP_CONCAT(concat("\"", process, "\":\"", if(technology_number!=1 and (bd.nickname='stepD' || bd.nickname='stepB' ) ,0,reporting_work_num), "\"")),
                                          '}'
                                       )             as reportWorkQuantity,
                                   concat('{',
                                          GROUP_CONCAT(concat("\"", process, "\":\"", if(technology_number!=1 and (bd.nickname='stepD' || bd.nickname='stepB' ) ,0,reporting_work_num), "\"")),
                                          '}'
                                       )             as reportWorkQuantityShow,
                                   concat('{',
                                          GROUP_CONCAT(concat("\"", process, "\":\"", reporting_work_num_count, "\"")),
                                          '}'
@@ -2110,7 +2118,7 @@
        WHERE
            rw.reporting_work_time >= #{selectTime1}
          AND rw.reporting_work_time <  #{selectTime2}
          AND dd.available = 0
          AND dd.available = 0 and rw.reviewed_state>=0
        <if test="damageReportDTO.orderId != null and damageReportDTO.orderId != ''">
            and o.order_id regexp #{damageReportDTO.orderId}
        </if>
@@ -2733,7 +2741,8 @@
                                          on e.id=(f.id-1) and e.process_id = f.process_id and e.order_number = f.order_number and e.technology_number =f.technology_number
                       where
                           e.id is not null
                         and (e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num)>0 ) as g
                         and (e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num)>0 group by f.process_id, f.order_number,
        f.technology_number) as g
                            <choose>
                                <when test="laminating == 'stepC' and process == '预压'">
                                    GROUP BY g.process_id, g.order_number, g.technology_number
@@ -2822,7 +2831,8 @@
        on e.id=(f.id-1) and e.process_id = f.process_id and e.order_number = f.order_number and e.technology_number =f.technology_number
        where
        e.id is not null
        and e.reporting_work_num_count-f.reporting_work_num_count>0 ) as g
        and e.reporting_work_num_count-f.reporting_work_num_count>0 group by f.process_id, f.order_number,
        f.technology_number) as g
        <choose>
            <when test="laminating == 'stepC' and process == '预压'">
                GROUP BY g.process_id, g.order_number, g.technology_number