From a247547df86f0fad8f03aebb91de68d3f2bc7918 Mon Sep 17 00:00:00 2001 From: 移动系统liao <liaoxujun@qq.com> Date: 星期四, 01 五月 2025 10:16:52 +0800 Subject: [PATCH] 修正sugsql导航更新加配置的bug --- cylsg/cylsg.Application/CyOS/CyOSSettingController.cs | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/cylsg/cylsg.Application/CyOS/CyOSSettingController.cs b/cylsg/cylsg.Application/CyOS/CyOSSettingController.cs index 538fbb9..87256d7 100644 --- a/cylsg/cylsg.Application/CyOS/CyOSSettingController.cs +++ b/cylsg/cylsg.Application/CyOS/CyOSSettingController.cs @@ -49,7 +49,7 @@ /// </summary> /// <returns></returns> [HttpGet] - + [AllowAnonymous] public async Task<List<OaSubjectSet>> getKeMuList() { return await _client.Queryable<OaSubjectSet>().Where(x => x.Status == true && x.FirmId == _oAServices.firmId && x.SubjectType == "璐�").Select(x => new OaSubjectSet @@ -74,7 +74,7 @@ /// </summary> /// <returns></returns> [HttpGet] - [AllowAnonymous] + //[AllowAnonymous] public async Task<object> GeCorporateClients() { return await _client.Queryable<OA_CorporateClients>() @@ -95,15 +95,17 @@ /// </summary> /// <returns></returns> [HttpGet] + [AllowAnonymous] public async Task<List<OaStaff>> Getdrivers() { - return await _client.Queryable<OaStaff>().Where(x => x.Status == "鍦ㄨ亴" && x.FirmId == _oAServices.firmId && x.BF_IsDriver).Select(x => new OaStaff + return await _client.Queryable<OaStaff>().Includes(x=>x.Car).Where(x => x.Status == "鍦ㄨ亴" && x.FirmId == _oAServices.firmId && x.BF_IsDriver).Select(x => new OaStaff { Name = x.Name, MemberId = x.MemberId, Keyid = x.Keyid, + Car=x.Car - }).WithCache(60).ToListAsync(); + }).ToListAsync(); } @@ -117,13 +119,14 @@ { 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 + return await _client.Queryable<OaStaff>().Includes(x=>x.Car).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, + Car=x.Car - }).WithCache(60).ToListAsync(); + })/*.WithCache(30)*/.ToListAsync(); //Includes(x => x.Car)鍔犵紦瀛樹細鎶ラ敊 //// 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