package com.ruoyi.web.dashboard; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.dashboard.project.domain.monthProject.MonthProjectQuery; import com.ruoyi.dashboard.project.service.DashboardProjectService; @RestController @RequestMapping("/dashboard/project") public class DashboardProjectController { @Autowired private DashboardProjectService dashboardProjectService; // 获取每月项目数和完成数的数据 @GetMapping("/month") public AjaxResult month(MonthProjectQuery query) { return AjaxResult.success(dashboardProjectService.selectMonthProject(query)); } // 获取项目比率 @GetMapping("/rate") public AjaxResult rate() { return AjaxResult.success(dashboardProjectService.selectProjectRate()); } }