diff --git a/Myshipping.Application/Service/BookingOrder/BookingValueAddedService.cs b/Myshipping.Application/Service/BookingOrder/BookingValueAddedService.cs index 80caa569..8708690f 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingValueAddedService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingValueAddedService.cs @@ -1273,7 +1273,7 @@ namespace Myshipping.Application BLNo = currBC.BLNo?.Trim().ToUpper(), Vessel = currBC.Vessel?.Trim().ToUpper(), Voyage = currBC.Voyage?.Trim().ToUpper(), - ClosingDate = currBC.ClosingDate, + ClosingDate = currBC.CutSingleTime, CYCutOffTime = currBC.CYCutOffTime, ETD = currBC.ETD }; @@ -1370,6 +1370,32 @@ namespace Myshipping.Application 2、如果选择了转为入货通知,则先保存入货通知。 3、调取入货通知的发送。 */ + var bookingOrder = _bookingOrderRepository.AsQueryable().First(a => a.Id == model.BookingOrderId); + + if(bookingOrder == null) + throw Oops.Bah($"订舱信息获取失败,订舱信息不存在或已作废"); + + if (model.ClosingDate.HasValue) + bookingOrder.CLOSINGDATE = model.ClosingDate; + + if (model.VGMCutOffTime.HasValue) + bookingOrder.CLOSEVGMDATE = model.VGMCutOffTime; + + if (model.CYCutOffTime.HasValue) + bookingOrder.CLOSEDOCDATE = model.CYCutOffTime; + + if (model.ETD.HasValue) + bookingOrder.ETD = model.ETD; + + if(!string.IsNullOrWhiteSpace(model.Vessel)) + bookingOrder.VESSEL = model.Vessel; + + if (!string.IsNullOrWhiteSpace(model.Voyage)) + bookingOrder.VOYNO = model.Voyage; + + if (!string.IsNullOrWhiteSpace(model.Voyage)) + bookingOrder.VOYNO = model.Voyage; + if (model.IsLetterYard) { _logger.LogInformation("批次={no} 单票BC更新订舱后,用户选择了,转为入货通知,开始发送入货通知", batchNo); diff --git a/Myshipping.Application/Service/BookingOrder/Dto/BCReadModel.cs b/Myshipping.Application/Service/BookingOrder/Dto/BCReadModel.cs index b1b2da9c..f5a95f56 100644 --- a/Myshipping.Application/Service/BookingOrder/Dto/BCReadModel.cs +++ b/Myshipping.Application/Service/BookingOrder/Dto/BCReadModel.cs @@ -97,7 +97,7 @@ namespace Myshipping.Application public Nullable PortOfDestinationETA { get; set; } /// - /// 预付地点 + /// 截单时间 /// public Nullable CutSingleTime { get; set; } diff --git a/Myshipping.Application/Service/BookingOrder/Dto/SingleBCDto.cs b/Myshipping.Application/Service/BookingOrder/Dto/SingleBCDto.cs index cef77cf8..f4f64b45 100644 --- a/Myshipping.Application/Service/BookingOrder/Dto/SingleBCDto.cs +++ b/Myshipping.Application/Service/BookingOrder/Dto/SingleBCDto.cs @@ -23,15 +23,20 @@ namespace Myshipping.Application public Nullable LetterYardId { get; set; } /// - /// 截关时间 + /// 截单日期 /// public Nullable ClosingDate { get; set; } /// - /// 截港时间 + /// 截港日期 /// public Nullable CYCutOffTime { get; set; } + /// + /// 截VGM时间 + /// + public Nullable VGMCutOffTime { get; set; } + /// /// 船名 /// diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs index 5362cdc5..c0ba6e9a 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs @@ -1352,20 +1352,20 @@ namespace Myshipping.Application /// 操作类型 /// 顺序号 /// 返回回执 - private async Task InnerManualTask(string batchNo, TaskBaseInfo taskBaseInfo, + private async Task InnerManualTask(string batchNo, TaskBaseInfo model, TaskOperTypeEnum taskOperTypeEnum, int sortNo) { TaskManageOrderResultDto result = new TaskManageOrderResultDto(); - result.bno = taskBaseInfo.TASK_NO; + result.bno = model.TASK_NO; try { - var model = _taskBaseInfoRepository.AsQueryable().First(t => t.PK_ID == taskBaseInfo.PK_ID); + //var model = _taskBaseInfoRepository.Context.CopyNew().Queryable().First(t => t.PK_ID == taskBaseInfo.PK_ID); if (taskOperTypeEnum == TaskOperTypeEnum.COMPLETE_TASK) { - if(taskBaseInfo.TASK_TYPE == TaskBusiTypeEnum.TRUCK_DISPATCH.ToString()) + if(model.TASK_TYPE == TaskBusiTypeEnum.TRUCK_DISPATCH.ToString()) { if(model.STATUS == TaskStatusEnum.Cancel.ToString()) { @@ -1373,7 +1373,7 @@ namespace Myshipping.Application } } - if (taskBaseInfo.TASK_TYPE == TaskBusiTypeEnum.CANCELLATION.ToString()) + if (model.TASK_TYPE == TaskBusiTypeEnum.CANCELLATION.ToString()) { //收到订舱已被取消邮件后生成的任务,如果点击完成,(订舱状态变为【退舱】,注意这里还需要确认) } @@ -1397,7 +1397,7 @@ namespace Myshipping.Application } else if (taskOperTypeEnum == TaskOperTypeEnum.CANCEL_TASK) { - if (taskBaseInfo.TASK_TYPE == TaskBusiTypeEnum.CHANGE_SHIP.ToString()) + if (model.TASK_TYPE == TaskBusiTypeEnum.CHANGE_SHIP.ToString()) { model.STATUS = TaskStatusEnum.Cancel.ToString(); model.STATUS_NAME = TaskStatusEnum.Cancel.GetDescription(); @@ -1412,7 +1412,7 @@ namespace Myshipping.Application it.STATUS_NAME }).ExecuteCommand(); } - else if (taskBaseInfo.TASK_TYPE == TaskBusiTypeEnum.ABORT_CHANGE_SHIP.ToString()) + else if (model.TASK_TYPE == TaskBusiTypeEnum.ABORT_CHANGE_SHIP.ToString()) { /* 1.如果原换船通知已经接受,需要把原船名航次恢复并通知客户取消换船。