Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_server
This commit is contained in:
commit
3976e3834e
|
@ -15,6 +15,7 @@ from server.settings import get_sysconfig
|
||||||
from apps.enm.models import EnStat
|
from apps.enm.models import EnStat
|
||||||
from django.db.models import Sum
|
from django.db.models import Sum
|
||||||
from typing import Dict, Any
|
from typing import Dict, Any
|
||||||
|
from decimal import Decimal
|
||||||
|
|
||||||
myLogger = logging.getLogger("log")
|
myLogger = logging.getLogger("log")
|
||||||
|
|
||||||
|
@ -176,7 +177,10 @@ class MpointCache:
|
||||||
current_cache_val = self.data
|
current_cache_val = self.data
|
||||||
cache_key = self.cache_key
|
cache_key = self.cache_key
|
||||||
last_data = current_cache_val["last_data"]
|
last_data = current_cache_val["last_data"]
|
||||||
last_data["last_val"] = last_val*current_cache_val.get('coefficient', 1)
|
if last_val:
|
||||||
|
last_data["last_val"] = last_val*current_cache_val.get('coefficient', 1.0)
|
||||||
|
else:
|
||||||
|
last_data["last_val"] = last_val
|
||||||
last_data["last_timex"] = last_timex
|
last_data["last_timex"] = last_timex
|
||||||
last_mrs = None # 设备状态信号
|
last_mrs = None # 设备状态信号
|
||||||
mpoint_is_rep_ep_running_state = current_cache_val["is_rep_ep_running_state"]
|
mpoint_is_rep_ep_running_state = current_cache_val["is_rep_ep_running_state"]
|
||||||
|
|
Loading…
Reference in New Issue