From 34c537a962c4ec283c26c888b5dec25a8373e4de Mon Sep 17 00:00:00 2001 From: liguoyang Date: Tue, 10 Jun 2025 20:22:54 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=A2=9E=E5=8A=A0=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=A4=A7=E5=8D=8E=E4=BA=BA=E8=84=B8=E6=9F=9C2401=E7=A6=BB?= =?UTF-8?q?=E8=81=8C=E4=BA=BA=E5=91=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/Implements/GainfoService.cs | 42 +++++++++---------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/Src/Dlhis.External/OpenApi/Services/Implements/GainfoService.cs b/Src/Dlhis.External/OpenApi/Services/Implements/GainfoService.cs index d9d794dd..b013d9cb 100644 --- a/Src/Dlhis.External/OpenApi/Services/Implements/GainfoService.cs +++ b/Src/Dlhis.External/OpenApi/Services/Implements/GainfoService.cs @@ -51,29 +51,27 @@ 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(); - // - // return gainfos.Concat(gainfoLeaves).ToList(); + var gainfoLeaves = await _dbContext.Queryable().AS("GainfoLeave") + .LeftJoin((x, d) => x.DepartmentNo == d.No) + .Where(x => x.Factory == "2401") + .Where(x => SqlFunc.Subqueryable() + .Where(p => p.Factory == "2401") + .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; + return gainfos.Concat(gainfoLeaves).ToList(); } ///