From d57a4d61a81e2e27b09c4c9560358efb668f349d Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周一, 19 5月 2025 09:12:37 +0800
Subject: [PATCH] 增加 扩展查询方法

---
 HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Repositories/EfCoreWmsAreaRepository.cs |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Repositories/EfCoreWmsAreaRepository.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Repositories/EfCoreWmsAreaRepository.cs
index 64d4d26..5fc6614 100644
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Repositories/EfCoreWmsAreaRepository.cs
+++ b/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Repositories/EfCoreWmsAreaRepository.cs
@@ -24,15 +24,14 @@
     }
 
     /// <inheritdoc />
-    public virtual async Task<WmsArea> FindByNameAsync(string name, CancellationToken cancellationToken = default)
+    public virtual async Task<WmsArea> FindByNameAsync(string areaNo, CancellationToken cancellationToken = default)
     {
         return await (await GetDbSetAsync())
             .IncludeDetails()
             .OrderBy(t => t.Sort)
             .Where(x => !x.IsDeleted)
-            .FirstOrDefaultAsync(t => t.AreaName == name, GetCancellationToken(cancellationToken));
+            .FirstOrDefaultAsync(t => t.AreaNo == areaNo, GetCancellationToken(cancellationToken));
     }
-
 
     /// <summary>
     /// 查看库区是否存在
@@ -88,6 +87,7 @@
     public async Task<List<WmsArea>> GetListForSelectAsync(CancellationToken cancellationToken = default)
     {
         return await (await GetDbSetAsync())
+            .Where(x => !x.IsDeleted)
            .ToListAsync(GetCancellationToken(cancellationToken));
     }
 

--
Gitblit v1.9.3