Browse Source

Merge branch 'dev_DY_CC' of http://dev.ccwin-in.com:3000/BoXu.Zheng/WZC2 into dev_DY_CC

dev_DY_CC
lvzb 9 months ago
parent
commit
5c3d7623c8
  1. 5
      be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceManager.cs
  2. 7
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/SupplierAsns/SupplierAsnManager.cs
  3. 16
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/PurchaseReceiptNoteEventHandler.cs

5
be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceManager.cs

@ -142,6 +142,11 @@ public class BalanceManager : DomainService, IBalanceManager
var checkLocationTypes = settingCheckLocationTypes.GetEnumList<EnumLocationType>(",");
if (location.Type is not (EnumLocationType.INSP or EnumLocationType.HOLD or EnumLocationType.TRANSPORT))
{
return;
}
if (!checkLocationTypes.Contains(location.Type))
{
return;

7
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/SupplierAsns/SupplierAsnManager.cs

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

16
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/PurchaseReceiptNoteEventHandler.cs

@ -143,18 +143,14 @@ public class PurchaseReceiptNoteEventHandler
private async Task CreateTransactionsAsync(PurchaseReceiptNote entity,
Dictionary<string, EnumInspectType> dictionary)
{
if (entity.Details.Any(p =>
p.PurchaseReceiptInspectStatus == EnumPurchaseReceiptInspect.OK))
{
var inboundTransactions = new List<TransactionEditInput>();
var inboundTransactions = new List<TransactionEditInput>();
//创建需要创建库存的 库存事务
inboundTransactions.AddRange(await BuildTransactionsAsync(entity, dictionary).ConfigureAwait(false));
//创建需要创建库存的 库存事务
inboundTransactions.AddRange(await BuildTransactionsAsync(entity, dictionary).ConfigureAwait(false));
if (inboundTransactions.Any())
{
await TransactionAppService.AddManyAsync(inboundTransactions).ConfigureAwait(false);
}
if (inboundTransactions.Any())
{
await TransactionAppService.AddManyAsync(inboundTransactions).ConfigureAwait(false);
}
}

Loading…
Cancel
Save