调整任务编排BC、BCNotify文件传输方式

usertest
zhangxiaofeng 3 months ago
parent 1be4532857
commit 364a696ecc

@ -46,14 +46,14 @@ namespace DS.Module.Core
/// <summary>
/// BC文件
/// </summary>
/// <remarks>类型:<see cref="IFormFile"/></remarks>
public const string BCFile = "BCFile";
/// <remarks>类型:DynameFileInfo</remarks>
public const string BCFileInfo = "BCFileInfo";
/// <summary>
/// BC修改文件
/// </summary>
/// <remarks>类型:<see cref="IFormFile"/></remarks>
public const string AmendmentFile = "AmendmentFile";
/// <remarks>类型:DynameFileInfo</remarks>
public const string BCNotifyFileInfo = "BCNotifyFileInfo";
/// <summary>
/// 关联任务

@ -859,28 +859,8 @@ namespace DS.WMS.Core.Op.Method
Logger.Log(NLog.LogLevel.Info, $"执行ApiReceiveTask时未获取到{TaskFlowDataNameConst.TaskBCInfo}");
}
DynameFileInfo bcFileInfo = null;
DynameFileInfo bcNoticeFileInfo = null;
var bcfile = dataContext.Get<IFormFile>(TaskFlowDataNameConst.BCFile);
if (bcfile != null)
{
bcFileInfo = new DynameFileInfo
{
FileBytes = bcfile.ToByteArray(),
FileName = bcfile.FileName
};
}
var bcNoticeFile = dataContext.Get<IFormFile>(TaskFlowDataNameConst.AmendmentFile);
if (bcNoticeFile != null)
{
bcNoticeFileInfo = new DynameFileInfo
{
FileBytes = bcNoticeFile.ToByteArray(),
FileName = bcNoticeFile.FileName
};
}
DynameFileInfo? bcFileInfo = dataContext.Get<DynameFileInfo>(TaskFlowDataNameConst.BCFileInfo);
DynameFileInfo? bcNoticeFileInfo = dataContext.Get<DynameFileInfo>(TaskFlowDataNameConst.BCNotifyFileInfo);
var taskBCInfoDto = messageInfo.Main.BCInfo;

@ -2691,6 +2691,7 @@ namespace DS.WMS.Core.TaskPlat.Method
RequestAction = "add"
}
};
TaskFlowDataContext dataContext = new(
// 固定
(TaskFlowDataNameConst.TaskBaseInfo, taskInfo),
@ -2699,8 +2700,8 @@ namespace DS.WMS.Core.TaskPlat.Method
(TaskFlowDataNameConst.TaskManageOrderMessageInfo, messageInfo),
// BC任务特有
(TaskFlowDataNameConst.BCFile, file),
//(TaskFlowDataNameConst.AmendmentFile, modifyFile),
(TaskFlowDataNameConst.BCFileInfo, new DynameFileInfo { FileBytes = file.ToByteArray(), FileName = file.FileName }),
(TaskFlowDataNameConst.BCNotifyFileInfo, new DynameFileInfo { FileBytes = bcFileBytes, FileName = bcNotifyFileName }),
(TaskFlowDataNameConst.TaskBCInfo, taskBcInfo),
(TaskFlowDataNameConst.TaskBCCtnList, ctnList)
);

@ -12,6 +12,7 @@ using DS.WMS.Core.Code.Interface;
using DS.WMS.Core.Invoice.Dtos;
using DS.WMS.Core.Map.Dtos;
using DS.WMS.Core.Map.Interface;
using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Op.Interface;
using DS.WMS.Core.TaskPlat.Dtos;
@ -949,6 +950,19 @@ namespace DS.WMS.Core.TaskPlat.Method
*/
// 执行自动化操作
var bcFileInfo =
file == null ? null : new DynameFileInfo
{
FileBytes = file.ToByteArray(),
FileName = file.FileName
};
var bcNoticeFileInfo =
modifyFile == null ? null : new DynameFileInfo
{
FileBytes = modifyFile.ToByteArray(),
FileName = modifyFile.FileName
};
TaskFlowDataContext dataContext = new(
// 固定
(TaskFlowDataNameConst.TaskBaseInfo, taskInfo),
@ -957,8 +971,8 @@ namespace DS.WMS.Core.TaskPlat.Method
(TaskFlowDataNameConst.TaskManageOrderMessageInfo, info),
// BC任务特有
(TaskFlowDataNameConst.BCFile, file),
(TaskFlowDataNameConst.AmendmentFile, modifyFile),
(TaskFlowDataNameConst.BCFileInfo, bcFileInfo),
(TaskFlowDataNameConst.BCNotifyFileInfo, bcNoticeFileInfo),
(TaskFlowDataNameConst.TaskBCInfo, bcInfo),
(TaskFlowDataNameConst.TaskBCCtnList, ctnList)
);

Loading…
Cancel
Save