diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 9576eb24..616988da 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -115,6 +115,7 @@ namespace Myshipping.Application private readonly SqlSugarRepository _repSlotAllocation; private readonly SqlSugarRepository _repSlotAllocationCtn; private readonly SqlSugarRepository _repBookingStatusSubscribe; + private readonly SqlSugarRepository _repTaskBCInfo; private readonly SqlSugarRepository _repextendstate; @@ -162,6 +163,7 @@ namespace Myshipping.Application IServiceWorkFlowManageService serviceWorkFlowManageService, IDjyUserConfigService djyUserConfigService, IEventPublisher publisher, SqlSugarRepository repSlotBase, SqlSugarRepository repSlotAllocation, SqlSugarRepository repSlotAllocationCtn, IBookingSlotService bookingSlotService, SqlSugarRepository repBookingStatusSubscribe, SqlSugarRepository repTenantParamValue, IBookingValueAddedService bookingValueAddedService, + SqlSugarRepository repTaskBCInfo, SqlSugarRepository repCustomerOrder, IDjyTenantParamService djyTenantParamService, SqlSugarRepository repCustomerContact, SqlSugarRepository repPingTaiCustFee, SqlSugarRepository repBookingMultiLineSplitRecord) { this._logger = logger; @@ -222,6 +224,7 @@ namespace Myshipping.Application _repCustomerContact = repCustomerContact; _repPingTaiCustFee = repPingTaiCustFee; _repBookingMultiLineSplitRecord = repBookingMultiLineSplitRecord; + _repTaskBCInfo = repTaskBCInfo; } #region 主表和箱信息 @@ -2482,6 +2485,21 @@ namespace Myshipping.Application await CancelAllocationSlot(Id); } + var taskbcList = _repTaskBCInfo.AsQueryable().Where(a => a.MBL_NO == mblno && a.TenantId == UserManager.TENANT_ID).ToList(); + + if (taskbcList.Count > 0) + { + foreach(var tbc in taskbcList) + { + tbc.BOOKING_ORDER_ID = null; + + _repTaskBCInfo.AsUpdateable(tbc).UpdateColumns(x => new + { + x.BOOKING_ORDER_ID + }).ExecuteCommand(); + } + } + // 记录日志 var newOrder = order.Adapt(); newOrder.IsDeleted = true; @@ -2524,12 +2542,29 @@ namespace Myshipping.Application await CancelAllocationSlot(Id); } + var taskbcList = _repTaskBCInfo.AsQueryable().Where(a => a.MBL_NO == mblno && a.TenantId == UserManager.TENANT_ID).ToList(); + + if (taskbcList.Count > 0) + { + foreach (var tbc in taskbcList) + { + tbc.BOOKING_ORDER_ID = null; + + _repTaskBCInfo.AsUpdateable(tbc).UpdateColumns(x => new + { + x.BOOKING_ORDER_ID + }).ExecuteCommand(); + } + } + // 记录日志 var newOrder = order.Adapt(); newOrder.IsDeleted = true; newOrder.DeleteTime = deleteTime; await SaveLog(newOrder, order, "删除"); } + + } catch (Exception) { @@ -13786,6 +13821,8 @@ namespace Myshipping.Application TenantId = item.TenantId })); } + + } } #endregion diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskVerifyCopyBLService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskVerifyCopyBLService.cs index 508e8e60..308f122a 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskVerifyCopyBLService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskVerifyCopyBLService.cs @@ -783,7 +783,7 @@ namespace Myshipping.Application fileList.ForEach(file => { - if (file.FILE_CATEGORY == TaskFileCategoryEnum.SI_SUBMITTED.ToString()) + if (file.FILE_CATEGORY == TaskFileCategoryEnum.VERIFY_COPY.ToString()) { var fileFullPath = Path.Combine(dirAbs, file.FILE_PATH);