|
|
@ -17,14 +17,16 @@ namespace Win_in.Sfs.Wms.Pda.Controllers.Stores; |
|
|
|
public class InjectionPlanRequestController : AbpController |
|
|
|
{ |
|
|
|
private readonly IInjectionPlanRequestAppService _injectionRequestAppService; |
|
|
|
private readonly IItemContainerAppService _itemContainerAppService; |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="InjectionPlanRequestAppService"></param>
|
|
|
|
public InjectionPlanRequestController(IInjectionPlanRequestAppService InjectionPlanRequestAppService) |
|
|
|
public InjectionPlanRequestController(IInjectionPlanRequestAppService InjectionPlanRequestAppService, IItemContainerAppService itemContainerAppService) |
|
|
|
{ |
|
|
|
_injectionRequestAppService = InjectionPlanRequestAppService; |
|
|
|
_itemContainerAppService = itemContainerAppService; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
@ -73,9 +75,26 @@ public class InjectionPlanRequestController : AbpController |
|
|
|
[HttpGet("list/item-category")] |
|
|
|
public virtual async Task<List<ItemBasicDTO>> GetItemCategoryListAsync(string categoryName) |
|
|
|
{ |
|
|
|
var entities = await _injectionRequestAppService.GetItemCategoryListAsync().ConfigureAwait(false); |
|
|
|
var entities = await _injectionRequestAppService.GetItemCategoryListAsync().ConfigureAwait(false); |
|
|
|
|
|
|
|
var itemEntities = entities.Where(p => p.Category == categoryName).ToList(); |
|
|
|
foreach (var item in itemEntities) |
|
|
|
{ |
|
|
|
var itemContainerDto = await _itemContainerAppService.GetByItemCodeAsync(item.Code).ConfigureAwait(false); |
|
|
|
|
|
|
|
if(itemContainerDto != null) |
|
|
|
{ |
|
|
|
item.StdPackQty = itemContainerDto.Qty; |
|
|
|
item.BasicUom = itemContainerDto.BasicUom; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
item.StdPackQty = 1; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return entities.Where(p=>p.Category== categoryName).ToList(); |
|
|
|
return itemEntities; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|