From b80ea0a7715fed80e1aeedda0c703e05df12ee06 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Tue, 13 May 2025 10:06:14 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=8F=98=E6=9B=B4=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E7=9A=84=E4=BA=BA=E5=91=98=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/Implements/GainfoService.cs | 55 ++++++++++++------- 1 file changed, 34 insertions(+), 21 deletions(-) diff --git a/Src/Dlhis.External/OpenApi/Services/Implements/GainfoService.cs b/Src/Dlhis.External/OpenApi/Services/Implements/GainfoService.cs index c76b5c30..d9d794dd 100644 --- a/Src/Dlhis.External/OpenApi/Services/Implements/GainfoService.cs +++ b/Src/Dlhis.External/OpenApi/Services/Implements/GainfoService.cs @@ -23,7 +23,18 @@ public class GainfoService : IGainfoService public async Task> GetAllGainfosAsync() { - var factories = new[] { "2401", "301", "302", "303", "304", "305", "306", "307" }; + var factories = new[] + { + "1201", "1701", "1801", + "1901", "1902", "201", + "2001", "2301", "2401", + "301", "302", "303", + "304", "305", "306", + "307", "401", "501", + "502", "503", "504", + "505", "701", "601", + "1601" + }; var gainfos = await _dbContext.Queryable() .LeftJoin((x, d) => x.DepartmentNo == d.No) @@ -40,27 +51,29 @@ public class GainfoService : IGainfoService }) .ToListAsync(); - var gainfoLeaves = await _dbContext.Queryable().AS("GainfoLeave") - .LeftJoin((x, d) => x.DepartmentNo == d.No) - .Where(x => factories.Contains(x.Factory)) - .Where(x => SqlFunc.Subqueryable() - .Where(p => factories.Contains(p.Factory)) - .Where(p => p.Code == x.Code) - .NotAny() - ) - .Select((x, d) => new GainfoOpenResponse - { - Code = x.Code, - DepartmentNo = x.DepartmentNo, - DepartmentName = d.Name, - Name = x.Name, - Gender = x.Gender, - Factory = x.Factory, - Status = GainfoStatusEnumType.Leave, - }) - .ToListAsync(); + // var gainfoLeaves = await _dbContext.Queryable().AS("GainfoLeave") + // .LeftJoin((x, d) => x.DepartmentNo == d.No) + // .Where(x => factories.Contains(x.Factory)) + // .Where(x => SqlFunc.Subqueryable() + // .Where(p => factories.Contains(p.Factory)) + // .Where(p => p.Code == x.Code) + // .NotAny() + // ) + // .Select((x, d) => new GainfoOpenResponse + // { + // Code = x.Code, + // DepartmentNo = x.DepartmentNo, + // DepartmentName = d.Name, + // Name = x.Name, + // Gender = x.Gender, + // Factory = x.Factory, + // Status = GainfoStatusEnumType.Leave, + // }) + // .ToListAsync(); + // + // return gainfos.Concat(gainfoLeaves).ToList(); - return gainfos.Concat(gainfoLeaves).ToList(); + return gainfos; } ///