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.

83 lines
3.0 KiB
C#

using DS.Module.Core;
using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.Op.Interface;
using DS.WMS.Core.TaskPlat.Dtos;
using DS.WMS.Core.TaskPlat.Interface;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.TaskApi.Controllers
{
/// <summary>
/// 截止时间变更
/// </summary>
public class TaskManageCutDateChangeController : ApiController
{
private readonly ITaskManageCutDateChangeService _taskManageCutDateChangeService;
/// <summary>
///
/// </summary>
/// <param name="taskManageCutDateChangeService"></param>
public TaskManageCutDateChangeController(ITaskManageCutDateChangeService taskManageCutDateChangeService)
{
_taskManageCutDateChangeService = taskManageCutDateChangeService;
}
#region 通过任务主键获取截止时间变更详情
/// <summary>
/// 通过任务主键获取截止时间变更详情
/// </summary>
/// <param name="taskPkId">截止时间变更任务主键</param>
/// <returns>返回回执</returns>
[HttpGet]
[Route("GetInfoByTaskId")]
public async Task<DataResult<List<TaskCutDateChangeShowDto>>> GetInfoByTaskId([FromQuery] long taskPKId)
{
return await _taskManageCutDateChangeService.GetInfoByTaskId(taskPKId);
}
#endregion
#region 检索对应的订舱订单并保存订舱ID
/// <summary>
/// 检索对应的订舱订单并保存订舱ID
/// </summary>
/// <param name="taskPKId">截止时间变更任务主键</param>
/// <returns>返回回执</returns>
[HttpGet]
[Route("SearchAndMarkBookingOrder")]
public async Task<DataResult<SeaExportOrderExtension>> SearchAndMarkBookingOrder([FromQuery] long taskPKId)
{
return await _taskManageCutDateChangeService.SearchAndMarkBookingOrder(taskPKId);
}
#endregion
#region 自动更新订单的截单日期并转发
/// <summary>
/// 自动更新订单的截单日期并转发
/// </summary>
/// <param name="taskPKId">截止时间变更任务主键</param>
/// <returns>返回回执</returns>
[HttpGet]
[Route("AutoUpdateOrderCutDateAndTranmitToCustomer")]
public async Task<DataResult> AutoUpdateOrderCutDateAndTranmitToCustomer([FromQuery] long taskPKId)
{
return await _taskManageCutDateChangeService.AutoUpdateOrderCutDateAndTranmitToCustomer(taskPKId);
}
#endregion
#region 发送邮件通知给客户
/// <summary>
/// 发送邮件通知给客户
/// </summary>
/// <param name="taskPKId">截止时间变更主键</param>
/// <returns>返回回执</returns>
[HttpGet]
[Route("SendEmailToCustomer")]
public async Task<DataResult> SendEmailToCustomer(long taskPKId)
{
return await _taskManageCutDateChangeService.SendEmailToCustomer(taskPKId);
}
#endregion
}
}