根据比赛调整内容

This commit is contained in:
suntao committed 2020-12-16 13:47:20 +08:00
1 parent 70abe45eb0
commit e8b6418aa6
3 files changed
+10 -2

No files matched your search

+6 -1
View File
@@ -59,6 +59,11 @@ namespace OnlineUserPool.Hander
// targetData._Power.ToString(),
// targetData._Cadence.ToString()
//};
var weightKg = 0.0D;
if(targetData._Power >= 0)
{
weightKg = Math.Round(targetData._Power / item.Weight, 2);
}
var info = new MsgModel()
{
exit = item.End,
@@ -72,7 +77,7 @@ namespace OnlineUserPool.Hander
CommandType = 1,
IsVirtual = true,
Speed = targetData._Speed,
WeightKg = Math.Round(targetData._Power / item.Weight, 2),
WeightKg = weightKg,
PreDistance = item.GetPreDistance()
};
msgModels.Add(info);
+2
View File
@@ -41,5 +41,7 @@ namespace OnlineUserPool.Model
public double WeightKg { get; set; }
public int Competitionid { get; set; }
public bool Saved { get; set; }
}
}
+2 -1
View File
@@ -210,7 +210,8 @@ namespace OnlineUserPool.ViewModels
m.EndDistance,
m.IsVirtual,//后面要把这个字段过滤掉
m.WeightKg,
m.Competitionid
m.Competitionid,
m.Saved
}));
var data = Encoding.ASCII.GetBytes(jsonString);
foreach (var item in clients)