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.
61 lines
1.8 KiB
C#
61 lines
1.8 KiB
C#
using System.Net;
|
|
using DS.Module.Core;
|
|
using DS.WMS.Core.Flow.Dtos;
|
|
using DS.WMS.Core.Op.Dtos.TaskInteraction;
|
|
using DS.WMS.Core.Op.Interface.TaskInteraction;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace DS.WMS.OpApi.Controllers
|
|
{
|
|
/// <summary>
|
|
/// 海运出口任务API
|
|
/// </summary>
|
|
public class SeaExportTaskController : ApiController
|
|
{
|
|
readonly ISeaExportTaskService taskService;
|
|
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
/// <param name="service"></param>
|
|
public SeaExportTaskController(ISeaExportTaskService service)
|
|
{
|
|
taskService = service;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 创建关联任务
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("CreateTask")]
|
|
public async Task<DataResult> CreateTaskAsync(TaskCreationRequest request)
|
|
{
|
|
return await taskService.CreateTaskAsync(request);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 设置任务状态
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("SetTaskStatus")]
|
|
public async Task<DataResult> SetTaskStatusAsync(TaskUpdateRequest request)
|
|
{
|
|
return await taskService.SetTaskStatusAsync(request);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 审批完成回调更新(无需客户端手动调用)
|
|
/// </summary>
|
|
/// <param name="callback">回调信息</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("UpdateBusiness")]
|
|
public async Task<IActionResult> UpdateBusinessAsync(FlowCallback callback)
|
|
{
|
|
await taskService.UpdateBusinessAsync(callback);
|
|
return StatusCode((int)HttpStatusCode.NoContent);
|
|
}
|
|
}
|
|
}
|