package com.emergencyrepair.business.controller; import com.emergencyrepair.business.dto.report.ReportContractorDto; import com.emergencyrepair.business.dto.report.ReportMetricDto; import com.emergencyrepair.business.dto.report.ReportOverviewDto; import com.emergencyrepair.business.dto.report.ReportTeamDto; import com.emergencyrepair.business.dto.report.ReportTrendDto; import com.emergencyrepair.business.service.ReportService; import com.emergencyrepair.common.Result; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; @RestController @RequestMapping("/api/reports") @RequiredArgsConstructor public class ReportController { private final ReportService reportService; @GetMapping("/overview") public Result overview() { return Result.ok(reportService.overview()); } @GetMapping("/top-equipment") public Result> topEquipment() { return Result.ok(reportService.topEquipment()); } @GetMapping("/by-team") public Result> byTeam() { return Result.ok(reportService.byTeam()); } @GetMapping("/contractors") public Result> contractors() { return Result.ok(reportService.contractors()); } @GetMapping("/yearly-trend") public Result> yearlyTrend() { return Result.ok(reportService.yearlyTrend()); } }