fix: 尝试修改信号量计算测点
This commit is contained in:
parent
d73cc1af5b
commit
cb1576b797
|
@ -177,14 +177,6 @@ class MpointCache:
|
|||
save_dict[f"val_{current_cache_val['val_type']}"] = last_val
|
||||
MpLogx.objects.create(**save_dict)
|
||||
|
||||
mf_code = current_cache_val.get('mpoint_affect')
|
||||
if mf_code: # 如果该测点影响到另一个测点,要同步更新另一个测点
|
||||
mc = MpointCache(mf_code)
|
||||
mf_data = mc.data
|
||||
# 只有自采测点才可影响计算测点只针对开关信号
|
||||
if mf_data and current_cache_val['type'] == Mpoint.MT_AUTO and mf_data['type'] == Mpoint.MT_COMPUTE and mf_data['is_rep_ep_running_state'] and mf_data['ep_rs_expr']:
|
||||
mc.set(last_timex, None)
|
||||
|
||||
# 下面开始更新设备信号
|
||||
ep_belong_id = current_cache_val.get("ep_belong")
|
||||
ep_monitored_id = current_cache_val.get("ep_monitored")
|
||||
|
@ -194,6 +186,15 @@ class MpointCache:
|
|||
if ep_monitored_id and mpoint_is_rep_ep_running_state:
|
||||
set_eq_rs(ep_monitored_id, last_timex, last_mrs)
|
||||
|
||||
mf_code = current_cache_val.get('mpoint_affect')
|
||||
if mf_code: # 如果该测点影响到另一个测点,要同步更新另一个测点
|
||||
mc = MpointCache(mf_code)
|
||||
mf_data = mc.data
|
||||
# 只有自采测点才可影响计算测点只针对开关信号
|
||||
if mf_data and current_cache_val['type'] == Mpoint.MT_AUTO and mf_data['type'] == Mpoint.MT_COMPUTE and mf_data['is_rep_ep_running_state'] and mf_data['ep_rs_expr']:
|
||||
mc.set(last_timex, None)
|
||||
|
||||
|
||||
def king_sync(projectName: str, json_path: str = ""):
|
||||
"""
|
||||
同步亚控测点
|
||||
|
|
Loading…
Reference in New Issue