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 @@