From 715fe1303217170d7597d0a24cfc1caafac8db54 Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期二, 28 十月 2025 22:39:26 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override

---
 north-glass-erp/src/main/resources/mapper/pp/Report.xml |   29 +++++++++++++++++++++++++----
 1 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/north-glass-erp/src/main/resources/mapper/pp/Report.xml b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
index 84b7a9d..923b539 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/Report.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -285,7 +285,7 @@
           and date(rw.reporting_work_time) &lt;= #{endDate}
           and rw.this_worn_quantity > 0
           and dd.available = 0
-          and reviewed_state != 2
+          and reviewed_state >-1
           and rw.this_process != dd.responsible_process
         and o.create_order>0
         <if test="crossProcessBreakingDTO.code != null and crossProcessBreakingDTO.code != ''">
@@ -321,6 +321,9 @@
         <if test="crossProcessBreakingDTO.creator != null and crossProcessBreakingDTO.creator != ''">
             and rw.creator regexp #{crossProcessBreakingDTO.creator}
         </if>
+        <if test="crossProcessBreakingDTO.code != null and crossProcessBreakingDTO.code != ''">
+            and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') regexp #{crossProcessBreakingDTO.code}
+        </if>
         GROUP BY dd.id
         order by dd.id desc
         limit #{offset},#{pageSize}
@@ -354,7 +357,7 @@
         and date(rw.reporting_work_time) &lt;= #{endDate}
         and rw.this_worn_quantity > 0
         and dd.available = 0
-        and reviewed_state != 2
+        and reviewed_state >-1
         and rw.this_process = dd.responsible_process
         and o.create_order>0
         <if test="crossProcessBreakingDTO.code != null and crossProcessBreakingDTO.code != ''">
@@ -390,6 +393,9 @@
         <if test="crossProcessBreakingDTO.creator != null and crossProcessBreakingDTO.creator != ''">
             and rw.creator regexp #{crossProcessBreakingDTO.creator}
         </if>
+        <if test="crossProcessBreakingDTO.code != null and crossProcessBreakingDTO.code != ''">
+            and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') regexp #{crossProcessBreakingDTO.code}
+        </if>
         GROUP BY dd.id
         order by dd.id desc
         limit #{offset},#{pageSize}
@@ -406,6 +412,7 @@
                  left join sd.order_glass_detail as ogd
                            on ogd.order_id = o.order_id and ogd.order_number = dd.order_number
                                and ogd.technology_number and dd.technology_number
+        left join sd.order_detail as od on o.order_id = od.order_id and od.order_number=ogd.order_number
         where date(rw.reporting_work_time) >= #{startDate}
           and date(rw.reporting_work_time) &lt;= #{endDate}
           and rw.this_worn_quantity > 0
@@ -442,6 +449,9 @@
         <if test="crossProcessBreakingDTO.responsiblePersonnel != null and crossProcessBreakingDTO.responsiblePersonnel != ''">
             and dd.responsible_personnel regexp #{crossProcessBreakingDTO.responsiblePersonnel}
         </if>
+        <if test="crossProcessBreakingDTO.code != null and crossProcessBreakingDTO.code != ''">
+            and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') regexp #{crossProcessBreakingDTO.code}
+        </if>
         order by dd.id desc
     </select>
 
@@ -456,6 +466,7 @@
         left join sd.order_glass_detail as ogd
         on ogd.order_id = o.order_id and ogd.order_number = dd.order_number
         and ogd.technology_number and dd.technology_number
+        left join sd.order_detail as od on o.order_id = od.order_id and od.order_number=ogd.order_number
         where date(rw.reporting_work_time) >= #{startDate}
         and date(rw.reporting_work_time) &lt;= #{endDate}
         and rw.this_worn_quantity > 0
@@ -491,6 +502,9 @@
         </if>
         <if test="crossProcessBreakingDTO.responsiblePersonnel != null and crossProcessBreakingDTO.responsiblePersonnel != ''">
             and dd.responsible_personnel regexp #{crossProcessBreakingDTO.responsiblePersonnel}
+        </if>
+        <if test="crossProcessBreakingDTO.code != null and crossProcessBreakingDTO.code != ''">
+            and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') regexp #{crossProcessBreakingDTO.code}
         </if>
         order by dd.id desc
     </select>
@@ -1676,6 +1690,9 @@
         <if test="teamOutputDTO.deviceName != null and teamOutputDTO.deviceName != ''">
             AND rw.device_name REGEXP #{teamOutputDTO.deviceName}
         </if>
+        <if test="teamOutputDTO.batch != null and teamOutputDTO.batch != ''">
+            AND o.batch REGEXP #{teamOutputDTO.batch}
+        </if>
 
         <choose>
             <when test="laminating == ''">
@@ -1823,7 +1840,9 @@
         <if test="teamOutputDTO.edgingType != null and teamOutputDTO.edgingType != ''">
             and od.edging_type regexp #{teamOutputDTO.edgingType}
         </if>
-
+        <if test="teamOutputDTO.batch != null and teamOutputDTO.batch != ''">
+            AND o.batch REGEXP #{teamOutputDTO.batch}
+        </if>
         <choose>
             <when test="laminating == ''">
                 GROUP BY
@@ -2505,7 +2524,9 @@
         <if test="teamOutputDTO.deviceName != null and teamOutputDTO.deviceName != ''">
             AND rw.device_name REGEXP #{teamOutputDTO.deviceName}
         </if>
-
+        <if test="teamOutputDTO.batch != null and teamOutputDTO.batch != ''">
+            AND o.batch REGEXP #{teamOutputDTO.batch}
+        </if>
         <choose>
             <when test="laminating == ''">
                 GROUP BY

--
Gitblit v1.8.0