From 898c05c6037d64912c7e80f81f1b5060b4f075c2 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周日, 11 5月 2025 10:12:22 +0800
Subject: [PATCH] 调整 automap
---
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