diff --git a/ds-wms-service/DS.Module.Core/Constants/TaskFlowDataNameConst.cs b/ds-wms-service/DS.Module.Core/Constants/TaskFlowDataNameConst.cs index f19a0df2..b65e312c 100644 --- a/ds-wms-service/DS.Module.Core/Constants/TaskFlowDataNameConst.cs +++ b/ds-wms-service/DS.Module.Core/Constants/TaskFlowDataNameConst.cs @@ -46,14 +46,14 @@ namespace DS.Module.Core /// /// BC文件 /// - /// 类型: - public const string BCFile = "BCFile"; + /// 类型:DynameFileInfo + public const string BCFileInfo = "BCFileInfo"; /// /// BC修改文件 /// - /// 类型: - public const string AmendmentFile = "AmendmentFile"; + /// 类型:DynameFileInfo + public const string BCNotifyFileInfo = "BCNotifyFileInfo"; /// /// 关联任务 diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/BookingSlot/BookingSlotService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/BookingSlot/BookingSlotService.cs index 7b293f13..f7cb67a7 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/BookingSlot/BookingSlotService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/BookingSlot/BookingSlotService.cs @@ -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(TaskFlowDataNameConst.BCFile); - if (bcfile != null) - { - bcFileInfo = new DynameFileInfo - { - FileBytes = bcfile.ToByteArray(), - FileName = bcfile.FileName - }; - } - - var bcNoticeFile = dataContext.Get(TaskFlowDataNameConst.AmendmentFile); - if (bcNoticeFile != null) - { - bcNoticeFileInfo = new DynameFileInfo - { - FileBytes = bcNoticeFile.ToByteArray(), - FileName = bcNoticeFile.FileName - }; - } + DynameFileInfo? bcFileInfo = dataContext.Get(TaskFlowDataNameConst.BCFileInfo); + DynameFileInfo? bcNoticeFileInfo = dataContext.Get(TaskFlowDataNameConst.BCNotifyFileInfo); var taskBCInfoDto = messageInfo.Main.BCInfo; diff --git a/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageBCService.cs b/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageBCService.cs index ba672ead..4862d874 100644 --- a/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageBCService.cs +++ b/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageBCService.cs @@ -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) ); diff --git a/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageService.cs b/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageService.cs index 06aaf136..635e7396 100644 --- a/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageService.cs +++ b/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageService.cs @@ -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) );