master
rszn 5 months ago
parent 1cbd96408f
commit 2275bad82b

@ -1,4 +1,5 @@
using HybirdFrameworkDriver.Session;
using HybirdFrameworkCore.Utils;
using HybirdFrameworkDriver.Session;
using log4net;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
@ -29,8 +30,11 @@ public class CarController : ControllerBase{
CarInfoResp carInfoResp = new CarInfoResp()
{
Connected = CarServerMgr.CarServer != null && ioSession != null,
CarNo = carNo
};
if (ObjUtils.IsNotNull(ioSession))
{
ioSession.BusinessMap.TryGetValue("ElecMsg", out var elecMsg);
if (elecMsg != null)
{
@ -42,6 +46,9 @@ public class CarController : ControllerBase{
{
carInfoResp.HeartBeatMsg = (HeartBeatMsg)heartBeatMsg;
}
}
return carInfoResp;
}

Loading…
Cancel
Save