266 lines
9.7 KiB
C#

using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Myshipping.Core;
using NPOI.POIFS.Crypt.Dsig;
using NPOI.SS.Formula.Functions;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
///
/// </summary>
public interface ITaskManageService
{
/// <summary>
/// 创建任务
/// </summary>
/// <param name="info">任务详情</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> CreateTaskJob(TaskManageOrderMessageInfo info);
/// <summary>
/// 获取查询参数
/// </summary>
/// <param name="ParaType">参数类型 STATUS-任务状态;TASK_TYPE-任务类型;SOURCE-任务来源</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> GetParaInfo(string ParaType);
/// <summary>
/// 获取登陆人相关的任务统计信息
/// </summary>
/// <param name="isReCalc">是否强制计算</param>
/// <returns>返回回执</returns>
Task<TaskUserStatResultInfo> GetCurrentTotalStat(bool isReCalc = false);
/// <summary>
/// 任务台账查询
/// </summary>
/// <param name="QuerySearch">任务台账查询请求</param>
/// <returns>返回结果</returns>
Task<SqlSugarPagedList<TaskBaseInfoDto>> GetPageAsync(QueryTaskManageDto QuerySearch);
/// <summary>
/// 下载正本提单
/// </summary>
/// <param name="PKIds">任务主键数组</param>
/// <returns>返回结果</returns>
Task<TaskManageOrderResultDto> DownloadOriginalTask(string[] PKIds);
/// <summary>
/// 完成任务(可批量)
/// </summary>
/// <param name="PKIds">任务主键数组</param>
/// <returns>返回结果</returns>
Task<TaskManageOrderResultDto> CompleteTask(string[] PKIds);
/// <summary>
/// 取消任务(可批量)
/// </summary>
/// <param name="PKIds">任务主键数组</param>
/// <returns>返回结果</returns>
Task<TaskManageOrderResultDto> CancelTask(string[] PKIds);
/// <summary>
/// 挂起任务(可批量)
/// </summary>
/// <param name="PKIds">任务主键数组</param>
/// <returns>返回结果</returns>
Task<TaskManageOrderResultDto> PendingTask(string[] PKIds);
/// <summary>
/// 提单纸页数计算
/// </summary>
/// <param name="PKIds">任务主键数组</param>
/// <returns>返回结果</returns>
Task<List<LaraPaperCalcInfo>> LaraPaperCalc(string[] PKIds);
/// <summary>
/// LARA提单纸登记
/// </summary>
/// <param name="PKIds">任务主键数组</param>
/// <returns>返回结果</returns>
Task<LaraPaperRegistDto> LaraPaperRegist(string[] PKIds);
/// <summary>
/// 请求提单纸登记
/// </summary>
/// <param name="laraPaperList">提单纸登记请求参数列表</param>
/// <returns>返回结果</returns>
Task<TaskManageOrderResultDto> LaraPaperRegistPost(List<LaraPaperRegistPostDto> laraPaperList);
/// <summary>
/// 下载任务附件
/// </summary>
/// <param name="taskPKId"></param>
/// <returns>返回文件流</returns>
Task<IActionResult> DownloadTaskAttach(string taskPKId);
/// <summary>
/// 正本附件批量打印
/// </summary>
/// <param name="PKIds">任务主键数组</param>
/// <returns>返回文件流</returns>
Task<IActionResult> PrintBatch(string[] PKIds);
/// <summary>
/// 接收换船
/// </summary>
/// <param name="taskPKId">任务主键</param>
/// <returns>返回结果</returns>
Task<TaskManageOrderResultDto> AcceptChangeShip(string taskPKId);
/// <summary>
/// 取消换船
/// </summary>
/// <param name="taskPKId">任务主键</param>
/// <returns>返回结果</returns>
Task<TaskManageOrderResultDto> AcceptCancelChangeShip(string taskPKId);
/// <summary>
/// 转发电放邮件
/// </summary>
/// <param name="taskPKId">任务主键</param>
/// <param name="toMail">指定邮件地址</param>
/// <returns>返回结果</returns>
Task<TaskManageOrderResultDto> SendTelexEmail(string taskPKId, string toMail);
/// <summary>
/// 发送下货纸
/// </summary>
/// <param name="taskPKId">任务主键</param>
/// <param name="fileRole">文件功能 (9原始)</param>
/// <returns>返回结果</returns>
Task<TaskManageOrderResultDto> SendShippingOrder(string taskPKId, string fileRole = "9");
/// <summary>
/// 获取订舱详情
/// </summary>
/// <param name="taskPKId">任务主键</param>
/// <returns>返回结果</returns>
Task<TaskBookingOrderDto> GetBookingOrderInfo(string taskPKId);
/// <summary>
/// 获取单票账单详情
/// </summary>
/// <param name="taskPKId">任务主键</param>
/// <returns>返回结果</returns>
Task<TaskPerBillResultInfo> GetTaskPerBillInfo(string taskPKId);
/// <summary>
/// 获取提单纸登记记录
/// </summary>
/// <param name="querySearch">查询条件</param>
/// <returns>返回结果</returns>
Task<SqlSugarPagedList<LaraPaperRecordDto>> GetLaraPaperRecordPageAsync(QueryTaskManageBaseDto querySearch);
/// <summary>
/// 导出LARA提单纸登记记录
/// </summary>
/// <param name="sortField">排序字段</param>
/// <param name="pageNo">当前页码</param>
/// <param name="pageSize">页码容量</param>
/// <param name="descSort">排序方法,默认降序</param>
/// <returns>返回结果</returns>
Task<IActionResult> LaraPaperRecordExport(string sortField, int pageNo = 1, int pageSize = 30, bool descSort = true);
/// <summary>
/// 保存SI信息
/// </summary>
/// <param name="model">订舱信息</param>
/// <returns>返回结果</returns>
Task<TaskManageOrderResultDto> SaveBookingSI(TaskBookingOrderDto model);
/// <summary>
/// 获取SI反馈信息
/// </summary>
/// <param name="taskPKId">任务主键</param>
/// <returns>返回结果</returns>
Task<TaskSIFeedBackResultDto> GetSIFeedBackInfo(string taskPKId);
/// <summary>
/// 获取VGM比较结果
/// </summary>
/// <param name="taskPKId">任务主键</param>
/// <returns>返回结果</returns>
Task<TaskVgmCompareResultDto> GetVGMCompareResult(string taskPKId);
/// <summary>
/// 更新订舱VGM比较更新
/// </summary>
/// <param name="taskPKId">任务主键</param>
/// <returns>返回结果</returns>
Task<TaskManageOrderResultDto> SaveBookingVGM(string taskPKId);
/// <summary>
/// 获取换船详情
/// </summary>
/// <param name="taskPKId">任务主键</param>
/// <returns>返回结果</returns>
Task<TaskChangeShipResultDto> GetChangeShipInfo(string taskPKId);
/// <summary>
/// 获取取消换船详情
/// </summary>
/// <param name="taskPKId">任务主键</param>
/// <returns>返回结果</returns>
Task<TaskChangeShipResultDto> GetAbortChangeShipInfo(string taskPKId);
/// <summary>
/// 手工批量重新比对BC
/// </summary>
/// <param name="PKIds">任务主键数组</param>
/// <returns>返回结果</returns>
Task<TaskManageOrderResultDto> ManualReCompareBC(string[] PKIds);
/// <summary>
/// 下载截单EDI
/// </summary>
/// <param name="taskPKId">任务主键</param>
/// <param name="orderNo">订单号</param>
/// <param name="useForwarderCode">是否使用货代代码</param>
/// <param name="forwarderCode">货代代码</param>
/// <param name="forwarderName">货代称呼</param>
/// <param name="fileRole">文件功能 (9原始,1 更新,5 退舱 )</param>
/// <param name="sendType">发送类型 B-订舱 E-截单</param>
/// <returns></returns>
Task<IActionResult> DownloadClosingEDI(string taskPKId, string orderNo, bool useForwarderCode,
string forwarderCode, string forwarderName, string fileRole, string sendType);
/// <summary>
/// 发送截单EDI
/// </summary>
/// <param name="taskPKId">任务主键</param>
/// <param name="orderNo">订单号</param>
/// <param name="useForwarderCode">是否使用货代代码</param>
/// <param name="forwarderCode">货代代码</param>
/// <param name="forwarderName">货代称呼</param>
/// <param name="fileRole">文件功能 (9原始,1 更新,5 退舱 )</param>
/// <param name="sendType">发送类型 E-截单</param>
/// <returns>返回结果</returns>
Task<string> SendClosingEDI(string taskPKId, string orderNo, bool useForwarderCode,
string forwarderCode, string forwarderName, string fileRole, string sendType);
/// <summary>
/// 计算LARA纸计算页数
/// </summary>
/// <param name="model">请求LARA纸详情</param>
/// <returns>返回结果</returns>
Task<List<LaraPaperRegistPostDto>> CalcLaraPageNumbers(CalcLaraPageNumbersDto model);
}
}