using DS.Module.Core.Attributes; using DS.WMS.Core.Op.Dtos; using DS.WMS.Core.TaskPlat.Dtos; using DS.WMS.Core.TaskPlat.Interface; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using ThirdParty.Json.LitJson; namespace DS.WMS.TaskApi.Controllers { /// /// 格式单比对 /// public class TaskDraftCompareController : ApiController { private readonly ITaskDraftCompareService _taskDraftCompareService; public TaskDraftCompareController(ITaskDraftCompareService taskDraftCompareService) { _taskDraftCompareService = taskDraftCompareService; } #region 执行邮件Draft比对 /// /// 执行邮件Draft比对 /// /// 请求文件 /// 邮件Draft比对请求报文 /// 返回回执 [HttpPost("ExcuteEmailDraftCompare")] [ApiUser(ApiCode = "BCTaskManage"), AllowAnonymous] public async Task ExcuteEmailDraftCompareAsync(IFormFile file, [FromForm] string jsonData) { return await _taskDraftCompareService.ExcuteEmailDraftCompareAsync(file, jsonData); } #endregion #region 获取Draft比对结果详情 /// /// 获取Draft比对结果详情 /// /// 订舱主键 /// 返回回执 [HttpPost("GetDraftCompareResultInfo")] public async Task GetDraftCompareResultInfo([FromQuery] long bookingId) { return await _taskDraftCompareService.GetDraftCompareResultInfo(bookingId); } #endregion #region 执行邮件Draft比对(含有附件文件-针对TSL货描附件处理) /// /// 执行邮件Draft比对(含有附件文件-针对TSL货描附件处理) /// /// 请求文件 /// 请求附件文件 /// 邮件Draft比对请求报文 /// 返回回执 [HttpPost("ExcuteEmailAttachedSheetDraftCompare")] [ApiUser(ApiCode = "BCTaskManage"), AllowAnonymous] public async Task ExcuteEmailAttachedSheetDraftCompareAsync(IFormFile file, IFormFile fileAttach, string jsonData) { return await _taskDraftCompareService.ExcuteEmailAttachedSheetDraftCompareAsync(file, fileAttach, jsonData); } #endregion #region 保存格式单比对反馈 /// /// 保存格式单比对反馈 /// /// 请求详情 /// 返回回执 [HttpPost("/TaskDraftCompare/SaveDraftCompareManual")] public async Task SaveDraftCompareManual(TaskDraftCompareFeedBackDto model) { await _taskDraftCompareService.SaveDraftCompareManual(model); } #endregion } }