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/CyOSSettingController.cs |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/cylsg/cylsg.Application/CyOS/CyOSSettingController.cs b/cylsg/cylsg.Application/CyOS/CyOSSettingController.cs
index 687476c..538fbb9 100644
--- a/cylsg/cylsg.Application/CyOS/CyOSSettingController.cs
+++ b/cylsg/cylsg.Application/CyOS/CyOSSettingController.cs
@@ -7,6 +7,7 @@
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using static SKIT.FlurlHttpClient.Wechat.Api.Models.ProductOfflineGetSameCityTemplateResponse.Types.Template.Types;
 
 namespace cylsg.Application.CyOS
 {
@@ -41,7 +42,7 @@
                 Name = x.Name,
                 Keyid = x.Keyid,
                 Remark = x.Remark,
-            }).WithCache(3600).ToListAsync();
+            }).WithCache(60).ToListAsync();
         }
         /// <summary>
         /// 鑾峰彇绉戠洰鍒楄〃
@@ -56,7 +57,7 @@
                 SubjectName = x.SubjectName,
                 Keyid = x.Keyid,
                 Remark = x.Remark,
-            }).WithCache(3600).ToListAsync();
+            }).WithCache(60).ToListAsync();
         }
         /// <summary>
         /// 鑾峰彇娴佹按鍙�
@@ -102,7 +103,7 @@
                 MemberId = x.MemberId,
                 Keyid = x.Keyid,
 
-            }).WithCache(1800).ToListAsync();
+            }).WithCache(60).ToListAsync();
         }
 
 
@@ -114,14 +115,15 @@
         [AllowAnonymous]
         public async Task<List<OaStaff>> GetDriversOfWithin7days()
         {
-            var list = await _client.Queryable<OA_DeliverPlan>().Where(x => SqlFunc.ToDate(x.DeliverTime) < DateTime.Now.AddDays(8).Date && SqlFunc.ToDate(x.DeliverTime) >= DateTime.Now.Date).GroupBy(x => x.DriverId).Select(x => x.DriverId).ToListAsync();
-            return await _client.Queryable<OaStaff>().In(list).Where(x => x.Status == "鍦ㄨ亴" && x.FirmId == _oAServices.firmId && x.BF_IsDriver).Select(x => new OaStaff
+           
+            var list = await _client.Queryable<OA_DeliverPlanPaiche>().Where(x =>( x.DeliverTime.Value.Date < DateTime.Now.AddDays(8).Date) && (x.DeliverTime.Value.Date >= DateTime.Now.Date)).Select(x => x.DriverId).ToListAsync();
+            return await _client.Queryable<OaStaff>().Where(x=>list.Contains(x.Keyid)).Where(x => x.Status == "鍦ㄨ亴" && x.FirmId == _oAServices.firmId && x.BF_IsDriver).Select(x => new OaStaff
             {
                 Name = x.Name,
                 MemberId = x.MemberId,
                 Keyid = x.Keyid,
 
-            }).WithCache(1800).ToListAsync();
+            }).WithCache(60).ToListAsync();
             ////      return await _client.Queryable<OA_DeliverPlan>()
             ////.LeftJoin<OaStaff>((dp, os) => dp.DriverId == os.Keyid)
             ////.Where((dp, os) => SqlFunc.ToDate(dp.DeliverTime) < DateTime.Now.AddDays(8).Date

--
Gitblit v1.9.1