From 00a6c486eb0f4aec35af265ff9851bff41f18bd2 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期一, 18 三月 2024 16:43:26 +0800
Subject: [PATCH] 修改报工前端判断流程卡位数

---
 north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml |   15 ++++++++++++++-
 1 files changed, 14 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 e730c2a..b294546 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml
@@ -5,11 +5,12 @@
 <mapper namespace="com.example.erp.mapper.sd.OrderMapper">
     <select id="selectMaxOrderId">
         select
-            COUNT(a.order_id)
+           ifnull(SUBSTR(max(order_id) from 9),0)
         from
             `order` as a
         where
             date(a.create_time) = curdate()
+        order by id desc,order_id	desc limit  1
     </select>
     
 
@@ -173,4 +174,16 @@
         update `order` set money = #{order.money} where order_id = #{order.orderId}
     </update>
 
+    <update id="cancelOrder">
+        update `order` as a set
+            a.create_order = - a.create_order,
+            a.process_review = - a.process_review,
+            a.order_review = - a.order_review,
+            a.production_order = - a.production_order,
+            a.processing_card =  - a.processing_card,
+            a.warehousing = - a.warehousing,
+            a.delivery = - a.delivery
+        where order_id = #{order.orderId}
+    </update>
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0