From 8b2c74fb6842e8af60f70e7df6eef8837d74be07 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期四, 05 九月 2024 11:44:17 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override

---
 north-glass-erp/src/main/resources/mapper/pp/Report.xml |   33 ++++++++++++++++++++++++---------
 1 files changed, 24 insertions(+), 9 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 b778c2d..06f6252 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/Report.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -50,20 +50,19 @@
 
     </resultMap>
 
-    <resultMap id="damageDetailsTableMap" type="com.example.erp.entity.pp.DamageDetails">
+    <resultMap id="damageDetailsTableMap" type="com.example.erp.dto.pp.CrossProcessBreakingDTO">
         <result column="responsible_process" property="responsibleProcess"/>
         <result column="responsible_team" property="responsibleTeam"/>
         <result column="breakage_type" property="breakageType"/>
         <result column="breakage_reason" property="breakageReason"/>
         <result column="breakage_quantity" property="breakageQuantity"/>
         <result column="area" property="area"/>
-        <result column="reporting_work_id" property="reportingWork.reportingWorkId"/>
-        <result column="reporting_work_time" property="reportingWork.reportingWorkTime"/>
-        <result column="this_process" property="reportingWork.thisProcess"/>
-        <result column="project" property="order.project"/>
-        <result column="order_id" property="order.orderId"/>
-        <result column="glass_child" property="orderGlassDetail.glassChild"/>
-        <result column="process_id" property="reportingWork.processId"/>
+        <result column="reporting_work_time" property="reportingWorkTime"/>
+        <result column="this_process" property="thisProcess"/>
+        <result column="project" property="project"/>
+        <result column="order_id" property="orderId"/>
+        <result column="glass_child" property="glassChild"/>
+        <result column="process_id" property="processId"/>
         <result column="code" property="code"/>
     </resultMap>
 
@@ -237,6 +236,21 @@
           and dd.available = 0
           and reviewed_state != 2
           and rw.this_process != dd.responsible_process
+        <if test="crossProcessBreakingDTO.code != null and crossProcessBreakingDTO.code != ''">
+            and JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) regexp #{crossProcessBreakingDTO.code}
+        </if>
+        <if test="crossProcessBreakingDTO.processId != null and crossProcessBreakingDTO.processId != ''">
+            and rw.process_id regexp #{crossProcessBreakingDTO.processId}
+        </if>
+        <if test="crossProcessBreakingDTO.thisProcess != null and crossProcessBreakingDTO.thisProcess != ''">
+            and rw.this_process regexp #{crossProcessBreakingDTO.thisProcess}
+        </if>
+        <if test="crossProcessBreakingDTO.responsibleProcess != null and crossProcessBreakingDTO.responsibleProcess != ''">
+            and dd.responsible_process regexp #{crossProcessBreakingDTO.responsibleProcess}
+        </if>
+        <if test="crossProcessBreakingDTO.responsibleTeam != null and crossProcessBreakingDTO.responsibleTeam != ''">
+            and dd.responsible_team regexp #{crossProcessBreakingDTO.responsibleTeam}
+        </if>
         GROUP BY dd.id
         order by dd.id desc
         limit #{offset},#{pageSize}
@@ -689,7 +703,8 @@
                ifnull(f.inventory, 0)                               as inventoryNum,
                round(ifnull(f.inventory, 0) * a.area, 2)            as inventoryArea,
                ifnull(dd.quantity, 0)                               as shippedQuantity,
-               ifnull(dd.area, 0)                                   as area
+               ifnull(dd.area, 0)                                   as area,
+               JSON_UNQUOTE(JSON_EXTRACT(a.other_columns, '$.S01')) AS glassNumber
 
         from flow_card as c
                  left join

--
Gitblit v1.8.0