feat: mpoint增加is_rep_ep0_running_state字段
This commit is contained in:
parent
41b27c0113
commit
c79cc14f46
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 3.2.12 on 2024-12-11 09:36
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('enm', '0049_enstat_ammonia_consume'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='mpoint',
|
||||
name='is_rep_ep0_running_state',
|
||||
field=models.BooleanField(default=False, verbose_name='是否表示所属设备运行状态'),
|
||||
),
|
||||
]
|
|
@ -223,9 +223,10 @@ class MpointCache:
|
|||
# 下面开始更新设备信号
|
||||
ep_belong_id = current_cache_val.get("ep_belong")
|
||||
ep_monitored_id = current_cache_val.get("ep_monitored")
|
||||
mpoint_is_rep_ep0_running_state = current_cache_val.get("is_rep_ep0_running_state", False)
|
||||
if ep_monitored_id and mpoint_is_rep_ep_running_state and ep_belong_id != ep_monitored_id:
|
||||
set_eq_rs(ep_monitored_id, last_timex, last_mrs)
|
||||
if ep_belong_id:
|
||||
if ep_belong_id and mpoint_is_rep_ep0_running_state:
|
||||
set_eq_rs(ep_belong_id, last_timex, Equipment.RUNING)
|
||||
|
||||
mf_code = current_cache_val.get("mpoint_affect")
|
||||
|
|
|
@ -118,6 +118,7 @@ class Mgroup(CommonBModel):
|
|||
"""
|
||||
|
||||
name = models.CharField('名称', max_length=50)
|
||||
# code = models.CharField('标识', max_length=50, null=True, blank=True)
|
||||
cate = models.CharField(
|
||||
'分类', max_length=50, default='section', help_text='section/other') # section是工段
|
||||
shift_rule = models.CharField('班次规则', max_length=10, default='默认')
|
||||
|
|
Loading…
Reference in New Issue