diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-12-04 12:42:23 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-12-04 12:42:23 +0000 |
| commit | d1f1768611a73541f5d63b6735f64d194466825b (patch) | |
| tree | 44717ee4a692070fd4a9b3dd0922df34358e0598 /lib/bidding/service.ts | |
| parent | e5b36fa6a1b12446883f51fc5e7cd56d8df8d8f5 (diff) | |
(최겸) 구매 입찰 견적 히스토리, 응찰품목조회 table 개발
Diffstat (limited to 'lib/bidding/service.ts')
| -rw-r--r-- | lib/bidding/service.ts | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/lib/bidding/service.ts b/lib/bidding/service.ts index 27dae87d..453989c1 100644 --- a/lib/bidding/service.ts +++ b/lib/bidding/service.ts @@ -41,7 +41,8 @@ import { revalidatePath } from 'next/cache' import { filterColumns } from '@/lib/filter-columns' import { GetBiddingsSchema, CreateBiddingSchema } from './validation' import { saveFile } from '../file-stroage' - +import { getVendorPricesForBidding } from './detail/service' +import { getPrItemsForBidding } from './pre-quote/service' // 사용자 이메일로 사용자 코드 조회 @@ -3906,4 +3907,22 @@ export async function getBiddingsForFailure(input: GetBiddingsSchema) { console.error("Error in getBiddingsForFailure:", err) return { data: [], pageCount: 0, total: 0 } } -}
\ No newline at end of file +} + + +export async function getBiddingSelectionItemsAndPrices(biddingId: number) { + try { + const [prItems, vendorPrices] = await Promise.all([ + getPrItemsForBidding(biddingId), + getVendorPricesForBidding(biddingId) + ]) + + return { + prItems, + vendorPrices + } + } catch (error) { + console.error('Failed to get bidding selection items and prices:', error) + throw error + } +} |
