From ac1f5097b08b9db6531e8dfeff12c5caf251d98e Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期四, 01 八月 2024 15:49:23 +0800
Subject: [PATCH] 订单首页显示备注信息

---
 north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml |   51 ++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 46 insertions(+), 5 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 3ad6e45..8715439 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} and o.money=#{order.money}
+            o.quantity=#{order.quantity} and o.area=#{order.area} and o.project=#{order.project} and o.customer_id=#{order.customerId}
     </select>
 
     <select id="selectMaxOrderId">
@@ -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>
     
 
@@ -70,7 +69,7 @@
             *,
         ifnull(sum(fgi.quantity_available),0) as goodsQuantity
         from
-            `order` as o
+            sd.`order` as o
         left join mm.finished_goods_inventory as  fgi
         on o.order_id = fgi.order_id
         where  date(o.create_time)>=#{startDate} and date(o.create_time) &lt;= #{endDate}
@@ -130,6 +129,27 @@
            <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>
+        <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
         limit #{offset},#{pageSize}
@@ -142,7 +162,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>
 
@@ -197,6 +217,27 @@
             <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>
+        <if test="order.processingNote != null and order.processingNote != ''">
+            and o.processing_note REGEXP #{order.processingNote}
+        </if>
         order by o.id desc
     </select>
     

--
Gitblit v1.8.0