diff --git a/protocols/JiShe.CollectBus.Protocol.T37612012/AnalysisData/DataStorage.cs b/protocols/JiShe.CollectBus.Protocol.T37612012/AnalysisData/DataStorage.cs index ad07327..4b20366 100644 --- a/protocols/JiShe.CollectBus.Protocol.T37612012/AnalysisData/DataStorage.cs +++ b/protocols/JiShe.CollectBus.Protocol.T37612012/AnalysisData/DataStorage.cs @@ -87,7 +87,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData string deviceKey= $"{code}:{pn}"; return await _imemoryCache.GetOrCreateAsync(deviceKey, async entry => { - List devices= await Instance.HGetAsync>(redisCacheDeviceInfoHashKey, code); + List devices= await Instance.HGetAsync>(redisCacheDeviceInfoHashKey, code) ?? new List(); var data = devices.Where(s => s.MeteringCode == pn).FirstOrDefault(); if (data != null) entry.SetSlidingExpiration(TimeSpan.FromMinutes(5)); diff --git a/services/JiShe.CollectBus.Application/ScheduledMeterReading/EnergySystemScheduledMeterReadingService.cs b/services/JiShe.CollectBus.Application/ScheduledMeterReading/EnergySystemScheduledMeterReadingService.cs index 0521dca..963bbea 100644 --- a/services/JiShe.CollectBus.Application/ScheduledMeterReading/EnergySystemScheduledMeterReadingService.cs +++ b/services/JiShe.CollectBus.Application/ScheduledMeterReading/EnergySystemScheduledMeterReadingService.cs @@ -292,6 +292,50 @@ namespace JiShe.CollectBus.ScheduledMeterReading EachDayWithout = "周六,周日", TimeDensity = 15, }); + settingInfos.Add(new AmmeterAutoValveControlSetting() + { + MeterType = MeterTypeEnum.Ammeter, + AmmerterAddress = "442405000039", + FocusAddress = "442400039", + FocusId = 69280, + ProjectID = 1, + TripType = "off", + TripTime = $"{DateTime.Now:HH:mm}", + MeterId = 95594, + LoopType = "EachDay", + EachDayWithout = "周六,周日", + TimeDensity = 15, + }); + + settingInfos.Add(new AmmeterAutoValveControlSetting() + { + MeterType = MeterTypeEnum.Ammeter, + AmmerterAddress = "321410010270", + FocusAddress = "322011149", + FocusId = 333333, + ProjectID = 1, + TripType = "on", + TripTime = $"{DateTime.Now:HH:mm}", + MeterId = 333333, + LoopType = "EachDay", + EachDayWithout = "周六,周日", + TimeDensity = 15, + }); + + settingInfos.Add(new AmmeterAutoValveControlSetting() + { + MeterType = MeterTypeEnum.Ammeter, + AmmerterAddress = "112410027787", + FocusAddress = "322011149", + FocusId = 222222, + ProjectID = 1, + TripType = "on", + TripTime = $"{DateTime.Now:HH:mm}", + MeterId = 222222, + LoopType = "EachDay", + EachDayWithout = "周六,周日", + TimeDensity = 15, + }); #else //获取电表阀控配置 var settingInfos = await GetAmmeterAutoValveControlSetting(currentTimeStr); @@ -302,7 +346,7 @@ namespace JiShe.CollectBus.ScheduledMeterReading } #endif - + //设备hash缓存key string redisCacheDeviceInfoHashKey = $"{string.Format(RedisConst.CacheDeviceInfoHashKey, SystemType, ServerTagName)}"; diff --git a/web/JiShe.CollectBus.Host/Pages/Monitor.cshtml b/web/JiShe.CollectBus.Host/Pages/Monitor.cshtml index 8674d67..ae74593 100644 --- a/web/JiShe.CollectBus.Host/Pages/Monitor.cshtml +++ b/web/JiShe.CollectBus.Host/Pages/Monitor.cshtml @@ -16,6 +16,7 @@ 后端服务 +