|
|
@ -5,6 +5,7 @@ using System.Threading.Tasks; |
|
|
|
|
|
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using Microsoft.EntityFrameworkCore; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.Caching; |
|
|
|
using Volo.Abp.Domain.Repositories; |
|
|
@ -39,7 +40,19 @@ public class ItemContainerAppService |
|
|
|
_repository = repository; |
|
|
|
_manager = manager; |
|
|
|
} |
|
|
|
|
|
|
|
protected override async Task<Dictionary<ItemContainer, EntityState>> ImportProcessingEntityAsync( Dictionary<ItemContainer, EntityState> dictionary) |
|
|
|
{ |
|
|
|
var addList = dictionary.Where(p => p.Value == EntityState.Added).Select(p => p.Key); |
|
|
|
foreach (var itemContainer in addList) |
|
|
|
{ |
|
|
|
if (string.IsNullOrEmpty(itemContainer.BasicUom)) |
|
|
|
{ |
|
|
|
var itemBasic = await ItemBasicAppService.GetByCodeAsync(itemContainer.ItemCode).ConfigureAwait(false); |
|
|
|
itemContainer.BasicUom = itemBasic.BasicUom; |
|
|
|
} |
|
|
|
} |
|
|
|
return dictionary; |
|
|
|
} |
|
|
|
/// <summary>
|
|
|
|
/// 用来重写 新增实体
|
|
|
|
/// </summary>
|
|
|
@ -86,7 +99,7 @@ public class ItemContainerAppService |
|
|
|
{ |
|
|
|
//20240520苑静雯删除
|
|
|
|
await base.CheckItemBasicItemCodeAsync(importInput.ItemCode, validationRresult).ConfigureAwait(false); |
|
|
|
// await base.CheckItemBasicPackUomAsync(importInput.ItemCode, importInput.BasicUom, validationRresult).ConfigureAwait(false);
|
|
|
|
//await base.CheckItemBasicPackUomAsync(importInput.ItemCode, importInput.BasicUom, validationRresult).ConfigureAwait(false);
|
|
|
|
//await base.CheckItemContainerAsync(importInput.ContainerCode, validationRresult).ConfigureAwait(false);
|
|
|
|
} |
|
|
|
|
|
|
|