using System.ComponentModel.DataAnnotations; using Entity.DbModel.Station; using Entity.Dto.Req; using Entity.Dto.Resp; using HybirdFrameworkCore.Entity; using Microsoft.AspNetCore.Mvc; using Service.Init; using Service.Station; namespace WebStarter.Controllers; /// /// 统计 /// [ApiController] [Route("api/[controller]")] public class StatisticsController { private readonly ExStationDayRunResultService _exStationDayRunResultService; public StatisticsController(ExStationDayRunResultService exStationDayRunResultService) { _exStationDayRunResultService = exStationDayRunResultService; } /// /// 获取上个月的每日数据 /// /// [HttpPost("GetMonthResult")] public async Task>> GetMonthResult() { return Result>.Success(await _exStationDayRunResultService.GetMonthRunResult()); } /// /// 获取今年到上月的每月的数据和 /// /// [HttpPost("GetYearResult")] public async Task>> GetYearResult() { return Result>.Success(await _exStationDayRunResultService.GetYearRunResult()); } }