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

usertest
zhangxiaofeng 3 months ago
parent 1be4532857
commit 364a696ecc

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

@ -859,28 +859,8 @@ namespace DS.WMS.Core.Op.Method
Logger.Log(NLog.LogLevel.Info, $"执行ApiReceiveTask时未获取到{TaskFlowDataNameConst.TaskBCInfo}"); Logger.Log(NLog.LogLevel.Info, $"执行ApiReceiveTask时未获取到{TaskFlowDataNameConst.TaskBCInfo}");
} }
DynameFileInfo bcFileInfo = null; DynameFileInfo? bcFileInfo = dataContext.Get<DynameFileInfo>(TaskFlowDataNameConst.BCFileInfo);
DynameFileInfo bcNoticeFileInfo = null; DynameFileInfo? bcNoticeFileInfo = dataContext.Get<DynameFileInfo>(TaskFlowDataNameConst.BCNotifyFileInfo);
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
};
}
var taskBCInfoDto = messageInfo.Main.BCInfo; var taskBCInfoDto = messageInfo.Main.BCInfo;

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

@ -12,6 +12,7 @@ using DS.WMS.Core.Code.Interface;
using DS.WMS.Core.Invoice.Dtos; using DS.WMS.Core.Invoice.Dtos;
using DS.WMS.Core.Map.Dtos; using DS.WMS.Core.Map.Dtos;
using DS.WMS.Core.Map.Interface; using DS.WMS.Core.Map.Interface;
using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.Op.Entity; using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Op.Interface; using DS.WMS.Core.Op.Interface;
using DS.WMS.Core.TaskPlat.Dtos; 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( TaskFlowDataContext dataContext = new(
// 固定 // 固定
(TaskFlowDataNameConst.TaskBaseInfo, taskInfo), (TaskFlowDataNameConst.TaskBaseInfo, taskInfo),
@ -957,8 +971,8 @@ namespace DS.WMS.Core.TaskPlat.Method
(TaskFlowDataNameConst.TaskManageOrderMessageInfo, info), (TaskFlowDataNameConst.TaskManageOrderMessageInfo, info),
// BC任务特有 // BC任务特有
(TaskFlowDataNameConst.BCFile, file), (TaskFlowDataNameConst.BCFileInfo, bcFileInfo),
(TaskFlowDataNameConst.AmendmentFile, modifyFile), (TaskFlowDataNameConst.BCNotifyFileInfo, bcNoticeFileInfo),
(TaskFlowDataNameConst.TaskBCInfo, bcInfo), (TaskFlowDataNameConst.TaskBCInfo, bcInfo),
(TaskFlowDataNameConst.TaskBCCtnList, ctnList) (TaskFlowDataNameConst.TaskBCCtnList, ctnList)
); );

Loading…
Cancel
Save