demo20230512/Controllers/Api/Customize/carbonController.cs
2023-05-12 10:20:28 +08:00

39 lines
1.1 KiB
C#

using Customize.Insynerger;
using Customize.Insynerger.Interfaces;
using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Weee.DAL;
using Weee.Service;
namespace Weee.Controllers.Api.Customize
{
public class carbonController : ApiController// : ApiControllerBase
{
protected Logger log;
protected WeeeDataContext _db;
protected IinsynergerReportService _insynergerReportService;
public carbonController()
{
log = NLog.LogManager.GetCurrentClassLogger();
_db = new WeeeDataContext();
_insynergerReportService = new insynergerReportService(_db);
}
//public carbonController(WeeeDataAuthorizeService s) : base(s)
//{
//}
[Route("carbon/footprint")]
[HttpGet]
public object footprint(string year, string groupIds)
{
object ret = _insynergerReportService.reportCategory12(year, groupIds);
return ret;
}
}
}