using Furion.DynamicApiController;
using Furion.FriendlyException;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Myshipping.Application.Entity;
using Myshipping.Core;
using Myshipping.Core.Service;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
///
/// DRAFT任务
///
[ApiDescriptionSettings("Application", Name = "TaskManageDRAFT", Order = 10)]
public class TaskManageDRAFTService: ITaskManageDRAFTService, IDynamicApiController
{
private readonly ISysCacheService _cache;
private readonly ILogger _logger;
private readonly SqlSugarRepository _taskBaseRepository;
public TaskManageDRAFTService(SqlSugarRepository taskBCInfoRepository,
ILogger logger)
{
_logger = logger;
}
#region 获取DRAFT详情
///
/// 获取DRAFT详情
///
/// DRAFT主键
/// 返回回执
public async Task GetInfo(string pkId)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
try
{
//var bcOrder = _taskBCInfoRepository.AsQueryable().First(a => a.PK_ID == pkId);
//if (bcOrder == null)
// throw Oops.Oh($"BC主键{pkId}无法获取业务信息");
//var BCCtnList = _taskBCCTNInfoRepository.AsQueryable().Where(a => a.P_ID == pkId).ToList();
//TaskBCShowBaseDto model = bcOrder.Adapt();
//if (BCCtnList.Count > 0)
// model.CtnList = BCCtnList.Adapt>();
//var fileList = _taskFileRepository.AsQueryable().Where(a => a.TASK_PKID == bcOrder.TASK_ID).ToList();
//if (fileList.Count > 0)
// model.FileList = fileList.Adapt>();
}
catch (Exception ex)
{
result.succ = false;
result.msg = $"获取BC详情异常,原因:{ex.Message}";
}
return result;
}
#endregion
#region 通过任务主键获取DRAFT详情
///
/// 通过任务主键获取DRAFT详情
///
/// DRAFT任务主键
/// 返回回执
public async Task GetInfoByTaskId(string taskPkId)
{
return null;
}
#endregion
#region 任务ID下载附件
///
/// 任务ID下载附件
///
/// DRAFT任务主键
/// 附件分类代码
/// 返回数据流
public Task DownloadFile(string taskPKId, string fileCategory = "DRAFT")
{
return null;
}
#endregion
#region 发送邮件
///
/// 发送邮件
///
/// DRAFT任务主键
/// 返回回执
public async Task SendEmail(string taskPKId)
{
return null;
}
#endregion
}
}