1 changed files with 102 additions and 0 deletions
@ -0,0 +1,102 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp.Application.Dtos; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
using Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
namespace Win_in.Sfs.Wms.Pda.Controllers.Stores; |
|||
|
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
[ApiController] |
|||
[Route($"{PdaHostConst.ROOT_ROUTE}store/transferlib-job")] |
|||
|
|||
public class TransferLibJobController : AbpController |
|||
{ |
|||
private readonly ITransferLibJobAppService _transferLibJobAppService; |
|||
|
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
/// <param name="transferLibJobAppService"></param>
|
|||
public TransferLibJobController(ITransferLibJobAppService transferLibJobAppService) |
|||
{ |
|||
_transferLibJobAppService = transferLibJobAppService; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 获取盘点任务详情
|
|||
/// </summary>
|
|||
/// <param name="id"></param>
|
|||
/// <returns></returns>
|
|||
[HttpGet("{id}")] |
|||
public virtual async Task<ActionResult<TransferLibJobDTO>> GetAsync(Guid id) |
|||
{ |
|||
var result = await _transferLibJobAppService.GetAsync(id).ConfigureAwait(false); |
|||
return Ok(result); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 获取列表 筛选
|
|||
/// </summary>
|
|||
/// <param name="sfsJobDTO"></param>
|
|||
/// <returns></returns>
|
|||
[HttpPost("list")] |
|||
public virtual async Task<PagedResultDto<TransferLibJobDTO>> GetListAsync(SfsJobRequestInputBase sfsJobDTO) |
|||
{ |
|||
var list = await _transferLibJobAppService.GetPagedListByFilterAsync(sfsJobDTO, true).ConfigureAwait(false); |
|||
return list; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 获取任务数量
|
|||
/// </summary>
|
|||
/// <returns></returns>
|
|||
[HttpPost("count")] |
|||
public virtual async Task<ActionResult<long>> CountAsync(SfsJobRequestInputBase sfsJobDTO) |
|||
{ |
|||
var count = await _transferLibJobAppService.GetCountByFilterAsync(sfsJobDTO).ConfigureAwait(false); |
|||
return Ok(count); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 完成对应的请求
|
|||
/// </summary>
|
|||
/// <param name="id"></param>
|
|||
/// <param name="jobDTO"></param>
|
|||
/// <returns></returns>
|
|||
[HttpPost("complete/{id}")] |
|||
|
|||
public virtual async Task<TransferLibJobDTO> CompleteAsync(Guid id, TransferLibJobDTO jobDTO) |
|||
{ |
|||
var entity = await _transferLibJobAppService.CompleteAsync(id, jobDTO).ConfigureAwait(false); |
|||
return entity; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 承接任务
|
|||
/// </summary>
|
|||
/// <param name="id"></param>
|
|||
/// <returns></returns>
|
|||
[HttpPost("accept/{id}")] |
|||
public virtual async Task AcceptAsync(Guid id) |
|||
{ |
|||
await _transferLibJobAppService.AcceptAsync(id).ConfigureAwait(false); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 取消承接任务
|
|||
/// </summary>
|
|||
/// <param name="id"></param>
|
|||
/// <returns></returns>
|
|||
[HttpPost("cancel-accept/{id}")] |
|||
public virtual async Task CancelAcceptAsync(Guid id) |
|||
{ |
|||
await _transferLibJobAppService.CancelAcceptAsync(id).ConfigureAwait(false); |
|||
} |
|||
} |
Loading…
Reference in new issue