调整代码
This commit is contained in:
parent
94ff58dd12
commit
483590534a
@ -87,7 +87,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
string deviceKey= $"{code}:{pn}";
|
||||
return await _imemoryCache.GetOrCreateAsync(deviceKey, async entry =>
|
||||
{
|
||||
List<DeviceInfo> devices= await Instance.HGetAsync<List<DeviceInfo>>(redisCacheDeviceInfoHashKey, code);
|
||||
List<DeviceInfo> devices= await Instance.HGetAsync<List<DeviceInfo>>(redisCacheDeviceInfoHashKey, code) ?? new List<DeviceInfo>();
|
||||
var data = devices.Where(s => s.MeteringCode == pn).FirstOrDefault();
|
||||
if (data != null)
|
||||
entry.SetSlidingExpiration(TimeSpan.FromMinutes(5));
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link href="libs/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
|
||||
<title>后端服务</title>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user