From f7900df6e7ec5ca8d8697ab23ba42c02b983820a Mon Sep 17 00:00:00 2001 From: zhangxiaofeng <1939543722@qq.com> Date: Fri, 16 Aug 2024 10:13:53 +0800 Subject: [PATCH] =?UTF-8?q?BC=E4=BB=BB=E5=8A=A1=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DS.Module.Core/Constants/TaskFlowDataNameConst.cs | 6 ++++++ .../Op/Method/BookingSlot/BookingSlotService.cs | 10 +++++----- .../DS.WMS.Core/TaskPlat/Method/TaskManageBCService.cs | 5 ++++- .../DS.WMS.Core/TaskPlat/Method/TaskManageService.cs | 3 ++- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/ds-wms-service/DS.Module.Core/Constants/TaskFlowDataNameConst.cs b/ds-wms-service/DS.Module.Core/Constants/TaskFlowDataNameConst.cs index ead79b15..543faac8 100644 --- a/ds-wms-service/DS.Module.Core/Constants/TaskFlowDataNameConst.cs +++ b/ds-wms-service/DS.Module.Core/Constants/TaskFlowDataNameConst.cs @@ -37,6 +37,12 @@ namespace DS.Module.Core /// 类型:DS.WMS.Core.TaskPlat.Entity.TaskBCCTNInfo public const string TaskBCCtnList = "TaskBCCtnList"; + /// + /// BC对比订单后是否存在差异 + /// + /// 类型: + public const string BcCompareBcWithSeaExportIsExistsDiff = "BcCompareBcWithSeaExportIsExistsDiff"; + /// /// BC文件 /// 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 0bfef2a6..8ce1831c 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 @@ -823,10 +823,10 @@ namespace DS.WMS.Core.Op.Method throw new ArgumentNullException($"缺少参数:{TaskFlowDataNameConst.TaskManageOrderMessageInfo}"); } - var taskBcId = dataContext.Get(TaskFlowDataNameConst.TaskBCId); - if (taskBcId == null) + var taskBcInfo = dataContext.Get(TaskFlowDataNameConst.TaskBCInfo); + if (taskBcInfo == null) { - Logger.Log(NLog.LogLevel.Info, $"执行ApiReceiveTask时,未获取到{TaskFlowDataNameConst.TaskBCId}"); + Logger.Log(NLog.LogLevel.Info, $"执行ApiReceiveTask时,未获取到{TaskFlowDataNameConst.TaskBCInfo}"); } DynameFileInfo bcFileInfo = null; @@ -935,10 +935,10 @@ namespace DS.WMS.Core.Op.Method var rlt = await InnerApiReceive(slotModel, bcFileInfo, bcNoticeFileInfo); // 回写舱位主键到BC任务 - if (rlt.Succeeded && rlt.Data != null && taskBcId != null) + if (rlt.Succeeded && rlt.Data != null && taskBcInfo != null) { var tenantDb = saasService.GetBizDbScopeById(user.TenantId); - var taskBcInfo = await tenantDb.Queryable().Where(x => x.Id == taskBcId).FirstAsync(); + //var taskBcInfo = await tenantDb.Queryable().Where(x => x.Id == taskBcId).FirstAsync(); if (taskBcInfo != null) { if(taskBcInfo.BOOKING_SLOT_ID == null) 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 15fe3edb..42015045 100644 --- a/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageBCService.cs +++ b/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageBCService.cs @@ -1158,7 +1158,10 @@ namespace DS.WMS.Core.TaskPlat.Method SeaExport = seaExport, OpCtnList = seaExportCtnList }; - var result = await CompareBcWithSeaExport(compareDto); + (bool isExistsDiff, List) result = await CompareBcWithSeaExport(compareDto); + + dataContext.Set(TaskFlowDataNameConst.BcCompareBcWithSeaExportIsExistsDiff, result.isExistsDiff); + return DataResult<(bool isExistsDiff, List)>.Success(result); } 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 2f4ef0ea..2fe0e9df 100644 --- a/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageService.cs +++ b/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageService.cs @@ -953,7 +953,8 @@ namespace DS.WMS.Core.TaskPlat.Method (TaskFlowDataNameConst.TaskManageOrderMessageInfo, info), (TaskFlowDataNameConst.BCFile, file), (TaskFlowDataNameConst.AmendmentFile, modifyFile), - (TaskFlowDataNameConst.TaskBCId, bcInfo.Id), + (TaskFlowDataNameConst.TaskBaseId, taskInfo.Id), + //(TaskFlowDataNameConst.TaskBCId, bcInfo.Id), (TaskFlowDataNameConst.TaskBCInfo, bcInfo), (TaskFlowDataNameConst.TaskBCCtnList, ctnList) );