diff --git a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoStore.cs b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoStore.cs index ebcfdc0a..7ef16385 100644 --- a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoStore.cs +++ b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoStore.cs @@ -27,6 +27,11 @@ public class GainfoStore : IGainfoStore { gainfoStatus ??= GainfoStatusEnumType.Working; + if (gainfoStatus == GainfoStatusEnumType.Working) + { + return _dbContext.Queryable(); + } + var tableName = typeof(GainfoEntity).GetCustomAttribute()!.TableName; return _dbContext.Queryable().AS(tableName + gainfoStatus); }