diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-03-26 07:21:00 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-03-26 07:21:00 +0000 |
| commit | 7de6735ab5196deb55eb01725e32103af52c59fe (patch) | |
| tree | 8084e981aa0b1e43762565bf256479baf7f2539b | |
| parent | 6f4110be95c83b18e223c8d662d68c675364c74e (diff) | |
fix: budgetary rfq에서 해당 아이템 가진 벤더 조회 안되는 문제
| -rw-r--r-- | lib/rfqs/service.ts | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/rfqs/service.ts b/lib/rfqs/service.ts index 6e40f0f1..a182af49 100644 --- a/lib/rfqs/service.ts +++ b/lib/rfqs/service.ts @@ -598,8 +598,6 @@ export async function getMatchedVendors(input: GetMatchedVendorsSchema, rfqId: n return { data: [], pageCount: 0 } } - console.log(vendorIdList, "vendorIdList") - // ───────────────────────────────────────────────────── // 3) 필터/검색/정렬 // ───────────────────────────────────────────────────── @@ -627,12 +625,20 @@ export async function getMatchedVendors(input: GetMatchedVendorsSchema, rfqId: n ) } + // console.log("itemRows: ", itemRows) + // console.log("vendorIdList: ",vendorIdList) + // console.log("globalWhere: ",globalWhere) + // console.log("vendorRfqView.vendorId: ",vendorRfqView.vendorId) + // console.log("condition1: ",inArray(vendorRfqView.vendorId, vendorIdList)) + // console.log("condition2: ",eq(vendorRfqView.rfqId, rfqId)) + // console.log("finalWhere: ",finalWhere) + // (다) 최종 where // vendorId가 vendorIdList 내에 있어야 하고, // 특정 rfqId(뷰에 담긴 값)도 일치해야 함. const finalWhere = and( inArray(vendorRfqView.vendorId, vendorIdList), - eq(vendorRfqView.rfqId, rfqId), + // eq(vendorRfqView.rfqId, rfqId), advancedWhere, globalWhere ) |
