From 364a696ecc7fa2db42491d5147f7ae3924635817 Mon Sep 17 00:00:00 2001
From: zhangxiaofeng <1939543722@qq.com>
Date: Wed, 21 Aug 2024 16:40:05 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BB=BB=E5=8A=A1=E7=BC=96?=
=?UTF-8?q?=E6=8E=92BC=E3=80=81BCNotify=E6=96=87=E4=BB=B6=E4=BC=A0?=
=?UTF-8?q?=E8=BE=93=E6=96=B9=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Constants/TaskFlowDataNameConst.cs | 8 +++----
.../Method/BookingSlot/BookingSlotService.cs | 24 ++-----------------
.../TaskPlat/Method/TaskManageBCService.cs | 5 ++--
.../TaskPlat/Method/TaskManageService.cs | 18 ++++++++++++--
4 files changed, 25 insertions(+), 30 deletions(-)
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)
);