| | |
| | | */ |
| | | @Tag(name = "数据平台 - 指标分类") |
| | | @RestController |
| | | @RequestMapping("/data/ind-item-category") |
| | | @RequestMapping("/data/ind/category") |
| | | @Validated |
| | | public class IndItemCategoryController { |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermission('data:ind-item-category:query')") |
| | | public CommonResult<List<IndItemCategoryRespVO>> getList(IndItemCategoryReqVO reqVO) { |
| | | List<IndItemCategoryEntity> list = indItemCategoryService.getList(reqVO); |
| | | list.sort(Comparator.comparing(IndItemCategoryEntity::getSort)); |
| | | 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)); |
| | | } |
| | |
| | | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获取指标分类信息") |
| | | @PreAuthorize("@ss.hasPermission('system:ind-item-category:query')") |
| | | @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)); |