From 1042e3a011be3fdfc87506d622361a12659ea5d0 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Tue, 30 Jan 2024 11:57:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9Booking=20Cancellation=20?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Myshipping.Application/Enum/TaskFileCategoryEnum.cs | 10 ++++++++++ .../Service/BookingSlot/BookingSlotService.cs | 3 +++ .../Service/TaskManagePlat/TaskManageService.cs | 12 ++++++++++++ 3 files changed, 25 insertions(+) diff --git a/Myshipping.Application/Enum/TaskFileCategoryEnum.cs b/Myshipping.Application/Enum/TaskFileCategoryEnum.cs index 52468c1b..9c725be8 100644 --- a/Myshipping.Application/Enum/TaskFileCategoryEnum.cs +++ b/Myshipping.Application/Enum/TaskFileCategoryEnum.cs @@ -33,6 +33,16 @@ namespace Myshipping.Application [Description("Booking Amendment Notice")] BC_MODIFY_NOTICE, /// + /// Booking Cancellation + /// + [Description("Booking Cancellation")] + BC_CANCEL, + /// + /// Booking Cancellation Notice + /// + [Description("Booking Cancellation Notice")] + BC_CANCEL_NOTICE, + /// /// 空 /// [Description("NONE")] diff --git a/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs b/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs index 7ebdc855..e41b94d0 100644 --- a/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs +++ b/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs @@ -468,6 +468,9 @@ namespace Myshipping.Application { throw Oops.Bah($"未找到订舱编号为 {slotNO} 的数据"); } + + id = model.Id; + model.IsDeleted = true; await _repBase.UpdateAsync(model); diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs index 85606a95..7087221b 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs @@ -360,6 +360,12 @@ namespace Myshipping.Application fileCategory = TaskFileCategoryEnum.BC_MODIFY.ToString(); } + else if (TaskBaseTypeEnum.CANCELLATION.ToString() == taskInfo.TASK_BASE_TYPE) + { + attachFileType = "bccancelfiles"; + + fileCategory = TaskFileCategoryEnum.BC_CANCEL.ToString(); + } var noExtensionFileName = Path.GetFileNameWithoutExtension(file.FileName); var fileFullName = await FileAttachHelper.SaveFile(taskInfo.PK_ID, bytes, batchNo, noExtensionFileName, @@ -403,6 +409,12 @@ namespace Myshipping.Application fileCategory = TaskFileCategoryEnum.BC_MODIFY_NOTICE.ToString(); } + else if (TaskBaseTypeEnum.CANCELLATION.ToString() == taskInfo.TASK_BASE_TYPE) + { + attachFileType = "bccancelnoticefiles"; + + fileCategory = TaskFileCategoryEnum.BC_CANCEL_NOTICE.ToString(); + } var noExtensionFileName = Path.GetFileNameWithoutExtension(modifyFile.FileName); var fileFullName = await FileAttachHelper.SaveFile(taskInfo.PK_ID, bytes, batchNo, noExtensionFileName,