|
|
@ -1,6 +1,8 @@ |
|
|
|
using System.Linq; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using Win_in.Sfs.Auth.Users; |
|
|
|
using Win_in.Sfs.Wms.Inventory.Application.Contracts; |
|
|
|
using Win_in.Sfs.Wms.Store.Application.Contracts; |
|
|
|
using Win_in.Sfs.Wms.Store.Domain; |
|
|
@ -9,6 +11,8 @@ using Win_in.Sfs.Wms.Store.Domain.Shared; |
|
|
|
namespace Win_in.Sfs.Wms.Store.Application; |
|
|
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
using Volo.Abp.Identity; |
|
|
|
using Volo.Abp.Users; |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 计划外入库记录
|
|
|
@ -21,14 +25,14 @@ public class UnplannedReceiptNoteAppService : |
|
|
|
IUnplannedReceiptNoteAppService |
|
|
|
{ |
|
|
|
private readonly IUnplannedReceiptNoteManager _unplannedReceiptNoteManager; |
|
|
|
private readonly ILocationCapacityAppService _locationCapacityAppService; |
|
|
|
private readonly ISfsUserAppService _userAppService; |
|
|
|
|
|
|
|
public UnplannedReceiptNoteAppService(IUnplannedReceiptNoteRepository repository, |
|
|
|
IUnplannedReceiptNoteManager unplannedReceiptNoteManager, |
|
|
|
ILocationCapacityAppService locationCapacityAppService) : base(repository) |
|
|
|
ISfsUserAppService userAppService) : base(repository) |
|
|
|
{ |
|
|
|
_unplannedReceiptNoteManager = unplannedReceiptNoteManager; |
|
|
|
_locationCapacityAppService = locationCapacityAppService; |
|
|
|
_userAppService = userAppService; |
|
|
|
} |
|
|
|
|
|
|
|
[HttpPost("")] |
|
|
@ -45,7 +49,8 @@ public class UnplannedReceiptNoteAppService : |
|
|
|
|
|
|
|
detail.ExtraProperties = inputDetail.ExtraProperties; |
|
|
|
|
|
|
|
entity.Details.Add(detail); |
|
|
|
var userName = await _userAppService.GetUserNameByUserAsync(input.Worker).ConfigureAwait(false); |
|
|
|
entity.Worker = userName; |
|
|
|
} |
|
|
|
|
|
|
|
await _unplannedReceiptNoteManager.CreateAsync(entity).ConfigureAwait(false); |
|
|
|