From 16b063870156db78148440971ab46c649e3e6018 Mon Sep 17 00:00:00 2001
From: 移动系统liao <liaoxujun@qq.com>
Date: 星期三, 19 三月 2025 11:44:22 +0800
Subject: [PATCH] 测试定版,

---
 cylsg/cylsg.Application/CyOS/CyOSStaffController.cs |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/cylsg/cylsg.Application/CyOS/CyOSStaffController.cs b/cylsg/cylsg.Application/CyOS/CyOSStaffController.cs
index f710ad4..d0249df 100644
--- a/cylsg/cylsg.Application/CyOS/CyOSStaffController.cs
+++ b/cylsg/cylsg.Application/CyOS/CyOSStaffController.cs
@@ -500,9 +500,9 @@
                 throw Oops.Oh("娌℃湁鏉冮檺");
             }
 
-            Expression<Func<OA_DeliverPlan, bool>> SearchList = (x) => true;
+            Expression<Func<OA_DeliverPlanPaiche, bool>> SearchList = (x) => true;
             SearchList = SearchList.And(x => x.FirmId == _OAServices.firmId);
-            SearchList = SearchList.And(x => x.Creater == Permissions.MemberId);//鍙湅鑷繁
+            SearchList = SearchList.And(x => x.BusinessManagerId == Permissions.KeyId);//鍙湅鑷繁 瀹㈡埛缁忕悊鏄嚜宸�
             SearchList = SearchList.And(x => x.ShifouDelivery !=2);//杩囨护鏈夋晥
             if (Param.DeliverKeyID!=null)
             {
@@ -515,11 +515,11 @@
             }
             if (Param.TimeStart != null)
             {
-                SearchList = SearchList.And(x => x.CreateTime > Param.TimeStart);
+                SearchList = SearchList.And(x => x.DeliverTime >= Param.TimeStart.Value.Date);
             }
             if (Param.TimeEnd != null)
             {
-                SearchList = SearchList.And(x => x.CreateTime < Param.TimeEnd.Value.AddDays(1));
+                SearchList = SearchList.And(x => x.DeliverTime < Param.TimeEnd.Value.Date.AddDays(1));
             }
             if (Param.DeliveredState != null)
             {
@@ -535,7 +535,7 @@
 
             //寮哄埗澧炲姞鍛樺伐杩囨护
             RefAsync<int> totle = 0;
-            var data = await _SugarClient.Queryable<OA_DeliverPlan>().Includes(x => x.Driver)
+            var data = await _SugarClient.Queryable<OA_DeliverPlanPaiche>().Includes(x => x.Driver).Includes(x=>x.DeliverPlans)
                 .Where(SearchList).OrderByDescending(x => x.CreateTime.Value.Date).OrderBy(x=>SqlFunc.Asc(x.Sort)).ToPageListAsync(Param.page.PageIndex, Param.page.PageSize, totle);
 
             Param.page.TotalCount = totle;
@@ -557,15 +557,15 @@
         /// </summary>
         /// <param name="KeyId"></param>
         /// <returns></returns>
-        public async Task<OA_DeliverPlan> GetDeliverPlanInfo(Guid KeyId)
+        public async Task<OA_DeliverPlanPaiche> GetDeliverPlanInfo(Guid KeyId)
         {
 
             if (!await CheckRols())
             {
                 throw Oops.Oh("娌℃湁鏉冮檺");
             }
-            return await _SugarClient.Queryable<OA_DeliverPlan>().Includes(x => x.Attachments).Includes(x=>x.Driver).Includes(x=>x.Manager)
-                .Where(x => x.Creater == Permissions.MemberId && x.Keyid == KeyId && x.ShifouDelivery != 2).FirstAsync();
+            return await _SugarClient.Queryable<OA_DeliverPlanPaiche>().Includes(x => x.Attachments).Includes(x=>x.Driver).Includes(x=>x.DeliverPlans)
+                .Where(x => x.BusinessManagerId == Permissions.KeyId && x.Keyid == KeyId && x.ShifouDelivery != 2).FirstAsync();
 
         }
 
@@ -679,7 +679,7 @@
         /// <summary>
         /// 鏁版嵁鍒楄〃
         /// </summary>
-        public List<OA_DeliverPlan> Data { get; set; }
+        public List<OA_DeliverPlanPaiche> Data { get; set; }
 
         /// <summary>
         /// 椤甸潰鍙傛暟

--
Gitblit v1.9.1