|
|
@ -1,3 +1,4 @@ |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using Win_in.Sfs.Wms.Store.Application.Contracts; |
|
|
@ -14,15 +15,32 @@ public abstract class CountAdjustRequestAppService : |
|
|
|
<CountAdjustRequest, CountAdjustRequestDTO, SfsStoreRequestInputBase, CountAdjustRequestEditInput, CountAdjustRequestDetail, CountAdjustRequestDetailDTO, SfsStoreRequestInputBase, CountAdjustRequestImportInput>, |
|
|
|
ICountAdjustRequestAppService |
|
|
|
{ |
|
|
|
private readonly ICountAdjustRequestManager _CountAdjustRequestManager; |
|
|
|
private readonly ICountAdjustRequestManager _countAdjustRequestManager; |
|
|
|
|
|
|
|
public CountAdjustRequestAppService( |
|
|
|
ICountAdjustRequestRepository repository, |
|
|
|
ICountAdjustRequestManager CountAdjustRequestManager |
|
|
|
ICountAdjustRequestManager countAdjustRequestManager |
|
|
|
|
|
|
|
) : base(repository, CountAdjustRequestManager) |
|
|
|
) : base(repository, countAdjustRequestManager) |
|
|
|
{ |
|
|
|
_CountAdjustRequestManager = CountAdjustRequestManager; |
|
|
|
_countAdjustRequestManager = countAdjustRequestManager; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 【创建】盘点调整申请
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="input"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost("")] |
|
|
|
//[Authorize(CountAdjustRequestPermissions.Create)]
|
|
|
|
public override async Task<CountAdjustRequestDTO> CreateAsync(CountAdjustRequestEditInput input) |
|
|
|
{ |
|
|
|
var entity = ObjectMapper.Map<CountAdjustRequestEditInput, CountAdjustRequest>(input); |
|
|
|
|
|
|
|
await _countAdjustRequestManager.CreateAsync(entity).ConfigureAwait(false); |
|
|
|
|
|
|
|
var dto = ObjectMapper.Map<CountAdjustRequest, CountAdjustRequestDTO>(entity); |
|
|
|
return dto; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|