|
|
|
@ -0,0 +1,110 @@
|
|
|
|
|
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
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// DRAFT任务
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ApiDescriptionSettings("Application", Name = "TaskManageDRAFT", Order = 10)]
|
|
|
|
|
public class TaskManageDRAFTService: ITaskManageDRAFTService, IDynamicApiController
|
|
|
|
|
{
|
|
|
|
|
private readonly ISysCacheService _cache;
|
|
|
|
|
private readonly ILogger<TaskManageDRAFTService> _logger;
|
|
|
|
|
private readonly SqlSugarRepository<TaskBaseInfo> _taskBaseRepository;
|
|
|
|
|
|
|
|
|
|
public TaskManageDRAFTService(SqlSugarRepository<TaskBCInfo> taskBCInfoRepository,
|
|
|
|
|
ILogger<TaskManageDRAFTService> logger)
|
|
|
|
|
{
|
|
|
|
|
_logger = logger;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 获取DRAFT详情
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取DRAFT详情
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="pkId">DRAFT主键</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
public async Task<TaskManageOrderResultDto> 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<TaskBCShowBaseDto>();
|
|
|
|
|
|
|
|
|
|
//if (BCCtnList.Count > 0)
|
|
|
|
|
// model.CtnList = BCCtnList.Adapt<List<TaskBCCTNInfoDto>>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//var fileList = _taskFileRepository.AsQueryable().Where(a => a.TASK_PKID == bcOrder.TASK_ID).ToList();
|
|
|
|
|
|
|
|
|
|
//if (fileList.Count > 0)
|
|
|
|
|
// model.FileList = fileList.Adapt<List<TaskFileDto>>();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
result.succ = false;
|
|
|
|
|
result.msg = $"获取BC详情异常,原因:{ex.Message}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 通过任务主键获取DRAFT详情
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 通过任务主键获取DRAFT详情
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="taskPkId">DRAFT任务主键</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
public async Task<TaskManageOrderResultDto> GetInfoByTaskId(string taskPkId)
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 任务ID下载附件
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 任务ID下载附件
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="taskPKId">DRAFT任务主键</param>
|
|
|
|
|
/// <param name="fileCategory">附件分类代码</param>
|
|
|
|
|
/// <returns>返回数据流</returns>
|
|
|
|
|
public Task<IActionResult> DownloadFile(string taskPKId, string fileCategory = "DRAFT")
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 发送邮件
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 发送邮件
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="taskPKId">DRAFT任务主键</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
public async Task<TaskManageOrderResultDto> SendEmail(string taskPKId)
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|