|
|
|
@ -222,9 +222,10 @@ namespace Myshipping.Application
|
|
|
|
|
/// <param name="info">任务详情</param>
|
|
|
|
|
/// <param name="batchNo">批次号</param>
|
|
|
|
|
/// <param name="file">文件</param>
|
|
|
|
|
/// <param name="modifyFile">变更文件内容后的文件</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
[SqlSugarUnitOfWork]
|
|
|
|
|
private async Task<TaskManageOrderResultDto> InitTaskJob(TaskManageOrderMessageInfo info,string batchNo, IFormFile file = null)
|
|
|
|
|
private async Task<TaskManageOrderResultDto> InitTaskJob(TaskManageOrderMessageInfo info,string batchNo, IFormFile file = null, IFormFile modifyFile = null)
|
|
|
|
|
{
|
|
|
|
|
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
|
|
|
|
|
|
|
|
|
@ -339,8 +340,13 @@ namespace Myshipping.Application
|
|
|
|
|
{
|
|
|
|
|
var bytes = file.ToByteArray();
|
|
|
|
|
|
|
|
|
|
string attachFileType = string.Empty;
|
|
|
|
|
|
|
|
|
|
if (TaskBaseTypeEnum.BC.ToString() == taskInfo.TASK_BASE_TYPE)
|
|
|
|
|
attachFileType = "bcfiles";
|
|
|
|
|
|
|
|
|
|
var fileFullName = await FileAttachHelper.SaveFile(taskInfo.PK_ID, bytes, batchNo, file.FileName,
|
|
|
|
|
GetFileType(file.FileName), "bcfiles");
|
|
|
|
|
GetFileType(file.FileName), attachFileType);
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(fileFullName))
|
|
|
|
|
{
|
|
|
|
@ -359,6 +365,35 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (modifyFile != null)
|
|
|
|
|
{
|
|
|
|
|
var bytes = modifyFile.ToByteArray();
|
|
|
|
|
|
|
|
|
|
string attachFileType = string.Empty;
|
|
|
|
|
|
|
|
|
|
if (TaskBaseTypeEnum.BC.ToString() == taskInfo.TASK_BASE_TYPE)
|
|
|
|
|
attachFileType = "bcnoticefiles";
|
|
|
|
|
|
|
|
|
|
var fileFullName = await FileAttachHelper.SaveFile(taskInfo.PK_ID, bytes, batchNo, modifyFile.FileName,
|
|
|
|
|
GetFileType(modifyFile.FileName), attachFileType);
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(fileFullName))
|
|
|
|
|
{
|
|
|
|
|
if (info.Main.FileList == null)
|
|
|
|
|
{
|
|
|
|
|
info.Main.FileList = new List<TaskManageOrderFileInfo>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
info.Main.FileList.Add(new TaskManageOrderFileInfo
|
|
|
|
|
{
|
|
|
|
|
PKId = IDGen.NextID().ToString(),
|
|
|
|
|
FileName = modifyFile.FileName,
|
|
|
|
|
FileType = Path.GetExtension(modifyFile.FileName).ToLower(),
|
|
|
|
|
FilePath = fileFullName
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 附件
|
|
|
|
|
//附件
|
|
|
|
|
if (info.Main.FileList != null && info.Main.FileList.Count > 0)
|
|
|
|
@ -4974,10 +5009,11 @@ namespace Myshipping.Application
|
|
|
|
|
/// 创建BC任务
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="file">文件</param>
|
|
|
|
|
/// <param name="modifyFile">BC变更内容后文件</param>
|
|
|
|
|
/// <param name="jsonData">BC任务详情JSON</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
[AllowAnonymous, HttpPost("/TaskManage/CreateBCTaskJob")]
|
|
|
|
|
public async Task<TaskManageOrderResultDto> CreateBCTaskJob(IFormFile file, [FromForm] string jsonData)
|
|
|
|
|
[AllowAnonymous, HttpPost("/TaskManage/CreateBCTaskJob"), ApiUser(ApiCode = "BCTaskManage")]
|
|
|
|
|
public async Task<TaskManageOrderResultDto> CreateBCTaskJob(IFormFile file, IFormFile modifyFile, [FromForm] string jsonData)
|
|
|
|
|
{
|
|
|
|
|
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
|
|
|
|
|
|
|
|
|
@ -4993,7 +5029,7 @@ namespace Myshipping.Application
|
|
|
|
|
if(info == null)
|
|
|
|
|
throw Oops.Bah("jsonData请求内容错误,无法反序列化报文");
|
|
|
|
|
|
|
|
|
|
result = await InitTaskJob(info, batchNo, file);
|
|
|
|
|
result = await InitTaskJob(info, batchNo, file, modifyFile);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|