BusEquipmentDataController.cs
1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using Hh.Mes.Common.log;
using Hh.Mes.Service.Equipment;
using Microsoft.AspNetCore.Mvc;
using System.Data;
using Hh.Mes.POJO.Response;
using Autofac.Core;
using Hh.Mes.Service.SystemAuth;
using Hh.Mes.Service.WebService.Equipment;
using NPOI.POIFS.FileSystem;
using Ubiety.Dns.Core;
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);
}
}
}