From eef4b7ca66cc2fb34d2d2cb0a4a8643f2bb0f838 Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期五, 18 十月 2024 13:44:06 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override

---
 north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml b/north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml
index 7436f02..1767a84 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml
@@ -10,7 +10,7 @@
         from
             sd.`order` as o
         where
-            o.quantity=#{order.quantity} and o.area=#{order.area} and o.project=#{order.project} and o.customer_id=#{order.customerId}
+            o.quantity=#{order.quantity} and o.area=#{order.area} and trim(o.project)=trim(#{order.project}) and o.customer_id=#{order.customerId}
     </select>
 
     <select id="selectMaxOrderId">
@@ -39,6 +39,7 @@
             `order` as a
         where
             year(a.create_time)  = year(now())
+            and a.id>400
     </select>
 
     <select id="selectOrderIdMin">
@@ -49,6 +50,22 @@
         select count(*) from sd.`order` where SUBSTR(order_id,3,11)=#{substringInt}
     </select>
 
+    <select id="selectOrderIdDay">
+        select count(*) from sd.`order` where order_id=#{oldOrderId} and SUBSTR(#{oldOrderId},9,2)=01
+    </select>
+
+    <select id="selectOrderIdMonth">
+        select count(*) from sd.`order` where order_id=#{oldOrderId} and SUBSTR(#{oldOrderId},7,4)=0001
+    </select>
+
+    <select id="selectOrderIdYear">
+        select count(*) from sd.`order` where order_id=#{oldOrderId} and SUBSTR(#{oldOrderId},5,2)=000001
+    </select>
+
+    <select id="selectOrderId">
+        select * from sd.`order` where order_id=#{orderId}
+    </select>
+
     <update id="updateOrderId">
         update sd.`order` set order_id=#{newOrderId} where order_id=#{oldOrderId}
     </update>

--
Gitblit v1.8.0