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"); }