diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/service/ReportDocumentAssistService.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/service/ReportDocumentAssistService.java index 5b25c8eb..b6febb02 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/service/ReportDocumentAssistService.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/service/ReportDocumentAssistService.java @@ -37,6 +37,9 @@ import org.springframework.util.ObjectUtils; import java.io.IOException; import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import java.net.URLEncoder; import java.text.SimpleDateFormat; import java.time.LocalDateTime; import java.util.Date; @@ -125,7 +128,17 @@ public class ReportDocumentAssistService { dto.setYyqx("检测报告用印"); dto.setYysy("检测报告用印"); dto.setYysx("检测报告用印"); - dto.setXyywjUrl(docFile.getUrl()); + //读取文件url + CommonResult ret1 = fileApi.getFile(docFile.getFileId()); + String url = docFile.getUrl(); + if(ret1.isSuccess()) + url = ret1.getData().getUrl(); + try { + url = URLDecoder.decode(url, "UTF-8"); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(e); + } + dto.setXyywjUrl(url); dto.setYwxtdjbh(entity.getDocumentCode()); dto.setBizCallbackKey(ReportDocListenerConstant.IWORK_BIZ_CALL_BACK_KEY); //业务回调标识,回调分发使用 return iWorkIntegrationApi.createWorkflow(dto);