using Microsoft.AspNetCore.Mvc;
|
using System.Net;
|
using System.Net.Http.Headers;
|
using Microsoft.Extensions.Hosting.Internal;
|
using Microsoft.AspNetCore.Http.Extensions;
|
using IStation.Untity;
|
using Furion.DynamicApiController;
|
using System.ComponentModel.DataAnnotations;
|
using Mapster;
|
|
|
namespace IStation.Application
|
{
|
/// <summary>
|
/// MonitorControlNT
|
/// </summary>
|
[Route("Monitor/Control/NT")]
|
[ApiDescriptionSettings("Monitor", Name = "监测南通控制", Order = 400)]
|
public class MonitorControlNT_Controller : IDynamicApiController
|
{
|
|
/// <summary>
|
/// 测试启动
|
/// </summary>
|
[Route("TestStart@V1.0")]
|
[HttpPost]
|
public bool TestStart()
|
{
|
var paras = new Model.MonitorTestControlParas();
|
paras.Type = 1;
|
paras.Instruction = string.Empty;//此处从辅助类中获取指令
|
|
var runQueue = new RabbitMqExChangeHelper();
|
runQueue.Push("NTTEST", paras);
|
return true;
|
}
|
|
/// <summary>
|
/// 测试关闭
|
/// </summary>
|
[Route("TestStop@V1.0")]
|
[HttpPost]
|
public bool TestStop()
|
{
|
var paras = new Model.MonitorTestControlParas();
|
paras.Type = 0;
|
paras.Instruction = string.Empty;//此处从辅助类中获取指令
|
|
var runQueue = new RabbitMqExChangeHelper();
|
runQueue.Push("NTTEST", paras);
|
return true;
|
}
|
|
/// <summary>
|
/// 测试变频
|
/// </summary>
|
[Route("TestChange@V1.0")]
|
[HttpPost]
|
public bool TestChange(NTTestChangeInput input)
|
{
|
var paras = new Model.MonitorTestControlParas();
|
paras.Type = -1;
|
paras.Instruction = string.Empty;//此处从辅助类中获取指令
|
|
var runQueue = new RabbitMqExChangeHelper();
|
runQueue.Push("NTTEST", paras);
|
return true;
|
}
|
|
|
|
|
}
|
}
|