You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
3.1 KiB
C#

using DS.Module.Core;
using DS.WMS.Core.Flow.Dtos;
using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.Op.Interface;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.OpApi.Controllers
{
/// <summary>
/// 海运出口改配退舱服务
/// </summary>
public class SeaExportRefundController : ApiController
{
private readonly ISeaExportRefundService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public SeaExportRefundController(ISeaExportRefundService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetSeaExportRefundList")]
public async Task<DataResult<SeaExportListRes>> GetSeaExportRefundList([FromBody] PageRequest request)
{
var res = await _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetSeaExportRefundInfo")]
public async Task<DataResult<SeaExportRes>> GetSeaExportRefundInfo([FromQuery] string id)
{
var res = await _invokeService.GetSeaExportRefundInfo(id);
return res;
}
/// <summary>
/// 创建退舱审核任务
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("CreateRefundAuditTask")]
public async Task<DataResult> CreateRefundAuditTaskAsync([FromBody] RefundTaskReq req)
{
var res =await _invokeService.CreateRefundAuditTaskAsync(req);
return res;
}
/// <summary>
/// 退仓审核完成回调
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("RefundAuditCallback")]
public async Task<DataResult> RefundAuditCallbackAsync([FromBody] FlowCallback req)
{
var res = await _invokeService.RefundAuditCallbackAsync(req);
return res;
}
/// <summary>
/// 获取改配订单状态
/// </summary>
/// <param name="id">业务Id</param>
/// <returns></returns>
[HttpGet]
[Route("GetChangeOrderStatus")]
public async Task<DataResult<string>> GetChangeOrderStatus([FromQuery] long id)
{
var res = await _invokeService.GetChangeOrderStatus(id);
return res;
}
/// <summary>
/// 发起改配任务
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("CreateChangeTaskAsync")]
public async Task<DataResult> CreateChangeTaskAsync([FromBody] ChangeTaskReq req)
{
return await _invokeService.CreateChangeTaskAsync(req);
}
}
}