2023-09-07 17:21:02 +08:00
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using HT.Cloud.Service.ChartsManage;
|
|
|
|
|
using HT.Cloud.Service.ReportManage;
|
|
|
|
|
using HT.Cloud.Code;
|
2023-12-20 15:51:03 +08:00
|
|
|
|
using HT.Cloud.Service.SystemSecurity;
|
2023-09-07 17:21:02 +08:00
|
|
|
|
|
|
|
|
|
namespace HT.Cloud.Web.Areas.ReportManage.Controllers
|
|
|
|
|
{
|
|
|
|
|
[Area("ReportManage")]
|
|
|
|
|
public class MainPageController : BaseController
|
|
|
|
|
{
|
|
|
|
|
public MainPageService _mainPageService { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 绑定数据仓库的数据库ID
|
|
|
|
|
/// </summary>
|
2024-07-10 16:08:09 +08:00
|
|
|
|
private string systemDescription = GlobalContext.SystemConfig.SystemDescription;
|
2023-09-07 17:21:02 +08:00
|
|
|
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
public async Task<ActionResult> GetMainPageInit()
|
|
|
|
|
{
|
2024-07-10 16:08:09 +08:00
|
|
|
|
var data = await _mainPageService.GetMainPageInit(systemDescription);
|
2023-09-07 17:21:02 +08:00
|
|
|
|
return Content(data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
public async Task<ActionResult> GetMainPageChartInit()
|
|
|
|
|
{
|
2024-07-10 16:08:09 +08:00
|
|
|
|
var data = await _mainPageService.GetMainPageChartInit(systemDescription);
|
2023-09-07 17:21:02 +08:00
|
|
|
|
return Content(data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
public async Task<ActionResult> GetRtData()
|
|
|
|
|
{
|
2024-07-10 16:08:09 +08:00
|
|
|
|
var data = await _mainPageService.GetRtData(systemDescription);
|
2023-09-07 17:21:02 +08:00
|
|
|
|
return Content(data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
public async Task<ActionResult> GetRtChartData()
|
|
|
|
|
{
|
2024-07-10 16:08:09 +08:00
|
|
|
|
var data = await _mainPageService.GetRtChartData(systemDescription);
|
2023-09-07 17:21:02 +08:00
|
|
|
|
return Content(data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|