diff --git a/apps/pm/services.py b/apps/pm/services.py index 057f228c..840e0841 100644 --- a/apps/pm/services.py +++ b/apps/pm/services.py @@ -82,8 +82,8 @@ class PmService: queue.append(input_material_id) - # 返回各Route的任务数量/默认使用target_quantity - return {route.id: step_production.get(route.id, target_quantity) for route in route_qs} + # 返回各Route的任务数量/默认在输入物料时使用target_quantity + return {route.id: step_production.get(route.id, target_quantity if route.material_in.id == target_materialId else 0) for route in route_qs} @classmethod def cal_real_task_count(cls, count: int, rate_list):