From 39526667ddfc076d0982cebe48a8e07f9dcaff5b Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期二, 27 八月 2024 08:08:21 +0800
Subject: [PATCH] 修改分架打印标签显示数量不对

---
 north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml b/north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml
index e67d237..1acdbfd 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml
@@ -38,7 +38,8 @@
         r.patch_processes,
         r.reviewer,
         date(r.create_time) as create_time,
-        date(r.update_time) as update_time
+        date(r.update_time) as update_time,
+        JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) AS glassNumber
         from pp.patch_log r left join sd.order_detail od on r.order_id=od.order_id and r.order_sort=od.order_number
         left join sd.`order` o on r.order_id = o.order_id
         left join (select * from sd.order_glass_detail group by order_id,order_number) as ogd
@@ -111,8 +112,8 @@
     </update>
 
     <update id="updateReportingWorkDetail"  >
-        update pp.reporting_work_detail set patch_status=1 where reporting_work_id=#{patchLog.reportingWorkId}
-                                          and order_number=#{patchLog.orderSort} and technology_number=#{patchLog.technologyNumber}
+        update pp.reporting_work_detail set patch_status=1 where reporting_work_id=#{reportingWorkId}
+                                          and order_number=#{orderSort} and technology_number=#{technologyNumber}
     </update>
 
 
@@ -158,5 +159,19 @@
         order by dd.id desc
     </select>
 
+    <delete id="deleteReplenishMp">
+        delete from pp.patch_log where patch_id=#{patchId}
+    </delete>
+
+    <update id="updatePatchDdMp">
+        update pp.damage_details set patch_status=0,quantity=quantity-#{qualityInspector}
+     where reporting_work_id=#{reportingWorkId} and order_number=#{orderSort} and technology_number=#{technologyNumber}
+    </update>
+
+    <update id="updatePatchBgMp">
+        update pp.reporting_work_detail set patch_status=0
+        where reporting_work_id=#{reportingWorkId} and order_number=#{orderSort} and technology_number=#{technologyNumber}
+    </update>
+
 
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0