From bd28b249927b7eada72ea0f8aee6f700562f14e8 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Thu, 17 Oct 2024 17:07:22 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=B5=B7=E5=BA=B7=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OpenApi/Services/Implements/GainfoService.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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,