You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
2.0 KiB
64 lines
2.0 KiB
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Volo.Abp.AspNetCore.Mvc;
|
|
using Win_in.Sfs.Wms.Store.Application.Contracts;
|
|
|
|
namespace Win_in.Sfs.Wms.Pda.Controllers.Stores;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
[ApiController]
|
|
[Route($"{PdaHostConst.ROOT_ROUTE}store/material-request")]
|
|
|
|
public class MaterialRequestController : AbpController
|
|
{
|
|
private readonly IMaterialRequestAppService _materialRequestAppService;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="materialRequestAppService"></param>
|
|
public MaterialRequestController(IMaterialRequestAppService materialRequestAppService)
|
|
{
|
|
_materialRequestAppService = materialRequestAppService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 创建要料申请(自动执行生成发料任务)
|
|
/// </summary>
|
|
/// <param name="input"></param>
|
|
/// <returns></returns>
|
|
[HttpPost("")]
|
|
public virtual async Task CreateAsync(MaterialRequestEditInput input)
|
|
{
|
|
_ = await _materialRequestAppService.CreateAndHandleAsync(input).ConfigureAwait(false);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据number获取要料详情
|
|
/// </summary>
|
|
/// <param name="number"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("{number}")]
|
|
|
|
public virtual async Task<ActionResult<MaterialRequestDTO>> GetAsync(string number)
|
|
{
|
|
var result = await _materialRequestAppService.GetByNumberAsync(number).ConfigureAwait(false);
|
|
return Ok(result);
|
|
}
|
|
|
|
///// <summary>
|
|
///// 创建要料申请(自动执行生成发料任务) ??临时处理 用来解决 补料时无法获取 订阅者的错误的信息
|
|
///// </summary>
|
|
///// <param name="input"></param>
|
|
///// <returns></returns>
|
|
//[HttpPost("create-and-handle-return-eto")]
|
|
//public virtual async Task<MaterialRequestHandledETO> CreateAndHandleReturnEtoAsync(MaterialRequestCreateInput input)
|
|
//{
|
|
// var eto = await _materialRequestAppService.CreateAndHandleReturnEtoAsync(input);
|
|
|
|
// return eto;
|
|
//}
|
|
|
|
}
|
|
|