tuqin
6 天以前 6e43a9e4daa56a07fe605d6bec1370f36bd5fbfc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package cn.iocoder.yudao.module.mes.controller.admin.safety;
 
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.mes.controller.admin.safety.vo.dashboard.MesSafetyDashboardRespVO;
import cn.iocoder.yudao.module.mes.service.safety.MesSafetyDashboardService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
 
/**
 * 安全生产 - 可视化看板 Controller
 *
 * @author 超级管理员
 */
@Tag(name = "管理后台 - 安全生产-可视化看板")
@RestController
@RequestMapping("/mes/safety/dashboard")
@Validated
public class MesSafetyDashboardController {
 
    @Resource
    private MesSafetyDashboardService dashboardService;
 
    @GetMapping("/overview")
    @Operation(summary = "获得看板概览数据")
    @PreAuthorize("@ss.hasPermission('mes:safety-dashboard:query')")
    public CommonResult<MesSafetyDashboardRespVO> getOverview() {
        return success(dashboardService.getOverview());
    }
 
}