EquipmentMonitorController.cs
1.93 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using HHECS.Application.Service;
using HHECS.BllModel;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace HHECS.WebAPI.Controllers
{
[Route("api/[controller]/[action]")]
[ApiController]
public class EquipmentMonitorController : ControllerBase
{
public readonly EquipmentService _equipmentService;
public EquipmentMonitorController(EquipmentService equipmentService)
{
_equipmentService = equipmentService;
}
/// <summary>
/// 设备性能
/// </summary>
/// <returns></returns>
[HttpPost]
public ActionResult<BllResult> EquipmentPerformance()
{
List<string> Configs = new List<string>()
{
//"server=172.16.29.15;user id=root;password=HHsoft123.;persistsecurityinfo=True;database=huahengwcs4_cshhzhanhui;SslMode=none;Charset=utf8mb4;Allow User Variables=True",
"server=172.16.29.15;user id=root;password=HHsoft123.;persistsecurityinfo=True;database=huahengwcs4_cshhdoublefork;SslMode=none;Charset=utf8mb4;Allow User Variables=True",
//"server=172.16.29.15;user id=root;password=HHsoft123.;persistsecurityinfo=True;database=huahengwcs4_cshh;SslMode=none;Charset=utf8mb4;Allow User Variables=True"
};
return _equipmentService.EquipmentPerformanceCount(Configs);
}
/// <summary>
/// 设备状态
/// </summary>
/// <returns></returns>
[HttpPost]
public ActionResult<BllResult> EquipmentStatus()
{
return BllResultFactory.Success();
}
/// <summary>
/// 设备保养
/// </summary>
/// <returns></returns>
[HttpPost]
public ActionResult<BllResult> EquipmentMaintain()
{
return BllResultFactory.Success();
}
}
}