From 2a891d0391bc9f2dfaaaee8f63fcb20ff0932202 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 24 七月 2024 15:11:40 +0800
Subject: [PATCH] 修改订单报表

---
 north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml |   35 +++++++++++++++++++++++++----------
 1 files changed, 25 insertions(+), 10 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 35d0d51..be5d178 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml
@@ -130,25 +130,22 @@
            <if test="order.deliveryAddress != null and order.deliveryAddress != ''">
                and o.delivery_address REGEXP #{order.deliveryAddress}
            </if>
-        <if test="order.delivery != null and order.delivery != ''">
+        <if test="order.delivery != null ">
             and o.delivery = #{order.delivery}
         </if>
-        <if test="order.createOrder != null and order.createOrder != ''">
-            and o.create_order = #{order.createOrder}
-        </if>
-        <if test="order.processReview != null and order.processReview != ''">
+        <if test="order.processReview != null ">
             and o.process_review = #{order.processReview}
         </if>
-        <if test="order.orderReview != null and order.orderReview != ''">
+        <if test="order.orderReview != null ">
             and o.order_review = #{order.orderReview}
         </if>
-        <if test="order.productionOrder != null and order.productionOrder != ''">
+        <if test="order.productionOrder != null ">
             and o.production_order = #{order.productionOrder}
         </if>
-        <if test="order.processingCard != null and order.processingCard != ''">
+        <if test="order.processingCard != null ">
             and o.processing_card = #{order.processingCard}
         </if>
-        <if test="order.warehousing != null and order.warehousing != ''">
+        <if test="order.warehousing != null ">
             and o.warehousing = #{order.warehousing}
         </if>
         group by o.id
@@ -163,7 +160,7 @@
         from
         `order` as o
         where date (o.create_time)>=#{startDate} and date(o.create_time) &lt;= #{endDate}
-            <if test="orderType!= null and orderType != ''">
+            <if test="orderType!= null and orderType != 0">
                 and o.create_order = #{orderType}
             </if>
 
@@ -218,6 +215,24 @@
             <if test="order.deliveryAddress != null and order.deliveryAddress != ''">
                 and o.delivery_address REGEXP #{order.deliveryAddress}
             </if>
+        <if test="order.delivery != null ">
+            and o.delivery = #{order.delivery}
+        </if>
+        <if test="order.processReview != null ">
+            and o.process_review = #{order.processReview}
+        </if>
+        <if test="order.orderReview != null ">
+            and o.order_review = #{order.orderReview}
+        </if>
+        <if test="order.productionOrder != null ">
+            and o.production_order = #{order.productionOrder}
+        </if>
+        <if test="order.processingCard != null ">
+            and o.processing_card = #{order.processingCard}
+        </if>
+        <if test="order.warehousing != null ">
+            and o.warehousing = #{order.warehousing}
+        </if>
         order by o.id desc
     </select>
     

--
Gitblit v1.8.0