|
@@ -745,7 +745,6 @@ namespace TEAMModelBI.Controllers.BITest
|
|
|
var (start7, end7) = TimeHelper.GetStartOrEnd(DateTimeOffset.UtcNow, "year");
|
|
|
|
|
|
var start = GetMonthStart(ere);
|
|
|
- var end = GetMonthEnd(ere);
|
|
|
|
|
|
List<StartEndTime> endList1 = TimeHelper.GetYearMonthlyStartEnd(DateTimeOffset.UtcNow.Year);
|
|
|
//return Ok(new { strList, dateTime, year, start, end, endList, endList1, endList2 });
|
|
@@ -1512,7 +1511,6 @@ namespace TEAMModelBI.Controllers.BITest
|
|
|
Teacher targetTeacher = await cosmosClient.GetContainer(Constant.TEAMModelOS, Constant.Teacher).ReadItemAsync<Teacher>("1636016499", new PartitionKey("Base"));
|
|
|
_coreAPIHttpService.PushNotify(new List<IdNameCode> { new IdNameCode { id = targetTeacher.id, name = targetTeacher.name, code = targetTeacher.lang } }, "create-school", Constant.NotifyType_IES5_Management, new Dictionary<string, object> { { "tmdname", $"{targetTeacher.name}" }, { "schooName", "商务智能学校(BI)" }, { "schoolId", "cswznb" }, { "tmdid", $"{targetTeacher.id}" } }, _option.Location, _configuration, _dingDing, _environment.ContentRootPath);
|
|
|
|
|
|
-
|
|
|
return Ok(new { state = RespondCode.Ok });
|
|
|
}
|
|
|
|
|
@@ -1723,16 +1721,14 @@ namespace TEAMModelBI.Controllers.BITest
|
|
|
var cosmosClient = _azureCosmos.GetCosmosClient();
|
|
|
if (!jsonElement.TryGetProperty("scId", out JsonElement scId)) return BadRequest();
|
|
|
|
|
|
- List<object> server = new();
|
|
|
- _ = BISchoolService.UpSchoolEdition(cosmosClient, server, "hbcn");
|
|
|
+ List<string> server = new();
|
|
|
+ _ = BISchoolService.UpSchoolEdition(cosmosClient, _dingDing, server, "hbcn");
|
|
|
|
|
|
return Ok(new { state = 200 });
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
/// <summary>
|
|
|
- ///
|
|
|
+ /// 每天执行一次
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
public async Task<IActionResult> SetStatsZero()
|
|
@@ -1741,7 +1737,6 @@ namespace TEAMModelBI.Controllers.BITest
|
|
|
return Ok(new { });
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// 测试依据类型增/减量统计方法
|
|
|
/// </summary>
|
|
@@ -2085,19 +2080,14 @@ namespace TEAMModelBI.Controllers.BITest
|
|
|
|
|
|
}
|
|
|
|
|
|
- public static long GetMonthEnd(DateTimeOffset dt)
|
|
|
+ public static (long month, long dayEnd) GetMonthStart(DateTimeOffset dt)
|
|
|
{
|
|
|
DateTime dtNew = new DateTime(dt.Year, dt.Month, 1);
|
|
|
- var ste = dtNew.AddMonths(1).AddDays(-1).Day;
|
|
|
- long iLastDay = DateTimeOffset.Parse($"{dt.Year}-{dt.Month}-{ste} 23:59:59").ToUnixTimeSeconds();
|
|
|
- return iLastDay;
|
|
|
- }
|
|
|
+ long month = DateTimeOffset.Parse($"{dtNew}").ToUnixTimeSeconds();
|
|
|
|
|
|
- public static long GetMonthStart(DateTimeOffset dt)
|
|
|
- {
|
|
|
- DateTime dtNew = new DateTime(dt.Year, dt.Month, 1);
|
|
|
- long iLastDay = DateTimeOffset.Parse($"{dtNew}").ToUnixTimeSeconds();
|
|
|
- return iLastDay;
|
|
|
+ var ste = dtNew.AddMonths(1).AddDays(-1).Day;
|
|
|
+ long dayTime = DateTimeOffset.Parse($"{dt.Year}-{dt.Month}-{ste} 23:59:59").ToUnixTimeSeconds();
|
|
|
+ return (month, dayTime);
|
|
|
}
|
|
|
|
|
|
public class GenerateRandom1
|