添加项目文件。

This commit is contained in:
dell
2023-03-03 16:07:50 +08:00
parent 2c462551b6
commit 011039960e
585 changed files with 362460 additions and 0 deletions

View File

@ -0,0 +1,41 @@
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
using HT.Cloud.Service.ChartsManage;
using HT.Cloud.Service.ReportManage;
namespace HT.Cloud.Web.Areas.ReportManage.Controllers
{
[Area("ReportManage")]
public class HistoryReportController : BaseController
{
public HistoryReportService _historyReportService { get; set; }
[HttpPost]
public async Task<ActionResult> GetReport(Reportparam reportparam)
{
//var StartTime = reportparam.StartTime.ToString("yyyy-MM-dd HH:mm:ss");
//var EndTime = reportparam.EndTime.ToString("yyyy-MM-dd HH:mm:ss");
var StartTime = Gettime( reportparam.StartTime.ToString());
var EndTime = Gettime( reportparam.EndTime.ToString());
var Interval = int.Parse(reportparam.Interval);
var data = await _historyReportService.GetReportFileName(StartTime, EndTime, Interval);
return Content(data);
}
public string Gettime(string longtime)
{
long jsTimeStamp =long.Parse( longtime);
System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1)); // 当地时区
DateTime dt = startTime.AddMilliseconds(jsTimeStamp);
return (dt.ToString("yyyy/MM/dd HH:mm:ss"));
}
public class Reportparam
{
public string StartTime { get; set; }
public string EndTime { get; set; }
public string Interval { get; set; }
}
}
}