164 lines
4.5 KiB
C#
Raw Normal View History

2024-11-18 11:43:17 +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-18 11:43:17 +08:00
using DOAN.Infrastructure;
2025-02-25 13:52:50 +08:00
using DOAN.Model.MES.BI.Dto;
2024-11-18 11:43:17 +08:00
using DOAN.Model.mes.echarts;
2025-02-25 13:52:50 +08:00
namespace DOAN.WebApi.Controllers.MES.BI
2024-11-18 11:43:17 +08:00
{
/// <summary>
/// 生产大屏2 version 2
/// </summary>
[AllowAnonymous]
2025-02-25 13:52:50 +08:00
[Route("mes/BI/product2")]
2024-11-18 11:43:17 +08:00
public class Product2Controller : BaseController
{
2025-02-25 13:52:50 +08:00
private readonly IProduct2BIService productBIService;
2024-11-18 11:43:17 +08:00
2025-02-25 13:52:50 +08:00
public Product2Controller(IProduct2BIService _product2BIService)
2024-11-18 11:43:17 +08:00
{
2025-02-25 13:52:50 +08:00
productBIService = _product2BIService;
2024-11-18 11:43:17 +08:00
}
2024-11-18 13:56:59 +08:00
/// <summary>
/// 数字牌
/// </summary>
/// <returns></returns>
[HttpGet("getMoudle01")]
public IActionResult GetMoudle01()
{
2025-02-25 13:52:50 +08:00
var response = productBIService.GetMoudle01();
2024-11-18 13:56:59 +08:00
return SUCCESS(response);
}
/// <summary>
/// 班组进度统计
/// </summary>
/// <returns></returns>
[HttpGet("getMoudle02")]
public IActionResult GetMoudle02()
{
2025-02-25 13:52:50 +08:00
var response = productBIService.GetMoudle02();
2024-11-18 13:56:59 +08:00
return SUCCESS(response);
}
/// <summary>
/// 昨天 班组报工数 和计划数对比
/// </summary>
/// <returns></returns>
[HttpGet("getMoudle03")]
public IActionResult GetMoudle03()
{
2025-02-25 13:52:50 +08:00
var response = productBIService.GetMoudle03();
2024-11-18 13:56:59 +08:00
return SUCCESS(response);
}
/// <summary>
2024-12-18 19:01:29 +08:00
/// 昨天 各班组计划完成率统计
/// </summary>
/// <returns></returns>
[HttpGet("getMoudle09")]
public IActionResult GetMoudle09()
{
2025-02-25 13:52:50 +08:00
var response = productBIService.GetMoudle09();
return SUCCESS(response);
}
2024-11-18 13:56:59 +08:00
/// <summary>
2024-12-18 19:01:29 +08:00
/// 上周各班组计划完成率统计
2024-11-18 13:56:59 +08:00
/// </summary>
/// <returns></returns>
[HttpGet("getMoudle04")]
public IActionResult GetMoudle04()
{
2025-02-25 13:52:50 +08:00
var response = productBIService.GetMoudle04();
2024-11-18 13:56:59 +08:00
return SUCCESS(response);
}
/// <summary>
/// 上周 班组报工数 和计划数对比 折线图 不完成TOP
/// </summary>
/// <returns></returns>
[HttpGet("getMoudle10")]
public IActionResult GetMoudle10()
{
2025-02-25 13:52:50 +08:00
var response = productBIService.GetMoudle10();
return SUCCESS(response);
}
2024-11-18 13:56:59 +08:00
/// <summary>
/// 今天异常工单
/// </summary>
/// <returns></returns>
[HttpGet("getMoudle05")]
public IActionResult GetMoudle05()
{
2025-02-25 13:52:50 +08:00
var response = productBIService.GetMoudle05();
2024-11-18 13:56:59 +08:00
return SUCCESS(response);
}
/// <summary>
2024-11-18 18:10:56 +08:00
/// 本月 工单达成率
2024-11-18 13:56:59 +08:00
/// </summary>
/// <returns></returns>
[HttpGet("getMoudle06")]
public IActionResult GetMoudle06()
{
2025-02-25 13:52:50 +08:00
var response = productBIService.GetMoudle06();
2024-11-18 13:56:59 +08:00
return SUCCESS(response);
}
2024-11-18 18:25:16 +08:00
/// <summary>
/// 本月 生产产品 top10
/// </summary>
/// <returns></returns>
2024-11-18 13:56:59 +08:00
[HttpGet("getMoudle07")]
public IActionResult GetMoudle07()
{
2025-02-25 13:52:50 +08:00
var response = productBIService.GetMoudle07();
2024-11-18 13:56:59 +08:00
return SUCCESS(response);
}
2024-12-10 13:57:24 +08:00
/// <summary>
/// 本月 报工不满原因 top10
/// </summary>
/// <returns></returns>
[HttpGet("getMoudle77")]
public IActionResult GetMoudle77()
{
2025-02-25 13:52:50 +08:00
var response = productBIService.GetMoudle77();
2024-12-10 13:57:24 +08:00
return SUCCESS(response);
}
2024-11-18 13:56:59 +08:00
//本月每天产量
2024-11-18 13:56:59 +08:00
[HttpGet("getMoudle08")]
public IActionResult GetMoudle08()
{
2025-02-25 13:52:50 +08:00
var response = productBIService.GetMoudle08();
2024-11-18 13:56:59 +08:00
return SUCCESS(response);
}
2024-12-21 15:53:01 +08:00
//TODO 获取今天排班组
[HttpGet("get_schedule_group")]
public IActionResult GetAllGrouops()
{
2025-02-25 13:52:50 +08:00
var response = productBIService.GetAllGrouops();
2024-12-21 15:53:01 +08:00
return SUCCESS(response);
}
//TODO 获取各时段各组累计报工数与计划节拍数对比 折线图
[HttpGet("AccumulateReportWork")]
public IActionResult AccumulateReportWork(string groupCode)
{
2025-02-25 13:52:50 +08:00
var response = productBIService.AccumulateReportWork(groupCode);
2024-12-21 15:53:01 +08:00
return SUCCESS(response);
}
2024-11-18 11:43:17 +08:00
}
}