|
|
@ -27,6 +27,7 @@ using System.Collections.Generic;
|
|
|
|
using System.Dynamic;
|
|
|
|
using System.Dynamic;
|
|
|
|
using System.IO;
|
|
|
|
using System.IO;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
using System.Net;
|
|
|
|
using System.Net.Http;
|
|
|
|
using System.Net.Http;
|
|
|
|
using System.Reflection.Metadata.Ecma335;
|
|
|
|
using System.Reflection.Metadata.Ecma335;
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
@ -1208,6 +1209,7 @@ namespace Myshipping.Application
|
|
|
|
/// <param name="taskPKId">任务主键</param>
|
|
|
|
/// <param name="taskPKId">任务主键</param>
|
|
|
|
/// <param name="model">提单纸登记请求参数</param>
|
|
|
|
/// <param name="model">提单纸登记请求参数</param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
|
|
[HttpPost("/TaskManage/LaraPaperRegistPost")]
|
|
|
|
public async Task<TaskManageOrderResultDto> LaraPaperRegistPost(string taskPKId, LaraPaperRegistPostDto model)
|
|
|
|
public async Task<TaskManageOrderResultDto> LaraPaperRegistPost(string taskPKId, LaraPaperRegistPostDto model)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
|
|
|
|
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
|
|
|
@ -1536,7 +1538,36 @@ namespace Myshipping.Application
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 下载任务附件
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <param name="taskPKId"></param>
|
|
|
|
|
|
|
|
/// <returns>返回文件流</returns>
|
|
|
|
|
|
|
|
[HttpGet("/TaskManage/DownloadTaskAttach")]
|
|
|
|
|
|
|
|
public IActionResult DownloadTaskAttach([FromQuery] string taskPKId)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
FileStreamResult result = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var fileList = _taskFileInfoRepository.AsQueryable().Where(t => t.TASK_PKID == taskPKId).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var fileInfo = fileList.FirstOrDefault();
|
|
|
|
|
|
|
|
if (fileInfo.FILE_PATH.StartsWith("http://"))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
WebClient wc = new WebClient();
|
|
|
|
|
|
|
|
var data = wc.DownloadData(fileInfo.FILE_PATH);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result = new FileStreamResult(new MemoryStream(data), "application/octet-stream") { FileDownloadName = fileInfo.FILE_NAME };
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (System.IO.File.Exists(fileInfo.FILE_PATH))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
result = new FileStreamResult(new FileStream(fileInfo.FILE_PATH, FileMode.Open), "application/octet-stream") { FileDownloadName = fileInfo.FILE_NAME };
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static class DraftPaperExtension
|
|
|
|
public static class DraftPaperExtension
|
|
|
|