using HybirdFrameworkCore.Autofac.Attribute; using Newtonsoft.Json; using Service.Cloud.Client; using Service.Cloud.Common; using Service.Cloud.Msg.Cloud.Req; using Service.Cloud.Msg.Host.Resp; using Service.Init; namespace Service.Cloud.Handler; [Scope("InstancePerDependency")] public class DeliverBasicInformationHandler : IBaseHandler { public bool CanHandle(string cmd) { return CloudConst.setStBaseInfo == cmd; } public void Handle(string t) { DeliverBasicInformation? deliverBasicInformation = JsonConvert.DeserializeObject(t); if (deliverBasicInformation != null) { StaticStationInfo.StationNo = deliverBasicInformation.sn; StaticStationInfo.StationName = deliverBasicInformation.Sm; StaticStationInfo.StationSn = deliverBasicInformation.SS; //TODO 补全StaticStationInfo后赋值 DeliverBasicInformationResp resp = new DeliverBasicInformationResp(); CloudClientMgr.CloudClient?.Publish(resp); } } }