From ba78a4af86a2916ecec4a92bfef6bc4f5a4e6d8e Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期四, 07 三月 2024 13:44:02 +0800
Subject: [PATCH] 排产删除、审核,修改代码格式
---
north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 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 0f207ee..d3ab571 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>
@@ -44,10 +45,10 @@
</if>
<if test="order.customerId != null and order.customerId != ''">
- and o.customer_id REGEXP #{customerId}
+ and o.customer_id REGEXP #{order.customerId}
</if>
<if test="order.customerName != null and order.customerName != ''">
- and o.customer_name REGEXP #{customerName}
+ and o.customer_name REGEXP #{order.customerName}
</if>
<if test="order.project != null and order.project != ''">
and o.project REGEXP #{order.project}
@@ -60,7 +61,7 @@
</if>
<if test="order.area != null and order.area != ''">
- and o.area REGEXP #{order.area}
+ and o.area REGEXP REGEXP_REPLACE(#{order.area}, '\\.0+$', '')
</if>
<if test="order.createTime != null and order.createTime != ''">
and date(o.create_time) = #{order.createTime}
@@ -111,10 +112,10 @@
</if>
<if test="order.customerId != null and order.customerId != ''">
- and o.customer_id REGEXP #{customerId}
+ and o.customer_id REGEXP #{order.customerId}
</if>
<if test="order.customerName != null and order.customerName != ''">
- and o.customer_name REGEXP #{customerName}
+ and o.customer_name REGEXP #{order.customerName}
</if>
<if test="order.project != null and order.project != ''">
and o.project REGEXP #{order.project}
@@ -169,4 +170,8 @@
update `order` set process_review = #{status} where order_id = #{id}
</update>
+ <update id="updateMoney">
+ update `order` set money = #{order.money} where order_id = #{order.orderId}
+ </update>
+
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0