diff options
Diffstat (limited to 'lib/bidding/detail/service.ts')
| -rw-r--r-- | lib/bidding/detail/service.ts | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/bidding/detail/service.ts b/lib/bidding/detail/service.ts index 4ef48d33..99591e3b 100644 --- a/lib/bidding/detail/service.ts +++ b/lib/bidding/detail/service.ts @@ -298,7 +298,20 @@ export async function getAllBiddingCompanies(biddingId: number) { } // prItemsForBidding 테이블에서 품목 정보 조회 (deprecated - import from pre-quote/service) -// export async function getPRItemsForBidding(biddingId: number) { ... } +export async function getPRItemsForBidding(biddingId: number) { + try { + const items = await db + .select() + .from(prItemsForBidding) + .where(eq(prItemsForBidding.biddingId, biddingId)) + .orderBy(prItemsForBidding.id) + + return items + } catch (error) { + console.error('Failed to get PR items for bidding:', error) + return [] + } +} // 견적 시스템에서 협력업체 정보를 가져오는 함수 (Deprecated - integrated into getBiddingDetailData) // export async function getQuotationVendors(biddingId: number): Promise<QuotationVendor[]> { ... } |
