From 96e3e9567edc25aa2aa3da223bbdf279b4cb3c82 Mon Sep 17 00:00:00 2001 From: FCL Date: Mon, 29 Dec 2025 09:56:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=8A=A5=E5=91=8A=E9=A2=84=E6=8A=A5url?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/ReportDocumentFileController.java | 9 ++++++ .../dal/mapper/DeviceMaintainMapper.xml | 29 +++++-------------- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/controller/admin/ReportDocumentFileController.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/controller/admin/ReportDocumentFileController.java index 9b75704..46736f4 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/controller/admin/ReportDocumentFileController.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/controller/admin/ReportDocumentFileController.java @@ -1,5 +1,7 @@ package com.zt.plat.module.qms.business.reportdoc.controller.admin; +import com.zt.plat.module.infra.api.file.FileApi; +import com.zt.plat.module.infra.api.file.dto.FileRespDTO; import com.zt.plat.module.qms.business.reportdoc.controller.vo.ReportDocumentFilePageReqVO; import com.zt.plat.module.qms.business.reportdoc.controller.vo.ReportDocumentFileRespVO; import com.zt.plat.module.qms.business.reportdoc.controller.vo.ReportDocumentFileSaveReqVO; @@ -53,6 +55,7 @@ public class ReportDocumentFileController extends AbstractFileUploadController i @Resource private ReportDocumentFileService reportDocumentFileService; @Resource private ReportDocumentMainService reportDocumentMainService; + @Resource private FileApi fileApi; @PostMapping("/create") @Operation(summary = "创建检测报告附件") @@ -107,6 +110,12 @@ public class ReportDocumentFileController extends AbstractFileUploadController i version = mainDO.getDocumentVersion(); } ReportDocumentFileDO entity = reportDocumentFileService.getByMainIdAndVersion(mainId, version); + + Long fileId = entity.getFileId(); + CommonResult fileRet = fileApi.getFile(fileId); + FileRespDTO file = fileRet.getData(); + if(fileRet.isSuccess() && file != null) + entity.setUrl(file.getUrl()); if(entity == null){ return CommonResult.success(null); } diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/device/dal/mapper/DeviceMaintainMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/device/dal/mapper/DeviceMaintainMapper.xml index bb467f2..f9b63a3 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/device/dal/mapper/DeviceMaintainMapper.xml +++ b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/device/dal/mapper/DeviceMaintainMapper.xml @@ -3,7 +3,7 @@ - + @@ -25,9 +25,7 @@ - + select m.*, + from T_DEV_MATN m left join T_DEV_INF d on m.DEV_ID = d.id left join T_DEV_PDT p on d.PDT_ID = p.id @@ -55,23 +58,7 @@