using DOAN.Admin.WebApi.Filters; using DOAN.Model.MES; using DOAN.Model.MES.product.Dto; using DOAN.Service.MES.product.IService; using DOAN.Service.MES.report.IService; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; namespace DOAN.WebApi.Controllers { //[Verify] [Route("mes/reportManagement/report")] [ApiExplorerSettings(GroupName = "MES")] public class ReportController : BaseController { private readonly IProPlanAchievementrateVersion2Service _ProPlanAchievementrateVersion2Service; private readonly IReportService _ReportService; public ReportController(IProPlanAchievementrateVersion2Service ProPlanAchievementrateService, IReportService ReportService) { _ProPlanAchievementrateVersion2Service = ProPlanAchievementrateService; _ReportService=ReportService; } /// /// 月生产数据统计列表 /// /// /// [HttpGet("listMonth")] public IActionResult QueryMonthProuct([FromQuery] MonthProuctDto parm) { var response = _ProPlanAchievementrateVersion2Service.GetQueryMonthProucth(parm); return SUCCESS(response); } /// /// 设备开机率 /// /// [HttpGet("devicePoweronRate")] public IActionResult DevicePoweronRate() { var response = _ReportService.DevicePoweronRate(DateTime.Today); return SUCCESS(response); } /// /// 设备停机率 /// /// [HttpGet("deviceDowntimeRate")] public IActionResult DeviceDowntimeRate() { var response = _ReportService.DeviceDowntimeRate(DateTime.Today); return SUCCESS(response); } /// /// 日生产完成率 /// /// [HttpGet("productionCompletionRate")] public IActionResult ProductionCompletionRate() { var response = _ReportService.ProductionCompletionRate(DateTime.Today); return SUCCESS(response); } /// /// 月生产完成率 /// /// [HttpGet("monthlyProductionCompletionRate")] public IActionResult MonthlyProductionCompletionRate() { var response = _ReportService.MonthlyProductionCompletionRate(DateTime.Today); return SUCCESS(response); } } }