ddd
This commit is contained in:
parent
d519db6006
commit
7e1bbaab31
Binary file not shown.
@ -140,8 +140,6 @@ namespace YD_AllHeartRates.Api.Mqtt
|
||||
int heartRate = data[cd + 2];
|
||||
if (heartRate == 0) continue;
|
||||
|
||||
|
||||
|
||||
var entity = new HeartRateData
|
||||
{
|
||||
ScoreTime = ble.Timestamp,
|
||||
|
@ -155,7 +155,7 @@ namespace YD_AllHeartRates.Api.Services.Impl
|
||||
// 先尝试从缓存读取
|
||||
var allData = _caching.Get<List<HeartRateData>>(cacheKey);
|
||||
|
||||
if (allData == null|| allData.Count==0)
|
||||
if (allData == null || allData.Count == 0)
|
||||
{
|
||||
allData = await _userContext.HeartRateData
|
||||
.Where(x => x.SchoolCode == schoolCode && x.ScoreTime > dayStart && x.ScoreTime <= dayEnd)
|
||||
@ -170,7 +170,6 @@ namespace YD_AllHeartRates.Api.Services.Impl
|
||||
res.SportsData.OnlineDevicesCount = data.GroupBy(x => x.StudentNo).Count();
|
||||
res.SportsData.AvgHeartRate = (int)data.Select(x => x.Value).DefaultIfEmpty(0).Average();
|
||||
|
||||
|
||||
var durationsByStudent = HeartRateReportHelper.CalculateDurations(data, x => (x.StudentNo, x.Sex, x.ClassId));
|
||||
|
||||
res.SportsData.AvgDuration = (int)durationsByStudent.Values.DefaultIfEmpty(0).Average();
|
||||
|
@ -309,13 +309,13 @@ namespace YD_AllHeartRates.Api
|
||||
app.UseStaticHttpContext();
|
||||
app.UseMiddleware<JwtContextMiddleware>();
|
||||
|
||||
//app.UseSwagger();
|
||||
//app.UseSwaggerUI(c =>
|
||||
//{
|
||||
// //2个下拉框选项 选择对应的文档
|
||||
// c.SwaggerEndpoint("/swagger/v1/swagger.json", "YD_AllHeartRates.Api");
|
||||
// c.RoutePrefix = "";
|
||||
//});
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI(c =>
|
||||
{
|
||||
//2个下拉框选项 选择对应的文档
|
||||
c.SwaggerEndpoint("/swagger/v1/swagger.json", "YD_AllHeartRates.Api");
|
||||
c.RoutePrefix = "";
|
||||
});
|
||||
|
||||
app.UseRouting();
|
||||
app.UseCors();
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
OZ2FMHhzcKLaTsTH79CqMYu8/tuIh7oBcr70vB907z4=WWmIfOUbyYPYdKFHlVpzo+vbEnfIsJNTTcG8+oWdtSc=
|
||||
ONwTLhkGOhz/28wj7kAwt2jbsNLGmVJjqL1QibQUlKE=WWmIfOUbyYPYdKFHlVpzo+vbEnfIsJNTTcG8+oWdtSc=
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("YD_AllHeartRates.Api")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+49e37a31ce294df3c5c49c35c1f7c2b7ac731b76")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d519db60065b57bb45c944c9712771e34f5a400e")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("YD_AllHeartRates.Api")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("YD_AllHeartRates.Api")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
408527c31edd44cfedba7c63db1afd283ca4776ddf106539e7cf38ad1e7bfc86
|
||||
02e16b3352abc716b497740142c2e3ae17e1f814994e7b90b67f7b1f49efdd7d
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("YD_AllHeartRates.Commons")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ee9116aea22701bf6d184657d96c4e24b2bc0095")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d519db60065b57bb45c944c9712771e34f5a400e")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("YD_AllHeartRates.Commons")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("YD_AllHeartRates.Commons")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
ad77ca7765704675fc50e971094eeabaa926244d017d6f5a36917f704f444668
|
||||
7b2bf23081d834e2ce2a9fc41cc27e53006e31644d5a7528d5f7ab365ea6bfcd
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user