47 lines
1.5 KiB
C#
47 lines
1.5 KiB
C#
|
using FrontendWebApi.Models;
|
|||
|
using Microsoft.AspNetCore.Http;
|
|||
|
using Microsoft.AspNetCore.Mvc;
|
|||
|
using Microsoft.Extensions.Logging;
|
|||
|
using NPOI.SS.Formula.Functions;
|
|||
|
using Repository.BackendRepository.Interface;
|
|||
|
using Repository.FrontendRepository.Interface;
|
|||
|
using System;
|
|||
|
using System.Data.SqlTypes;
|
|||
|
using System.IO;
|
|||
|
using System.Threading.Tasks;
|
|||
|
|
|||
|
namespace FrontendWebApi.ApiControllers
|
|||
|
{
|
|||
|
public class DashboardController : MyBaseApiController<GraphManageController>
|
|||
|
{
|
|||
|
private readonly IBackendRepository backendRepository;
|
|||
|
private readonly IFrontendRepository frontendRepository;
|
|||
|
|
|||
|
public DashboardController(IBackendRepository backendRepository, IFrontendRepository frontendRepository)
|
|||
|
{
|
|||
|
this.backendRepository = backendRepository;
|
|||
|
this.frontendRepository = frontendRepository;
|
|||
|
}
|
|||
|
|
|||
|
[HttpPost]
|
|||
|
public async Task<ActionResult<ApiResult<WorkOrderGraph>>> DashAlert()
|
|||
|
{
|
|||
|
ApiResult<WorkOrderGraph> apiResult = new ApiResult<WorkOrderGraph>();
|
|||
|
try
|
|||
|
{
|
|||
|
var sqlString = $@"select ";
|
|||
|
|
|||
|
//apiResult.Data = ;
|
|||
|
apiResult.Code = "0000";
|
|||
|
}
|
|||
|
catch (Exception exception)
|
|||
|
{
|
|||
|
apiResult.Code = "9999";
|
|||
|
Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
|
|||
|
return Ok(apiResult);
|
|||
|
}
|
|||
|
return Ok(apiResult);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|