From c50c286df3108ce4a48674f15f29954fb3e4cb7f Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期一, 22 十二月 2025 12:15:37 +0800
Subject: [PATCH] 送货计划增加“完成情况:全部、已送、未送”查询条件,默认“未送”

---
 CY_ECommercePlatform/CY.BLL/OA/CoreDeliverOrderBLL.cs |   27 +++++++++++++++++++++++----
 1 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/CY_ECommercePlatform/CY.BLL/OA/CoreDeliverOrderBLL.cs b/CY_ECommercePlatform/CY.BLL/OA/CoreDeliverOrderBLL.cs
index dcd848f..040e438 100644
--- a/CY_ECommercePlatform/CY.BLL/OA/CoreDeliverOrderBLL.cs
+++ b/CY_ECommercePlatform/CY.BLL/OA/CoreDeliverOrderBLL.cs
@@ -164,9 +164,28 @@
         /// <param name="pa"></param>
         /// <returns></returns>
         public IEnumerable<CoreDeliverOrder> SelectModelPage(Pagination pa, Guid FirmId, int? DriverId, string shipAddress,
-            string BuyerName, string createTimeStart, string createTimeEnd)
+            string BuyerName, string createTimeStart, string createTimeEnd, string OrderState)
         {
-            string Condition = " and b.FirmId ='" + FirmId + "' and a.OrderState = 0 ";
+            string Condition = " and b.FirmId ='" + FirmId + "' and b.DeliverState != 2 ";
+
+            if (!string.IsNullOrEmpty(OrderState))
+            {
+                if (OrderState != "4")
+                {
+                    Condition += " and  a.OrderState = " + OrderState + " ";
+                }
+                else
+                {
+                    Condition += " and a.OrderState  in( 0,1 ) ";
+                }
+            }
+            else
+            {
+                Condition += " and a.OrderState  in( 0,1,2 ) ";
+
+
+            }
+
             if (DriverId.HasValue)
             {
                var oA_Staff  = staffBLL.GetModelByKeyid(DriverId);
@@ -174,7 +193,7 @@
             }
               
             if (!string.IsNullOrEmpty(shipAddress))
-                Condition += " and  b.shipAddress = '" + shipAddress + "'";
+                Condition += " and  b.shipAddress like '%" + shipAddress + "%'";
            
             if (!string.IsNullOrEmpty(BuyerName))
                 Condition += " and  c.Keyid  = '" + BuyerName + "'";
@@ -242,7 +261,7 @@
             }
 
             if (!string.IsNullOrEmpty(shipAddress))
-                Condition += " and  b.shipAddress = '" + shipAddress + "'";
+                Condition += " and  b.shipAddress like '%" + shipAddress + "%'";
 
             if (!string.IsNullOrEmpty(BuyerName))
                 Condition += " and  c.Keyid  = '" + BuyerName + "'";

--
Gitblit v1.9.1