diff --git a/Src/Dlhis.External/OpenApi/Services/Implements/GainfoService.cs b/Src/Dlhis.External/OpenApi/Services/Implements/GainfoService.cs index 98aa385f..4636452a 100644 --- a/Src/Dlhis.External/OpenApi/Services/Implements/GainfoService.cs +++ b/Src/Dlhis.External/OpenApi/Services/Implements/GainfoService.cs @@ -22,9 +22,11 @@ public class GainfoService : IGainfoService public async Task> GetAllGainfosAsync() { + var factories = new[] { "2401", "301", "302", "303", "304", "305", "306", "307" }; + var gainfos = await _dbContext.Queryable() .LeftJoin((x, d) => x.DepartmentNo == d.No) - .Where(x => x.Factory == "2401") + .Where(x => factories.Contains(x.Factory)) .Select((x, d) => new GainfoOpenResponse { Code = x.Code, @@ -38,7 +40,7 @@ public class GainfoService : IGainfoService var gainfoLeaves = await _dbContext.Queryable().AS("GainfoLeave") .LeftJoin((x, d) => x.DepartmentNo == d.No) - .Where(x => x.Factory == "2401") + .Where(x => factories.Contains(x.Factory)) .Select((x, d) => new GainfoOpenResponse { Code = x.Code,