From 33331f53cc53742a0d7581857b77303a27a91250 Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期二, 29 七月 2025 17:16:08 +0800
Subject: [PATCH] 获取每一层拱高

---
 north-glass-erp/src/main/resources/mapper/sd/ProductMapper.xml |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/north-glass-erp/src/main/resources/mapper/sd/ProductMapper.xml b/north-glass-erp/src/main/resources/mapper/sd/ProductMapper.xml
index 2edce48..4976f9c 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/ProductMapper.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/ProductMapper.xml
@@ -133,4 +133,14 @@
     <update id="updateProductStateById">
         update product set state = #{state} where id = #{id}
     </update>
+
+    <select id="getGlassThickness">
+        select sum(REPLACE(JSON_UNQUOTE(JSON_EXTRACT(separation, '$.thickness')),'mm',''))
+        from product_detail as a
+        where a.prod_id = #{productId}
+        and a.id &lt;= (select b.id
+                        from product_detail as b
+                        where b.prod_id = #{productId} and b.glass_sort = #{technologyNumber})
+
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0