2026-01-20 15:54:58 +08:00
|
|
|
|
using DOAN.Admin.WebApi.Filters;
|
|
|
|
|
|
using DOAN.Model.MES;
|
|
|
|
|
|
using DOAN.Model.MES.product.Dto;
|
|
|
|
|
|
using DOAN.Service.MES.product.IService;
|
2026-01-21 11:16:34 +08:00
|
|
|
|
using DOAN.Service.MES.report.IService;
|
2026-01-20 15:54:58 +08:00
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
|
|
|
|
|
|
|
namespace DOAN.WebApi.Controllers
|
|
|
|
|
|
{
|
2026-01-22 14:30:44 +08:00
|
|
|
|
//[Verify]
|
2026-01-20 15:54:58 +08:00
|
|
|
|
[Route("mes/reportManagement/report")]
|
|
|
|
|
|
[ApiExplorerSettings(GroupName = "MES")]
|
|
|
|
|
|
public class ReportController : BaseController
|
|
|
|
|
|
{
|
|
|
|
|
|
private readonly IProPlanAchievementrateVersion2Service _ProPlanAchievementrateVersion2Service;
|
2026-01-21 11:16:34 +08:00
|
|
|
|
private readonly IReportService _ReportService;
|
2026-01-20 15:54:58 +08:00
|
|
|
|
|
2026-01-21 11:16:34 +08:00
|
|
|
|
public ReportController(IProPlanAchievementrateVersion2Service ProPlanAchievementrateService, IReportService ReportService)
|
2026-01-20 15:54:58 +08:00
|
|
|
|
{
|
|
|
|
|
|
_ProPlanAchievementrateVersion2Service = ProPlanAchievementrateService;
|
2026-01-21 11:16:34 +08:00
|
|
|
|
_ReportService=ReportService;
|
2026-01-20 15:54:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 月生产数据统计列表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="parm"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet("listMonth")]
|
|
|
|
|
|
public IActionResult QueryMonthProuct([FromQuery] MonthProuctDto parm)
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _ProPlanAchievementrateVersion2Service.GetQueryMonthProucth(parm);
|
|
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
2026-01-21 11:16:34 +08:00
|
|
|
|
|
2026-01-22 14:30:44 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 设备开机率
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
2026-01-21 11:16:34 +08:00
|
|
|
|
[HttpGet("devicePoweronRate")]
|
|
|
|
|
|
public IActionResult DevicePoweronRate()
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _ReportService.DevicePoweronRate(DateTime.Today);
|
|
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
2026-01-22 14:30:44 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 设备停机率
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet("deviceDowntimeRate")]
|
|
|
|
|
|
public IActionResult DeviceDowntimeRate()
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _ReportService.DeviceDowntimeRate(DateTime.Today);
|
|
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
2026-01-20 15:54:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|