|
@@ -144,37 +144,41 @@ namespace MS.WebApi.Controllers
|
|
|
var buids =await _AccountService.GetBuids();
|
|
|
_logger.LogInformation($"buids 个数 {buids} time:{DateTime.Now}");
|
|
|
var bassAddress = _configuration.GetSection(ReportServerUrl).Value;
|
|
|
- HttpClient httpClient = new HttpClient();
|
|
|
- httpClient.BaseAddress=new Uri(bassAddress);
|
|
|
+
|
|
|
foreach (var buid in buids)
|
|
|
{
|
|
|
|
|
|
if (type == 1 || type == 9999)
|
|
|
{
|
|
|
-
|
|
|
+ HttpClient httpClient = new HttpClient();
|
|
|
+ httpClient.BaseAddress = new Uri(bassAddress);
|
|
|
var url = $"/api/Report/BusinessScopeReportTimeJob?pageNumber=0&pageCount=5&reportType=day&startTime={DateTime.Now.AddDays(-5)}&key=TK2024Cache&buid={buid}";
|
|
|
if (type == 9999)
|
|
|
{
|
|
|
url = $"/api/Report/BusinessScopeReportTimeJob?pageNumber=0&pageCount=80&reportType=day&startTime={DateTime.Now.AddMonths(-3)}&key=TK2024Cache&buid={buid}";
|
|
|
}
|
|
|
var result=await httpClient.GetAsync(url);
|
|
|
- _logger.LogInformation($"{buid}日报表 统计执行完成 {result.StatusCode}-{result.Content.ToString()} time:{DateTime.Now}");
|
|
|
+ _logger.LogInformation($"{buid}日报表 统计执行完成 {result.StatusCode}-{await result.Content.ReadAsStringAsync()} time:{DateTime.Now}");
|
|
|
}
|
|
|
|
|
|
if (type == 2 || type == 9999)
|
|
|
{
|
|
|
+ HttpClient httpClient = new HttpClient();
|
|
|
+ httpClient.BaseAddress = new Uri(bassAddress);
|
|
|
var url = $"/api/Report/BusinessScopeReportTimeJob?pageNumber=0&pageCount=2&reportType=week&startTime={DateTime.Now.AddDays(-20)}&key=TK2024Cache&buid={buid}";
|
|
|
if (type == 9999)
|
|
|
{
|
|
|
url = $"/api/Report/BusinessScopeReportTimeJob?pageNumber=0&pageCount=20&reportType=week&startTime={DateTime.Now.AddMonths(-6)}&key=TK2024Cache&buid={buid}";
|
|
|
}
|
|
|
var result = await httpClient.GetAsync(url);
|
|
|
- _logger.LogInformation($"{buid}周报表 统计执行完成 {result.StatusCode}-{result.Content.ToString()} time:{DateTime.Now}");
|
|
|
+ _logger.LogInformation($"{buid} week 周报表 统计执行完成 {result.StatusCode}-{result.Content.ToString()} time:{DateTime.Now}");
|
|
|
|
|
|
}
|
|
|
|
|
|
if (type == 3 || type == 9999)
|
|
|
{
|
|
|
+ HttpClient httpClient = new HttpClient();
|
|
|
+ httpClient.BaseAddress = new Uri(bassAddress);
|
|
|
var url = $"/api/Report/BusinessScopeReportTimeJob?pageNumber=0&pageCount=2&reportType=month&startTime={DateTime.Now.AddMonths(-2)}&key=TK2024Cache&buid={buid}";
|
|
|
if (type == 9999)
|
|
|
{
|