From a50b7596e8b9486a0125d78cf2be5e3e0da3ebe2 Mon Sep 17 00:00:00 2001 From: WuYongJie <549727955@qq.com> Date: Wed, 9 Sep 2026 10:53:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B0=8F=E9=A2=9D=E6=89=93?= =?UTF-8?q?=E6=AC=BE=E5=B7=A5=E5=8D=95=E5=85=B3=E8=81=94=E6=9C=AA=E5=91=BD?= =?UTF-8?q?=E4=B8=AD=E7=BB=84=E5=90=88=E7=B4=A2=E5=BC=95=20(#135)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Repositories/SmallPaymentWorkOrderMirrorRepository.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/EcommerceFinance/Repositories/SmallPaymentWorkOrderMirrorRepository.php b/modules/EcommerceFinance/Repositories/SmallPaymentWorkOrderMirrorRepository.php index f5b6e80c..27e307ed 100644 --- a/modules/EcommerceFinance/Repositories/SmallPaymentWorkOrderMirrorRepository.php +++ b/modules/EcommerceFinance/Repositories/SmallPaymentWorkOrderMirrorRepository.php @@ -211,6 +211,9 @@ class SmallPaymentWorkOrderMirrorRepository $join->on('work_order_versions.woNo', '=', 'p.woNo'); }) ->join($workOrders . ' AS w', 'w.Id', '=', 'work_order_versions.Id') + // Match the leading columns of (woTypeId, woNo, Id), rather than + // rescanning all orders of this type for every payment-map row. + ->whereColumn('w.woNo', 'p.woNo') ->where('p.woTypeId', self::SMALL_PAYMENT_WORK_TYPE_ID) ->where('w.woTypeId', self::SMALL_PAYMENT_WORK_TYPE_ID); }