12345678910111213141516171819202122232425262728293031323334353637383940 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
- using wispro.sp.share;
- namespace wispro.sp.web.Services
- {
- public class ReportService
- {
- private readonly IHttpService _httpClient;
- public ReportService(IHttpService httpClient)
- {
- _httpClient = httpClient;
- }
- public async Task<ChartDatas> GetAppealReportData(int type,DateTime? start,DateTime? end,int? userId)
- {
- //AppealReport(int type, DateTime ? start, DateTime ? end, int ? userId)
- string strUrl = $"Report/AppealReport?type={type}";
- if (start.HasValue)
- {
- strUrl = $"{strUrl}&start={start?.ToString("yyyy-MM-dd")}";
- }
- if (end.HasValue)
- {
- strUrl = $"{strUrl}&end={end?.ToString("yyyy-MM-dd")}";
- }
- if (userId.HasValue)
- {
- strUrl = $"{strUrl}&userId={userId.Value}";
- }
- var data = await _httpClient.Get<share.ChartDatas>(strUrl);
- return data;
- }
- }
- }
|