From bbe7acfbe5a4c08d6edc91eaf81dcecf9d630e18 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期日, 15 十二月 2024 15:10:50 +0800
Subject: [PATCH] collectQuality

---
 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/category/controller/admin/IndItemCategoryController.java |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/category/controller/admin/IndItemCategoryController.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/category/controller/admin/IndItemCategoryController.java
index 6db3666..b6b815c 100644
--- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/category/controller/admin/IndItemCategoryController.java
+++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/category/controller/admin/IndItemCategoryController.java
@@ -28,7 +28,7 @@
  */
 @Tag(name = "数据平台 - 指标分类")
 @RestController
-@RequestMapping("/data/ind-item-category")
+@RequestMapping("/data/ind/category")
 @Validated
 public class IndItemCategoryController {
 
@@ -44,10 +44,19 @@
         return success(BeanUtils.toBean(list, IndItemCategoryRespVO.class));
     }
 
+    @GetMapping("/list-all-simple")
+    @Operation(summary = "获取指标分类列表", description = "用于【指标分类】界面")
+    @PreAuthorize("@ss.hasPermission('data:ind-item-category:query')")
+    public CommonResult<List<IndItemCategoryRespVO>> getList() {
+        List<IndItemCategoryEntity> list = indItemCategoryService.getSimpleList();
+        list.sort(Comparator.comparing(IndItemCategoryEntity::getSort));
+        return success(BeanUtils.toBean(list, IndItemCategoryRespVO.class));
+    }
+
     @PostMapping("/create")
     @Operation(summary = "创建指标分类")
     @PreAuthorize("@ss.hasPermission('data:ind-item-category:create')")
-    public CommonResult<Boolean> createMenu(@Valid @RequestBody IndItemCategorySaveReqVO createReqVO) {
+    public CommonResult<Boolean> create(@Valid @RequestBody IndItemCategorySaveReqVO createReqVO) {
         indItemCategoryService.create(createReqVO);
         return success(true);
     }
@@ -55,7 +64,7 @@
     @PutMapping("/update")
     @Operation(summary = "修改指标分类")
     @PreAuthorize("@ss.hasPermission('data:ind-item-category:update')")
-    public CommonResult<Boolean> updateMenu(@Valid @RequestBody IndItemCategorySaveReqVO updateReqVO) {
+    public CommonResult<Boolean> update(@Valid @RequestBody IndItemCategorySaveReqVO updateReqVO) {
         indItemCategoryService.update(updateReqVO);
         return success(true);
     }
@@ -64,15 +73,15 @@
     @Operation(summary = "删除指标分类")
     @Parameter(name = "id", description = "指标分类编号", required= true, example = "1024")
     @PreAuthorize("@ss.hasPermission('data:ind-item-category:delete')")
-    public CommonResult<Boolean> deleteMenu(@RequestParam("id") String id) {
+    public CommonResult<Boolean> delete(@RequestParam("id") String id) {
         indItemCategoryService.delete(id);
         return success(true);
     }
 
     @GetMapping("/get")
     @Operation(summary = "获取指标分类信息")
-    @PreAuthorize("@ss.hasPermission('system:ind-item-category:query')")
-    public CommonResult<IndItemCategoryRespVO> getMenu(String id) {
+    @PreAuthorize("@ss.hasPermission('data:ind-item-category:query')")
+    public CommonResult<IndItemCategoryRespVO> get(String id) {
         IndItemCategoryEntity entity = indItemCategoryService.get(id);
         return success(BeanUtils.toBean(entity, IndItemCategoryRespVO.class));
     }

--
Gitblit v1.9.3