修复小额打款工单关联未命中组合索引 (#135)
This commit is contained in:
parent
46107e196f
commit
a50b7596e8
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user