diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionPlanRequestController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionPlanRequestController.cs
index 904a3f8ed..19010f161 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionPlanRequestController.cs
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionPlanRequestController.cs
@@ -1,4 +1,5 @@
using System.Collections.Generic;
+using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
@@ -52,16 +53,29 @@ public class InjectionPlanRequestController : AbpController
}
///
- /// 获取物品类别列表
+ /// 获取物品类别名称
+ ///
+ ///
+ [HttpGet("item-category-name")]
+ public virtual async Task> GetItemCategoryNameAsync()
+ {
+ var entities = await _injectionRequestAppService.GetItemCategoryListAsync().ConfigureAwait(false);
+ var categoryNames = entities.Select(p => p.Category).Distinct().ToList();
+
+ return categoryNames;
+ }
+
+ ///
+ /// 根据类别名称获取物品类别列表
///
- ///
+ ///
///
[HttpGet("list/item-category")]
- public virtual async Task> GetItemCategoryListAsync()
+ public virtual async Task> GetItemCategoryListAsync(string categoryName)
{
- var entities = await _injectionRequestAppService.GetItemCategoryListAsync().ConfigureAwait(false);
+ var entities = await _injectionRequestAppService.GetItemCategoryListAsync().ConfigureAwait(false);
- return entities;
+ return entities.Where(p=>p.Category== categoryName).ToList();
}
}