using Furion.DynamicApiController;
using Microsoft.AspNetCore.Mvc;
using Nirvana.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Waste.Application.ReportInfo
{
///
/// 统计报表
///
public class ReportAppService : IDynamicApiController
{
private readonly IReportService _reportService;
public ReportAppService(IReportService reportService)
{
_reportService = reportService;
}
///
/// 统计列表
///
///
///
[HttpPost]
public async Task> GetListAsync(QueryParams param)
{
return await _reportService.GetListAsync(param);
}
///
/// 根据商户和垃圾类型进行汇总
///
///
///
[HttpPost]
public async Task> GetListByBusinessAsync(QueryParams param)
{
return await _reportService.GetListByBusinessAsync(param);
}
///
/// 获取一定时间段内的统计数据,第三方接口对接使用
///
///
///
///
[HttpPost]
[QueryParameters]
[ApiDescriptionSettings("Api")]
[ApiAsyncActionFilter]
[NonUnify]
public async Task GetDataAsync([FromQuery]string appid, [FromBody]ApiReportRequestData param)
{
return await _reportService.GetDataAsync(param,appid);
}
}
}