From 2c20566d391dc84fdf2c74f13384de87d9cee0ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=98=8E=E6=A2=81?= <2429105222@qq.com> Date: Thu, 11 May 2023 15:39:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E6=8D=AE=E6=89=93=E5=8D=B0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=89=93=E5=8D=B0=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../glxp/api/controller/basic/BasicOrderPrintController.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java b/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java index 79c3e88e..f8fa7301 100644 --- a/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java +++ b/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java @@ -36,6 +36,7 @@ import com.glxp.api.service.system.SystemPDFTemplateRelevanceService; import com.glxp.api.service.system.SystemPDFTemplateService; import com.glxp.api.util.JasperUtils; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; @@ -72,6 +73,8 @@ public class BasicOrderPrintController { IoCodeService ioCodeService; @Resource SystemPDFTemplateRelevanceCodeService systemPDFTemplateRelevanceCodeService; + @Value("${file_path}") + private String filePath; //校验模板是否正确 @AuthRuleAnnotation("") @@ -202,7 +205,7 @@ public class BasicOrderPrintController { data.put("data", list); String param = JSON.toJSONString(data); - JasperUtils.jasperReport(request, response, param, systemPDFTemplateEntity.getPath(), "pdf"); + JasperUtils.jasperReport(request, response, param, filePath+"pdf/template/"+systemPDFTemplateEntity.getPath(), "pdf"); }