提交
This commit is contained in:
@@ -0,0 +1,134 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using DOAN.Admin.WebApi.Filters;
|
||||
using DOAN.Model.MES.dev.Dto;
|
||||
using DOAN.Service.MES.dev.IService;
|
||||
|
||||
namespace DOAN.WebApi.Controllers.MES.dev
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据分析
|
||||
/// </summary>
|
||||
[Verify]
|
||||
[Route("mes/deviceManagement/dataAnalysis")]
|
||||
public class DeviceDataAnalysisController : BaseController
|
||||
{
|
||||
private readonly IDeviceDataAnalysisServcie deviceDataAnalysisServcie;
|
||||
|
||||
public DeviceDataAnalysisController(IDeviceDataAnalysisServcie deviceDataAnalysisServcie)
|
||||
{
|
||||
this.deviceDataAnalysisServcie = deviceDataAnalysisServcie;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 故障类型 pie
|
||||
/// </summary>
|
||||
/// <param name="devicedefault"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("defaultTypePie")]
|
||||
public IActionResult FaultTypePie([FromBody] DeviceDefaultDto devicedefault)
|
||||
{
|
||||
if (devicedefault == null) {
|
||||
return SUCCESS(null);
|
||||
}
|
||||
var response= deviceDataAnalysisServcie.DefaultTypePie(devicedefault);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 每日故障数量
|
||||
/// </summary>
|
||||
/// <param name="devicedefault"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("faultTypeBar")]
|
||||
public IActionResult FaultTypeBar([FromBody] DeviceDefaultDto devicedefault)
|
||||
{
|
||||
|
||||
if (devicedefault == null)
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
var response = deviceDataAnalysisServcie.FaultTypeBar(devicedefault);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取设备故障类别累计次数折线图
|
||||
/// </summary>
|
||||
/// <param name="devicedefault"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("faultTypeLine")]
|
||||
public IActionResult FaultTypeLine([FromBody] DeviceDefaultDto devicedefault)
|
||||
{
|
||||
|
||||
if (devicedefault == null)
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
var response = deviceDataAnalysisServcie.FaultTypeLine(devicedefault);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取每天的错误类型
|
||||
/// </summary>
|
||||
/// <param name="devicedefault"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("faultTypeBarByDay")]
|
||||
public IActionResult FaultTypeBarByDay([FromBody] DeviceDefaultDto devicedefault)
|
||||
{
|
||||
if (devicedefault == null)
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
var response = deviceDataAnalysisServcie.FaultTypeBarByDay(devicedefault);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取每日点检巡检总数折线图
|
||||
/// </summary>
|
||||
/// <param name="devicedefault"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("taskLinebyDay")]
|
||||
public IActionResult TaskLinebyDay([FromBody] DeviceDefaultDto devicedefault)
|
||||
{
|
||||
if (devicedefault == null)
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
var response = deviceDataAnalysisServcie.TaskLinebyDay(devicedefault);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取人员响应折线图
|
||||
/// </summary>
|
||||
/// <param name="devicedefault"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("personResponseLine")]
|
||||
public IActionResult PersonResponse([FromBody] DeviceDefaultDto devicedefault)
|
||||
{
|
||||
if (devicedefault == null)
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
var response = deviceDataAnalysisServcie.PersonResponse(devicedefault);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取大屏总数
|
||||
/// </summary>
|
||||
/// <param name="devicedefault"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("getAllTotal")]
|
||||
public IActionResult GetAllTotal()
|
||||
{
|
||||
|
||||
var response = deviceDataAnalysisServcie.GetAllTotal();
|
||||
return SUCCESS(response);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user