yeg
6 天以前 e38aca8134570513435c003c25dc05f1ae51c9c9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package com.battery.business.web;
 
import java.time.Instant;
import com.battery.business.service.DashboardService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
 
/** 首页查询使用独立查看权限,不借用用户管理和测试编辑权限。 */
@RestController
@RequestMapping("/system/dashboard")
public class DashboardController extends BaseController {
    private final DashboardService service;
    public DashboardController(DashboardService service) { this.service = service; }
    /** 汇总当前测试、检测柜和开放异常;个人待办通过自己的负责人接口读取。 */
    @GetMapping @PreAuthorize("@ss.hasAnyPermi('dashboard:workbench:list,dashboard:workbench:query')")
    public AjaxResult get() { return success(service.read(Instant.now())); }
}