From b61c438e72246296910ad7783cf96111b102b518 Mon Sep 17 00:00:00 2001 From: liwen Date: Fri, 23 Aug 2024 11:03:28 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E5=8D=AB=E7=94=9F=E8=80=83=E6=A0=B8?= =?UTF-8?q?=E8=A1=A8=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hnac/hzims/safeproduct/controller/HygieneController.java | 3 +-- .../hzims/safeproduct/service/impl/HygieneRecordServiceImpl.java | 8 ++++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/HygieneController.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/HygieneController.java index 7ac7509..5b37542 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/HygieneController.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/HygieneController.java @@ -20,7 +20,6 @@ import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; -import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.mp.support.Query; import org.springblade.core.tool.api.R; import org.springframework.web.bind.annotation.*; @@ -41,7 +40,7 @@ import java.util.Map; @RequestMapping("/hygiene") @Business(module = Constants.APP_NAME, value = "卫生自查") @Api(value = "卫生自查", tags = "卫生自查接口") -public class HygieneController extends BladeController { +public class HygieneController { private final IHygienePlanService hygienePlanService; diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/HygieneRecordServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/HygieneRecordServiceImpl.java index 823ae61..22babe3 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/HygieneRecordServiceImpl.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/HygieneRecordServiceImpl.java @@ -235,6 +235,9 @@ public class HygieneRecordServiceImpl extends ServiceImpl params = BaseUtil.obj2Map(exportVO); String templateFile; + // 根据周数匹配不同模板文件 if (weekList.size() == 4) { templateFile = "template/卫生考核表(四周)" + SafeProductConstant.DOCX_SUFFIX; } else { templateFile = "template/卫生考核表(五周)" + SafeProductConstant.DOCX_SUFFIX; } - String wordPath = "D:/" + "/卫生考核表" + SafeProductConstant.DOCX_SUFFIX; - String pdfPath = "D:/" + "/卫生考核表" + SafeProductConstant.PDF_SUFFIX; + String wordPath = savePath + "/卫生考核表" + SafeProductConstant.DOCX_SUFFIX; + String pdfPath = savePath + "/卫生考核表" + SafeProductConstant.PDF_SUFFIX; BaseUtil.exportDocument(templateFile, params, wordPath, pdfPath, "",response); }