From 6ac5d1390b269080a19e0e2e2096a73710e5248d Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Mon, 22 Jan 2024 09:55:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BC=E4=BB=BB=E5=8A=A1=E5=8F=B0?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/BookingSlot/BookingSlotService.cs | 2 +- .../Service/TaskManagePlat/TaskManageService.cs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs b/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs index 2c1c23d6..73a14f24 100644 --- a/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs +++ b/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs @@ -333,7 +333,7 @@ namespace Myshipping.Application if (modifyFile != null) { - _logger.LogInformation($"请求文件名(变更文件):{file.FileName}"); + _logger.LogInformation($"请求文件名(变更文件):{modifyFile.FileName}"); var fileFullPath = await FileAttachHelper.SaveFileDirect(model.Id.ToString(), modifyFile.FileBytes, batchNo, modifyFile.FileName, "bcnoticefiles"); diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs index 5ea6c083..20369805 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs @@ -350,7 +350,8 @@ namespace Myshipping.Application if (TaskBaseTypeEnum.BC.ToString() == taskInfo.TASK_BASE_TYPE) attachFileType = "bcfiles"; - var fileFullName = await FileAttachHelper.SaveFile(taskInfo.PK_ID, bytes, batchNo, file.FileName, + var noExtensionFileName = Path.GetFileNameWithoutExtension(file.FileName); + var fileFullName = await FileAttachHelper.SaveFile(taskInfo.PK_ID, bytes, batchNo, noExtensionFileName, GetFileType(file.FileName), attachFileType); if (!string.IsNullOrWhiteSpace(fileFullName)) @@ -380,7 +381,8 @@ namespace Myshipping.Application if (TaskBaseTypeEnum.BC.ToString() == taskInfo.TASK_BASE_TYPE) attachFileType = "bcnoticefiles"; - var fileFullName = await FileAttachHelper.SaveFile(taskInfo.PK_ID, bytes, batchNo, modifyFile.FileName, + var noExtensionFileName = Path.GetFileNameWithoutExtension(modifyFile.FileName); + var fileFullName = await FileAttachHelper.SaveFile(taskInfo.PK_ID, bytes, batchNo, noExtensionFileName, GetFileType(modifyFile.FileName), attachFileType); if (!string.IsNullOrWhiteSpace(fileFullName))