From cc78e409cdca2a414f654490d3bc78cce429c59e Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期一, 05 八月 2024 09:13:42 +0800
Subject: [PATCH] 新增订单总报表

---
 north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml |   27 ++++++++++++++++++++++++---
 1 files changed, 24 insertions(+), 3 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 be5d178..d6672cf 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml
@@ -25,12 +25,11 @@
 
     <select id="selectMaxOrderIdByMonth">
         select
-            ifnull(SUBSTR(order_id from 7),0)
+            ifnull(SUBSTR(max(order_id) from 7),0)
         from
             `order` as a
         where
             date(a.create_time)  BETWEEN DATE_FORMAT(DATE(NOW()), '%Y-%m-01') AND DATE(NOW())
-        order by id desc	 limit  1
     </select>
     
 
@@ -115,6 +114,14 @@
                and o.salesman REGEXP #{order.salesman}
            </if>
 
+            <if test="order.creator != null and order.creator != ''">
+                and o.creator REGEXP #{order.creator}
+            </if>
+
+            <if test="order.verifier != null and order.verifier != ''">
+                and o.verifier REGEXP #{order.verifier}
+            </if>
+
            <if test="order.perimeter != null and order.perimeter != ''">
                and o.perimeter REGEXP #{order.perimeter}
            </if>
@@ -147,6 +154,9 @@
         </if>
         <if test="order.warehousing != null ">
             and o.warehousing = #{order.warehousing}
+        </if>
+        <if test="order.processingNote != null and order.processingNote != ''">
+            and o.processing_note REGEXP #{order.processingNote}
         </if>
         group by o.id
         order by o.id desc
@@ -200,6 +210,14 @@
                 and o.salesman REGEXP #{order.salesman}
             </if>
 
+            <if test="order.creator != null and order.creator != ''">
+                and o.creator REGEXP #{order.creator}
+            </if>
+
+            <if test="order.verifier != null and order.verifier != ''">
+                and o.verifier REGEXP #{order.verifier}
+            </if>
+
             <if test="order.perimeter != null and order.perimeter != ''">
                 and o.perimeter REGEXP #{order.perimeter}
             </if>
@@ -233,6 +251,9 @@
         <if test="order.warehousing != null ">
             and o.warehousing = #{order.warehousing}
         </if>
+        <if test="order.processingNote != null and order.processingNote != ''">
+            and o.processing_note REGEXP #{order.processingNote}
+        </if>
         order by o.id desc
     </select>
     
@@ -255,7 +276,7 @@
     </update>
 
     <update id="updateMoney">
-        update `order` set money = #{order.money},calculate_type = #{order.calculateType} where order_id = #{order.orderId}
+        update `order` set money = #{order.money},calculate_type = #{order.calculateType},other_money=#{order.otherMoney} where order_id = #{order.orderId}
     </update>
 
     <update id="cancelOrder">

--
Gitblit v1.8.0