From eea5bc9be7deb06106d6274abeb29ebe4b83af44 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期二, 30 四月 2024 13:40:35 +0800 Subject: [PATCH] 考核结果指标详情页面 --- ycl-server/src/main/java/com/ycl/platform/controller/CheckScoreController.java | 36 +++++++++++++++++++----------------- 1 files changed, 19 insertions(+), 17 deletions(-) diff --git a/ycl-server/src/main/java/com/ycl/platform/controller/CheckScoreController.java b/ycl-server/src/main/java/com/ycl/platform/controller/CheckScoreController.java index f001700..f3e736c 100644 --- a/ycl-server/src/main/java/com/ycl/platform/controller/CheckScoreController.java +++ b/ycl-server/src/main/java/com/ycl/platform/controller/CheckScoreController.java @@ -2,16 +2,20 @@ import annotation.Log; import com.ycl.platform.domain.dto.CheckScoreDTO; +import com.ycl.platform.domain.dto.CheckScoreIndexDTO; import com.ycl.platform.domain.entity.CheckScore; import com.ycl.platform.service.ICheckScoreService; import com.ycl.system.AjaxResult; import com.ycl.system.controller.BaseController; import com.ycl.system.page.TableDataInfo; +import com.ycl.utils.poi.ExcelUtil; import enumeration.BusinessType; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -53,20 +57,21 @@ /** - * 鑾峰彇鑰冩牳绉垎璇︾粏淇℃伅 + * 鑾峰彇鑰冩牳鎸囨爣璇︾粏淇℃伅 */ @PreAuthorize("@ss.hasPermi('check:score:query')") - @GetMapping(value = "/detail/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) + @GetMapping(value = "/detail/index") + public AjaxResult getIndex(CheckScoreIndexDTO checkScoreIndexDTO) { - return success(checkScoreService.selectCheckScoreById(id)); + + return success(checkScoreService.selectCheckScoreById(checkScoreIndexDTO)); } /** * 鍙戝竷鑰冩牳绉垎 */ @PreAuthorize("@ss.hasPermi('check:score:edit')") - @Log(title = "鑰冩牳绉垎", businessType = BusinessType.UPDATE) + @Log(title = "鍙戝竷鑰冩牳绉垎", businessType = BusinessType.UPDATE) @PutMapping("/publish") public AjaxResult edit(@RequestBody CheckScoreDTO checkScoreDTO) { @@ -74,6 +79,15 @@ return toAjax(checkScoreService.publishCheckScore(checkScoreDTO)); } + /** + * 瀵煎嚭鑰冩牳绉垎鍒楄〃 + */ + @PreAuthorize("@ss.hasPermi('check:score:export')") + @Log(title = "瀵煎嚭鑰冩牳绉垎", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, CheckScore checkScore) throws IOException { + checkScoreService.exportIndex(response,checkScore); + } // /** // * 鏂板鑰冩牳绉垎 // */ @@ -97,16 +111,4 @@ // } -// /** -// * 瀵煎嚭鑰冩牳绉垎鍒楄〃 -// */ -// @PreAuthorize("@ss.hasPermi('check:score:export')") -// @Log(title = "鑰冩牳绉垎", businessType = BusinessType.EXPORT) -// @PostMapping("/export") -// public void export(HttpServletResponse response, CheckScore checkScore) -// { -// List<CheckScore> list = checkScoreService.selectCheckScoreList(checkScore); -// ExcelUtil<CheckScore> util = new ExcelUtil<CheckScore>(CheckScore.class); -// util.exportExcel(response, list, "鑰冩牳绉垎鏄庣粏鏁版嵁"); -// } } -- Gitblit v1.8.0