BusEquipmentDataController.cs
1.5 KB
using Hh.Mes.Service.Equipment;
using Microsoft.AspNetCore.Mvc;
using Hh.Mes.Service.SystemAuth;
namespace WebMvc.Areas.equipment.Controllers
{
[Route("api/[controller]/[action]")]
[ApiController]
public class BusEquipmentDataController : BaseController
{
private readonly BusEquipmentDataService _busEquipmentDataService;
public BusEquipmentDataController(IAuth authUtil, BusEquipmentDataService busEquipmentDataService) : base(authUtil)
{
_busEquipmentDataService = busEquipmentDataService;
//_busEquipmentDataService.sysWebUser = authUtil.GetCurrentUser().User;
}
/// <summary>
/// 根据时间段查询项目下所有设备扩展指标(妥善率、OEE、MTTR、MTBF)
/// </summary>
/// <param name="projectName">项目名称(为查开机分钟数)</param>
/// <param name="argument">参数 tag为1时传设备号;tag为2时传项目号</param>
/// <param name="tag">标记 1or2</param>
/// <param name="startDay">开始时间(yyyy-MM-dd)</param>
/// <param name="endDay">结束时间(yyyy-MM-dd)</param>
/// <returns></returns>
[HttpGet]
public string GetEquipmentsExtendIndexData(string projectName, string argument,int tag, string startDay, string endDay)
{
var res = _busEquipmentDataService.SelectProjectEquipmentsExtendIndex(projectName, argument,tag, startDay, endDay);
return Serialize(res);
}
}
}