|
@ -13,11 +13,13 @@ namespace Win_in.Sfs.Wms.Store.Domain; |
|
|
public class SupplierAsnManager : SfsStoreManagerBase<SupplierAsn, SupplierAsnDetail>, ISupplierAsnManager |
|
|
public class SupplierAsnManager : SfsStoreManagerBase<SupplierAsn, SupplierAsnDetail>, ISupplierAsnManager |
|
|
{ |
|
|
{ |
|
|
private readonly ISupplierAsnRepository _repository; |
|
|
private readonly ISupplierAsnRepository _repository; |
|
|
|
|
|
private readonly ISupplierAppService _supplierAppService; |
|
|
|
|
|
|
|
|
public SupplierAsnManager( |
|
|
public SupplierAsnManager( |
|
|
ISupplierAsnRepository repository) : base(repository) |
|
|
ISupplierAsnRepository repository, ISupplierAppService supplierAppService) : base(repository) |
|
|
{ |
|
|
{ |
|
|
_repository = repository; |
|
|
_repository = repository; |
|
|
|
|
|
_supplierAppService = supplierAppService; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#region 东阳使用
|
|
|
#region 东阳使用
|
|
@ -32,6 +34,9 @@ public class SupplierAsnManager : SfsStoreManagerBase<SupplierAsn, SupplierAsnDe |
|
|
await SetDetailAsync(entity.Details).ConfigureAwait(false); |
|
|
await SetDetailAsync(entity.Details).ConfigureAwait(false); |
|
|
entity = await Repository.InsertAsync(entity).ConfigureAwait(false); |
|
|
entity = await Repository.InsertAsync(entity).ConfigureAwait(false); |
|
|
await PublishCreatedAsync(entity).ConfigureAwait(false); |
|
|
await PublishCreatedAsync(entity).ConfigureAwait(false); |
|
|
|
|
|
var supplierDto = await _supplierAppService.GetByCodeAsync(entity.SupplierCode).ConfigureAwait(false); |
|
|
|
|
|
entity.SupplierName = supplierDto.Name; |
|
|
|
|
|
entity.SupplierAddress = supplierDto.Address; |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|