From 14f9c8378bde7d9a8d8f1fcc393e0e8d49eced82 Mon Sep 17 00:00:00 2001
From: zs <zhousong@weben-smart.com>
Date: 周五, 09 5月 2025 17:44:29 +0800
Subject: [PATCH] 查找空库位,查找库存

---
 HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Repositories/EfCoreWmsPlaceRepository.cs |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Repositories/EfCoreWmsPlaceRepository.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Repositories/EfCoreWmsPlaceRepository.cs
index 3d655e4..dc5cf40 100644
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Repositories/EfCoreWmsPlaceRepository.cs
+++ b/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Repositories/EfCoreWmsPlaceRepository.cs
@@ -1,4 +1,5 @@
 using System.Linq.Dynamic.Core;
+using CMS.Plugin.HIAWms.Domain.Shared.Enums;
 using CMS.Plugin.HIAWms.Domain.WmsAreas;
 using CMS.Plugin.HIAWms.Domain.WmsPlaces;
 using CMS.Plugin.HIAWms.EntityFrameworkCore.Extensions;
@@ -84,7 +85,7 @@
     /// <returns></returns>
     public async Task<List<WmsPlace>> GetAisleListForSelectAsync(CancellationToken cancellationToken = default)
     {
-        return await (await GetDbSetAsync())
+        return await (await GetDbSetAsync()).Where(x => !x.IsDeleted)
             .ToListAsync(GetCancellationToken(cancellationToken));
     }
 
@@ -115,4 +116,17 @@
         return (await GetQueryableAsync())
             .Where(x => !x.IsDeleted).IncludeDetails();
     }
+
+    /// <summary>
+    /// 获取库区列表
+    /// </summary>
+    /// <param name="cancellationToken"></param>
+    /// <returns></returns>
+    public async Task<List<WmsPlace>> GetPlaceListForSelectAsync(PlaceTypeEnum placeType,CancellationToken cancellationToken = default)
+    {
+        return await (await GetDbSetAsync())
+            .Where(x => !x.IsDeleted)
+            .Where(x=>x.StorageTypeNo == placeType)
+           .ToListAsync(GetCancellationToken(cancellationToken));
+    }
 }

--
Gitblit v1.9.3