0822-0823与云平台对接

master
lch 3 months ago
parent f8487ef2cd
commit 2a6f3b5623

@ -27,6 +27,7 @@ using Service.Cloud.Msg.Cloud.Resp.OutCharger;
using Service.Cloud.Msg.Host.Req; using Service.Cloud.Msg.Host.Req;
using Service.Cloud.Msg.Host.Req.OutCharger; using Service.Cloud.Msg.Host.Req.OutCharger;
using Service.Cloud.Msg.Host.Resp; using Service.Cloud.Msg.Host.Resp;
using Service.Execute.Api;
namespace Service.Cloud.Client; namespace Service.Cloud.Client;
@ -215,6 +216,22 @@ public class CloudClient : IMqttClientConnectedHandler, IMqttApplicationMessageR
if (result.ResultCode == MqttClientConnectResultCode.Success) if (result.ResultCode == MqttClientConnectResultCode.Success)
{ {
Connected = true; Connected = true;
//TODO::鉴权 是否放在这里
CloudApi.SendSignIn();
#region 0823 测试实时故障使用
/*FaultReport faultReport = new()
{
sn = "HNGX0002",
en= "EquipCode",
fc= "ErrorCode",
ft="ErrorMsg",
fl= 1,
fg= 1,
bt= DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
cm=2,
};
CloudApi.SendRealTimeFaultInfo(faultReport);*/
#endregion
} }
else else
{ {
@ -517,6 +534,8 @@ public class CloudClient : IMqttClientConnectedHandler, IMqttApplicationMessageR
this.Publish(signIn); this.Publish(signIn);
return Sign.GetResp(timeSpan); return Sign.GetResp(timeSpan);
} }
public EqmStateStartLogInfoRes? SendStartLogMessage(EqmStateStartLogInfo eqmStateStartLogInfo, public EqmStateStartLogInfoRes? SendStartLogMessage(EqmStateStartLogInfo eqmStateStartLogInfo,
TimeSpan timeSpan) TimeSpan timeSpan)
{ {

@ -80,8 +80,7 @@ public class CloudClientMgr
RedisHelper? redisHelper = AppInfo.Container.Resolve<RedisHelper>(); RedisHelper? redisHelper = AppInfo.Container.Resolve<RedisHelper>();
BinInfoRepository binInfoRepository = AppInfo.Container.Resolve<BinInfoRepository>(); BinInfoRepository binInfoRepository = AppInfo.Container.Resolve<BinInfoRepository>();
CloudApi.SendSignIn();
#region 遥测合并上报 #region 遥测合并上报
req.datainfo = new List<DataInfo>(); req.datainfo = new List<DataInfo>();

Loading…
Cancel
Save