LargeScreenBoardController.cs
1.13 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
using System;
using Hh.Mes.Common.log;
using Hh.Mes.Pojo.System;
using Hh.Mes.Service;
using Hh.Mes.Service.WebService.Equipment;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Hh.Mes.Api.Controllers
{
/// <summary>
/// 二号厂房数字化看板展示内容
/// </summary>
[Route("api/[controller]/[action]")]
[ApiController]
public class LargeScreenBoardController : BaseController
{
private readonly LargeScreenBoardService service;
private readonly BaseInfoCacheService baseInfo;
public LargeScreenBoardController(LargeScreenBoardService service, BaseInfoCacheService baseInfo, IHttpContextAccessor accessor)
{
this.service = service;
this.baseInfo = baseInfo;
this.context = accessor.HttpContext;
}
[HttpGet]
public string GetProjectAlarmAndProperRate(string yyyyMonth)
{
this.service.sysUserApiAccount = HttpContext.Items["Account"] as string;
var result = service.GetProjectAlarmAndProperRate(yyyyMonth);
return Serialize(result);
}
}
}