|
|
@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Mvc; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.AspNetCore.Mvc; |
|
|
|
using Volo.Abp.Domain.Entities.Auditing; |
|
|
|
using Volo.Abp.Users; |
|
|
|
using Win_in.Sfs.Label.Application.Contracts; |
|
|
|
using Win_in.Sfs.Label.Domain; |
|
|
|
using Win_in.Sfs.Shared.Domain.Shared; |
|
|
@ -30,6 +31,7 @@ public class PurchaseReturnNoteController : AbpController |
|
|
|
|
|
|
|
private readonly IBalanceAppService _balanceAppService; |
|
|
|
private readonly IPurchaseOrderAppService _purchaseOrderAppService; |
|
|
|
private readonly ICurrentUser _currentUser; |
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
|
/// </summary>
|
|
|
@ -39,13 +41,14 @@ public class PurchaseReturnNoteController : AbpController |
|
|
|
public PurchaseReturnNoteController(IPurchaseReturnNoteAppService noteAppService, |
|
|
|
IInventoryLabelAppService labelAppService, |
|
|
|
IBalanceAppService balanceAppService, |
|
|
|
IPurchaseOrderAppService purchaseOrderAppService |
|
|
|
) |
|
|
|
IPurchaseOrderAppService purchaseOrderAppService, |
|
|
|
ICurrentUser currentUser) |
|
|
|
{ |
|
|
|
_noteAppService = noteAppService; |
|
|
|
this._labelAppService = labelAppService; |
|
|
|
this._balanceAppService = balanceAppService; |
|
|
|
_purchaseOrderAppService = purchaseOrderAppService; |
|
|
|
_currentUser = currentUser; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
@ -70,9 +73,12 @@ public class PurchaseReturnNoteController : AbpController |
|
|
|
// await this.SetDetailPoNumberAsync(input.Details);
|
|
|
|
|
|
|
|
var noteCreateInputs = await BuildNoteCreateInputsAsync(input, EnumPurchaseReturnType.BeforePuton).ConfigureAwait(false); |
|
|
|
|
|
|
|
foreach (var noteCreateInput in noteCreateInputs) |
|
|
|
{ |
|
|
|
if (noteCreateInput.Worker.IsNullOrEmpty()) |
|
|
|
{ |
|
|
|
noteCreateInput.Worker = _currentUser.UserName; |
|
|
|
} |
|
|
|
await _noteAppService.CreateAsync(noteCreateInput).ConfigureAwait(false); |
|
|
|
} |
|
|
|
|
|
|
@ -141,7 +147,6 @@ public class PurchaseReturnNoteController : AbpController |
|
|
|
|
|
|
|
createInputs.Add(returnNoteEditInput); |
|
|
|
} |
|
|
|
|
|
|
|
return createInputs; |
|
|
|
} |
|
|
|
private async Task SetDetailByPoAsync(string poNumber, PurchaseReturnNoteDetailInput createInputDetail) |
|
|
|