demo20230512/Controllers/Api/Customize/InsynergerController.cs

50 lines
1.4 KiB
C#
Raw Normal View History

2023-05-12 10:20:28 +08:00
using Customize.Insynerger;
using Customize.Insynerger.Interfaces;
using Customize.ViewModels.Insynerger;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
using Weee.Service;
namespace Weee.Controllers.Api.Customize
{
/// <summary>
/// 思納捷客製報表結果API
/// </summary>
public class InsynergerController : ApiControllerBase
{
private readonly WeeeFabDataService service;
public InsynergerController(WeeeFabDataService s) : base(s)
{
service = s;
}
// GET: Insynerger
public object Index()
{
return new { a=1, b="2"} ;
}
//[Route("api/Insynerger/CarbonFootprint")]
//[HttpGet]
//public async Task<InsynergerReportViewModel> CarbonFootprint(int year
// , string groupIds)
//{
// //IinsynergerReportService _insynergerReportService = new insynergerReportService(service.g);
// InsynergerReportViewModel ret = null;
// return ret;
//}
[Route("api/Insynerger/IsOn")]
[HttpGet]
public bool IsOn()
{
IinsynergerAuthenticate isa = new insynergerAuthenticate(
service.GetDbContext());
bool ret = isa.IsSynergerOn();
return ret;
}
}
}