From 0965e6c68e5b2f7e408ef19ea1989bb8022a14c9 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 19 Oct 2023 14:03:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BB=BB=E5=8A=A1=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E5=8F=AA=E6=98=AF=E7=94=A8create?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/pm/services.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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,