From a845f52fc064460b9c8db969163950a664e7cbc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Fri, 6 Mar 2026 09:25:00 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[=EC=83=9D=EC=82=B0=EC=A7=80=EC=8B=9C]?= =?UTF-8?q?=20withCount=EC=97=90=EC=84=9C=EB=8F=84=20=EB=B3=B4=EC=A1=B0=20?= =?UTF-8?q?=EA=B3=B5=EC=A0=95(=EC=9E=AC=EA=B3=A0=EC=83=9D=EC=82=B0)=20WO?= =?UTF-8?q?=20=EC=A0=9C=EC=99=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 목록 조회 시 work_orders_count에서 is_auxiliary WO 제외 - whereNotNull(process_id) + options->is_auxiliary 조건 추가 Co-Authored-By: Claude Opus 4.6 --- app/Services/ProductionOrderService.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Services/ProductionOrderService.php b/app/Services/ProductionOrderService.php index a4889de..638ca00 100644 --- a/app/Services/ProductionOrderService.php +++ b/app/Services/ProductionOrderService.php @@ -30,7 +30,9 @@ public function index(array $params): LengthAwarePaginator ->whereIn('status_code', self::PRODUCTION_STATUSES) ->with(['client', 'workOrders.process', 'workOrders.assignees.user']) ->withCount([ - 'workOrders' => fn ($q) => $q->whereNotNull('process_id'), + 'workOrders' => fn ($q) => $q->whereNotNull('process_id') + ->where(fn ($q2) => $q2->whereNull('options->is_auxiliary') + ->orWhere('options->is_auxiliary', false)), 'nodes', ]);