120 lines
3.3 KiB
C#
Raw Normal View History

2024-11-11 11:29:32 +08:00
using Microsoft.AspNetCore.Mvc;
using DOAN.Admin.WebApi.Filters;
2025-02-25 13:52:50 +08:00
using DOAN.Service.MES.BI.IService;
2024-11-11 11:29:32 +08:00
using DOAN.Infrastructure;
2025-02-25 13:52:50 +08:00
using DOAN.Model.MES.BI.Dto;
2024-11-11 11:29:32 +08:00
using DOAN.Model.mes.echarts;
2025-02-25 13:52:50 +08:00
namespace DOAN.WebApi.Controllers.MES.BI
2024-11-11 11:29:32 +08:00
{
/// <summary>
2024-12-21 15:53:01 +08:00
/// 生产大屏 (废弃)
2024-11-11 11:29:32 +08:00
/// </summary>
[AllowAnonymous]
2025-02-25 13:52:50 +08:00
[Route("mes/BI/product")]
2024-11-11 11:29:32 +08:00
public class ProductController : BaseController
{
2025-02-25 13:52:50 +08:00
private readonly IProductBIService productBIService;
2024-11-11 11:29:32 +08:00
2025-02-25 13:52:50 +08:00
public ProductController(IProductBIService _productBIService)
2024-11-11 11:29:32 +08:00
{
2025-02-25 13:52:50 +08:00
productBIService = _productBIService;
2024-11-11 11:29:32 +08:00
}
2025-02-25 13:52:50 +08:00
// GET ProductBIMoudle01Dto
2024-11-11 11:29:32 +08:00
/// <summary>
/// 获取产量
/// </summary>
/// <returns></returns>
[HttpGet("get_moudle01")]
public IActionResult GetMoudle01()
{
2025-02-25 13:52:50 +08:00
ProductBIMoudle01Dto response = productBIService.GetMoudle01();
2024-11-11 11:29:32 +08:00
return SUCCESS(response);
}
/// <summary>
/// 前7日产量趋势统计图 (折线图)
/// </summary>
/// <returns></returns>
[HttpGet("get_moudle02")]
public IActionResult GetMoudle02()
{
2025-02-25 13:52:50 +08:00
EchartsOptions response= productBIService.GetMoudle02();
2024-11-11 11:29:32 +08:00
return SUCCESS(response);
}
/// <summary>
/// 前7日工单趋势统计图 (直方图)
/// </summary>
/// <returns></returns>
[HttpGet("get_moudle03")]
public IActionResult GetMoudle03()
{
2025-02-25 13:52:50 +08:00
EchartsOptions response= productBIService.GetMoudle03();
2024-11-11 11:29:32 +08:00
return SUCCESS(response);
}
2024-11-11 14:13:55 +08:00
/// <summary>
/// 今日超时工单占比
/// </summary>
/// <returns></returns>
[HttpGet("get_moudle04")]
public IActionResult GetMoudle04()
{
2025-02-25 13:52:50 +08:00
EchartsOptions response= productBIService.GetMoudle04();
2024-11-11 14:13:55 +08:00
return SUCCESS(response);
}
/// <summary>
/// 前七日工单异常分布占比
/// </summary>
/// <returns></returns>
[HttpGet("get_moudle05")]
public IActionResult GetMoudle05()
{
2025-02-25 13:52:50 +08:00
EchartsOptions response= productBIService.GetMoudle05();
2024-11-11 14:13:55 +08:00
return SUCCESS(response);
}
/// <summary>
/// 获取今日工单列表
/// </summary>
/// <returns></returns>
[HttpGet("get_moudle06")]
public IActionResult GetMoudle06()
{
2025-02-25 13:52:50 +08:00
var response= productBIService.GetMoudle06();
2024-11-11 14:13:55 +08:00
return SUCCESS(response);
}
/// <summary>
/// 获取今日异常工单列表
/// </summary>
/// <returns></returns>
[HttpGet("get_moudle07")]
public IActionResult GetMoudle07()
{
2025-02-25 13:52:50 +08:00
var response= productBIService.GetMoudle07();
2024-11-11 14:13:55 +08:00
return SUCCESS(response);
}
/// <summary>
/// 获取昨天工单报工数
/// </summary>
/// <returns></returns>
[HttpGet("get_moudle08")]
public IActionResult GetMoudle08()
{
2025-02-25 13:52:50 +08:00
var response= productBIService.GetMoudle08();
2024-11-11 14:13:55 +08:00
return SUCCESS(response);
}
2024-11-11 11:29:32 +08:00
}
}