fix:报告预报url优化
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
package com.zt.plat.module.qms.business.reportdoc.controller.admin;
|
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.ReportDocumentFilePageReqVO;
|
||||||
import com.zt.plat.module.qms.business.reportdoc.controller.vo.ReportDocumentFileRespVO;
|
import com.zt.plat.module.qms.business.reportdoc.controller.vo.ReportDocumentFileRespVO;
|
||||||
import com.zt.plat.module.qms.business.reportdoc.controller.vo.ReportDocumentFileSaveReqVO;
|
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 ReportDocumentFileService reportDocumentFileService;
|
||||||
@Resource private ReportDocumentMainService reportDocumentMainService;
|
@Resource private ReportDocumentMainService reportDocumentMainService;
|
||||||
|
@Resource private FileApi fileApi;
|
||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建检测报告附件")
|
@Operation(summary = "创建检测报告附件")
|
||||||
@@ -107,6 +110,12 @@ public class ReportDocumentFileController extends AbstractFileUploadController i
|
|||||||
version = mainDO.getDocumentVersion();
|
version = mainDO.getDocumentVersion();
|
||||||
}
|
}
|
||||||
ReportDocumentFileDO entity = reportDocumentFileService.getByMainIdAndVersion(mainId, version);
|
ReportDocumentFileDO entity = reportDocumentFileService.getByMainIdAndVersion(mainId, version);
|
||||||
|
|
||||||
|
Long fileId = entity.getFileId();
|
||||||
|
CommonResult<FileRespDTO> fileRet = fileApi.getFile(fileId);
|
||||||
|
FileRespDTO file = fileRet.getData();
|
||||||
|
if(fileRet.isSuccess() && file != null)
|
||||||
|
entity.setUrl(file.getUrl());
|
||||||
if(entity == null){
|
if(entity == null){
|
||||||
return CommonResult.success(null);
|
return CommonResult.success(null);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<mapper namespace="com.zt.plat.module.qms.resource.device.dal.mapper.DeviceMaintainMapper">
|
<mapper namespace="com.zt.plat.module.qms.resource.device.dal.mapper.DeviceMaintainMapper">
|
||||||
|
|
||||||
<resultMap id="DeviceMaintainVO" type="com.zt.plat.module.qms.resource.device.controller.vo.DeviceMaintainVO">
|
<resultMap id="DeviceMaintainVO" type="com.zt.plat.module.qms.resource.device.controller.vo.DeviceMaintainVO">
|
||||||
|
<id property="id" column="ID"/>
|
||||||
<result property="deviceName" column="DEV_NAME"/>
|
<result property="deviceName" column="DEV_NAME"/>
|
||||||
<result property="alias" column="ALS"/>
|
<result property="alias" column="ALS"/>
|
||||||
<result property="deviceCode" column="DEV_CD"/>
|
<result property="deviceCode" column="DEV_CD"/>
|
||||||
@@ -25,9 +25,7 @@
|
|||||||
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="queryMaintainVoById" resultMap="DeviceMaintainVO">
|
<sql id="fieldDAndP">
|
||||||
select m.*,
|
|
||||||
d.ID,
|
|
||||||
d.DEV_NAME,
|
d.DEV_NAME,
|
||||||
d.ALS,
|
d.ALS,
|
||||||
d.DEV_CD,
|
d.DEV_CD,
|
||||||
@@ -44,6 +42,11 @@
|
|||||||
p.MFR,
|
p.MFR,
|
||||||
p.SPEC,
|
p.SPEC,
|
||||||
p.MDL_NO
|
p.MDL_NO
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="queryMaintainVoById" resultMap="DeviceMaintainVO">
|
||||||
|
select m.*,
|
||||||
|
<include refid="fieldDAndP"/>
|
||||||
from T_DEV_MATN m
|
from T_DEV_MATN m
|
||||||
left join T_DEV_INF d on m.DEV_ID = d.id
|
left join T_DEV_INF d on m.DEV_ID = d.id
|
||||||
left join T_DEV_PDT p on d.PDT_ID = p.id
|
left join T_DEV_PDT p on d.PDT_ID = p.id
|
||||||
@@ -55,23 +58,7 @@
|
|||||||
|
|
||||||
<select id="queryPageListWithCount" resultMap="DeviceMaintainVO">
|
<select id="queryPageListWithCount" resultMap="DeviceMaintainVO">
|
||||||
select
|
select
|
||||||
d.ID,
|
<include refid="fieldDAndP"/>
|
||||||
d.DEV_NAME,
|
|
||||||
d.ALS,
|
|
||||||
d.DEV_CD,
|
|
||||||
d.FACT_CD,
|
|
||||||
d.DEPT_NAME,
|
|
||||||
d.RPR_FLG,
|
|
||||||
d.DMOT_FLG,
|
|
||||||
d.SCR_FLG,
|
|
||||||
d.DSBL_FLG,
|
|
||||||
d.LND_FLG,
|
|
||||||
d.IN_USE_FLG,
|
|
||||||
d.ACPT_FLG,
|
|
||||||
p.ID as PRODUCT_ID,
|
|
||||||
p.MFR,
|
|
||||||
p.SPEC,
|
|
||||||
p.MDL_NO,
|
|
||||||
(
|
(
|
||||||
select count(*) from T_DEV_MATN m
|
select count(*) from T_DEV_MATN m
|
||||||
where m.DAT_TP = #{param.dataType}
|
where m.DAT_TP = #{param.dataType}
|
||||||
|
|||||||
Reference in New Issue
Block a user