Merge branch 'master' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory
This commit is contained in:
commit
efd40d1d32
|
@ -167,11 +167,11 @@ def get_first_stlog_time_from_duration(mgroup:Mgroup, dt_start:datetime, dt_end:
|
||||||
if st:
|
if st:
|
||||||
|
|
||||||
return st, "ending"
|
return st, "ending"
|
||||||
st = st_qs.filter(start_time__gte=dt_start, start_time__lte=dt_end, duration_sec__lte=600).order_by("start_time").last()
|
st = st_qs.filter(start_time__gte=dt_start, start_time__lte=dt_end, duration_sec__gte=600).order_by("start_time").last()
|
||||||
if st:
|
if st:
|
||||||
|
|
||||||
return st, "start"
|
return st, "start"
|
||||||
st = st_qs.filter(end_time__gte=dt_start, end_time__lte=dt_end, duration_sec__lte=600).order_by("end_time").first()
|
st = st_qs.filter(end_time__gte=dt_start, end_time__lte=dt_end, duration_sec__gte=600).order_by("end_time").first()
|
||||||
if st:
|
if st:
|
||||||
|
|
||||||
return st, "end"
|
return st, "end"
|
||||||
|
@ -213,7 +213,7 @@ def cal_mpointstat_hour(mpointId: str, year: int, month: int, day: int, hour: in
|
||||||
val = abs(first_val - last_val)
|
val = abs(first_val - last_val)
|
||||||
else:
|
else:
|
||||||
xtype = "normal"
|
xtype = "normal"
|
||||||
if mpointfrom and mpoint.cal_related_mgroup_running == 10:
|
if mpointfrom and mpoint.cal_related_mgroup_running == 20:
|
||||||
|
|
||||||
stlog, xtype = get_first_stlog_time_from_duration(mpoint.mgroup, dt, dt_hour_n)
|
stlog, xtype = get_first_stlog_time_from_duration(mpoint.mgroup, dt, dt_hour_n)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
# Generated by Django 3.2.12 on 2025-10-10 08:31
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('ofm', '0016_auto_20250929_1551'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='publicity',
|
||||||
|
name='secret_period',
|
||||||
|
field=models.CharField(blank=True, max_length=50, null=True, verbose_name='秘密期限'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='publicity',
|
||||||
|
name='level',
|
||||||
|
field=models.JSONField(default=list, help_text=['重要', '一般', '非涉密'], verbose_name='涉密等级'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -0,0 +1,33 @@
|
||||||
|
# Generated by Django 3.2.12 on 2025-10-11 01:22
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('ofm', '0017_auto_20251010_1631'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='publicity',
|
||||||
|
name='dept_opinion',
|
||||||
|
field=models.JSONField(blank=True, default=list, help_text=['同意', '不同意'], null=True, verbose_name='部门负责人意见'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='publicity',
|
||||||
|
name='number',
|
||||||
|
field=models.CharField(blank=True, max_length=50, null=True, verbose_name='记录编号'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='publicity',
|
||||||
|
name='publicity_opinion',
|
||||||
|
field=models.JSONField(blank=True, default=list, help_text=['同意公开宣传报道', '不同意任何渠道的宣传报道'], null=True, verbose_name='宣传统战部审查意见'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='publicity',
|
||||||
|
name='review',
|
||||||
|
field=models.JSONField(blank=True, default=list, help_text=['内容不涉及国家秘密和商业秘密,申请公开', '内容涉及国家秘密,申请按涉密渠道发布'], null=True, verbose_name='第一撰稿人自审'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -122,12 +122,12 @@ class BorrowRecord(CommonBDModel):
|
||||||
|
|
||||||
class Publicity(CommonBDModel):
|
class Publicity(CommonBDModel):
|
||||||
"""TN: 公示栏"""
|
"""TN: 公示栏"""
|
||||||
number = models.CharField('记录编号', max_length=50)
|
number = models.CharField('记录编号', max_length=50, blank=True, null=True)
|
||||||
title = models.CharField('送审稿件标题', max_length=100)
|
title = models.CharField('送审稿件标题', max_length=100)
|
||||||
participants = models.CharField('所有撰稿人', max_length=50)
|
participants = models.CharField('所有撰稿人', max_length=50)
|
||||||
pub_dept = models.CharField('部室/研究院', null=True, blank=True, max_length=50)
|
pub_dept = models.CharField('部室/研究院', null=True, blank=True, max_length=50)
|
||||||
pfile = models.CharField('稿件路径', null=True, blank=True, max_length=100)
|
pfile = models.CharField('稿件路径', null=True, blank=True, max_length=100)
|
||||||
level = models.JSONField('用途', default=list, help_text=['重要', '一般', '非涉密'])
|
level = models.JSONField('涉密等级', default=list, help_text=['重要', '一般', '非涉密'])
|
||||||
content = models.JSONField('稿件内容涉及', default=list, help_text=[
|
content = models.JSONField('稿件内容涉及', default=list, help_text=[
|
||||||
"武器装备科研生产综合事项",
|
"武器装备科研生产综合事项",
|
||||||
"其它"
|
"其它"
|
||||||
|
@ -137,10 +137,11 @@ class Publicity(CommonBDModel):
|
||||||
channel = models.JSONField('发布渠道', default=list, help_text=['互联网', '信息平台', '官微', '公开发行物', '其它'])
|
channel = models.JSONField('发布渠道', default=list, help_text=['互联网', '信息平台', '官微', '公开发行物', '其它'])
|
||||||
other_channel = models.CharField('其它渠道', max_length=50, blank=True, null=True)
|
other_channel = models.CharField('其它渠道', max_length=50, blank=True, null=True)
|
||||||
report_name = models.CharField('报道名称', max_length=50, blank=True, null=True)
|
report_name = models.CharField('报道名称', max_length=50, blank=True, null=True)
|
||||||
review = models.JSONField('第一撰稿人自审', default=list, help_text=['内容不涉及国家秘密和商业秘密,申请公开', '内容涉及国家秘密,申请按涉密渠道发布'])
|
review = models.JSONField('第一撰稿人自审', default=list, help_text=['内容不涉及国家秘密和商业秘密,申请公开', '内容涉及国家秘密,申请按涉密渠道发布'], null=True, blank=True)
|
||||||
dept_opinion = models.JSONField('部门负责人意见', default=list, help_text=['同意', '不同意'])
|
dept_opinion = models.JSONField('部门负责人意见', default=list, help_text=['同意', '不同意'], null=True, blank=True)
|
||||||
|
secret_period = models.CharField('秘密期限', max_length=50, blank=True, null=True)
|
||||||
dept_opinion_review = models.CharField('部门审查意见', max_length=100, blank=True, null=True)
|
dept_opinion_review = models.CharField('部门审查意见', max_length=100, blank=True, null=True)
|
||||||
publicity_opinion = models.JSONField('宣传统战部审查意见', default=list, help_text=['同意公开宣传报道', '不同意任何渠道的宣传报道'])
|
publicity_opinion = models.JSONField('宣传统战部审查意见', default=list, help_text=['同意公开宣传报道', '不同意任何渠道的宣传报道'], null=True, blank=True)
|
||||||
ticket = models.ForeignKey('wf.ticket', verbose_name='关联工单',
|
ticket = models.ForeignKey('wf.ticket', verbose_name='关联工单',
|
||||||
on_delete=models.SET_NULL, related_name='publicity_ticket', null=True, blank=True, db_constraint=False)
|
on_delete=models.SET_NULL, related_name='publicity_ticket', null=True, blank=True, db_constraint=False)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue