diff --git a/apps/enm/services.py b/apps/enm/services.py index 86fdff79..3cf70b66 100644 --- a/apps/enm/services.py +++ b/apps/enm/services.py @@ -185,7 +185,14 @@ class MpointCache: last_data = current_cache_val["last_data"] if isinstance(last_val, (int, float)): last_val = last_val*current_cache_val.get('coefficient', 1.0) - last_data["last_val"] = last_val + if (last_val == 0 and + current_cache_val.get("type", 0) == 10 and + current_cache_val.get('is_rep_ep_running_state', None) is False and + get_sysconfig('enm.use_cache_when_w_el_0', False) is True and + current_cache_val.get("material_name", "") in ["动力电", "工业水"]): # 如果电表断电 + pass + else: + last_data["last_val"] = last_val last_data["last_timex"] = last_timex last_mrs = None # 设备状态信号 mpoint_is_rep_ep_running_state = current_cache_val["is_rep_ep_running_state"]