feat: 添加工时字段

This commit is contained in:
caoqianming 2024-06-21 14:31:31 +08:00
parent 5efd9888dd
commit 2bb860f8dd
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 3.2.12 on 2024-06-21 06:31
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mtm', '0029_auto_20240528_1428'),
]
operations = [
migrations.AddField(
model_name='route',
name='hour_work',
field=models.FloatField(blank=True, null=True, verbose_name='工时'),
),
]

View File

@ -182,6 +182,7 @@ class Route(CommonADModel):
Material, verbose_name='主要输出物料', on_delete=models.CASCADE, related_name='route_material_out', null=True, blank=True)
is_count_utask = models.BooleanField('是否主任务统计', default=False)
out_rate = models.FloatField('出材率', default=100, blank=True)
hour_work = models.FloatField('工时', null=True, blank=True)
@staticmethod
def get_routes(material: Material, autotask: bool = False):