feat: 수동 품목 단가 조회 API 추가 및 디버그 로그 정리
- QuoteController에 getItemPrices 엔드포인트 추가 - QuoteCalculationService에 품목 코드 배열로 단가 조회 기능 추가 - 불필요한 디버그 로그 제거 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -455,4 +455,34 @@ private function getDefaultInputSchema(?string $productCategory = null): array
|
||||
|
||||
return $commonSchema;
|
||||
}
|
||||
|
||||
/**
|
||||
* 품목 단가 조회
|
||||
*
|
||||
* 품목 코드 배열을 받아 단가를 조회합니다.
|
||||
* FormulaEvaluatorService의 getItemPrice 로직을 활용합니다.
|
||||
*
|
||||
* @param array $itemCodes 품목 코드 배열
|
||||
* @return array 품목별 단가 정보 [item_code => ['unit_price' => number, 'item_name' => string]]
|
||||
*/
|
||||
public function getItemPrices(array $itemCodes): array
|
||||
{
|
||||
$tenantId = $this->tenantId();
|
||||
|
||||
if (! $tenantId) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$result = [];
|
||||
|
||||
foreach ($itemCodes as $itemCode) {
|
||||
$price = $this->formulaEvaluator->getItemPrice($itemCode, $tenantId);
|
||||
$result[$itemCode] = [
|
||||
'item_code' => $itemCode,
|
||||
'unit_price' => $price,
|
||||
];
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user