diff --git a/apps/pm/services.py b/apps/pm/services.py index 1bc6a484..f5d11499 100644 --- a/apps/pm/services.py +++ b/apps/pm/services.py @@ -86,7 +86,6 @@ class PmService: count / (val.out_rate/100)) else: task_count = math.ceil(count / val.out_rate) - print(halfgood) fmtask = Mtask.objects.create(**{ 'number': f'{product.number}_{start_date_str}_r{ind+1}', 'material_out': halfgood, @@ -102,7 +101,7 @@ class PmService: if rela_days > 1: for i in range(rela_days): task_date = start_date + timedelta(days=i) - Mtask.objects.get_or_create(mgroup=mgroup, material_out=halfgood, parent=fmtask, start_date=task_date, defaults={ + Mtask.objects.create(**{ 'number': f'{fmtask.number}_{i+1}', 'material_out': halfgood, 'material_in': material_in,