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