feat: 增加cal_coefficient_method 字段

This commit is contained in:
caoqianming 2024-12-25 15:09:03 +08:00
parent aae5c909c5
commit 4b5308b0cc
2 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,23 @@
# Generated by Django 3.2.12 on 2024-12-25 07:08
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('enm', '0052_auto_20241225_1405'),
]
operations = [
migrations.AddField(
model_name='mpoint',
name='cal_coefficient_method',
field=models.PositiveSmallIntegerField(choices=[(1, ''), (2, '')], default=1, verbose_name='计算系数方法'),
),
migrations.AddField(
model_name='mpoint',
name='cal_coefficient_name',
field=models.CharField(blank=True, max_length=50, null=True, verbose_name='计算系数名称'),
),
]

View File

@ -52,8 +52,10 @@ class Mpoint(CommonBModel):
report_sortstr = models.CharField('在报告中的排序', max_length=50, default='', blank=True)
coefficient = models.FloatField("采集系数", default=1.0)
need_change_cal_coefficient = models.BooleanField("是否需要变更计算系数", default=False)
cal_coefficient_name = models.CharField("计算系数名称", max_length=50, null=True, blank=True)
cal_coefficient_method = models.PositiveSmallIntegerField("计算系数方法", default=1, choices=((1, ""), (2, "")))
cal_coefficient = models.FloatField("计算系数", null=True, blank=True)
@classmethod