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; } ///