style: Pint 포맷팅 적용

This commit is contained in:
김보곤
2026-02-25 11:45:01 +09:00
parent 68b1622a4e
commit 9a7c548246
199 changed files with 1420 additions and 1083 deletions

View File

@@ -16,9 +16,9 @@ class FormulaApiService
* - SSL 우회: withoutVerifying() (내부 자체 서명 인증서)
* - 인증: X-API-KEY + Bearer token (ApiTokenService 토큰 교환)
*
* @param string $finishedGoodsCode 완제품 코드 (예: FG-KQTS01)
* @param array $variables 입력 변수 ['W0' => 3000, 'H0' => 3000, 'QTY' => 1]
* @param int $tenantId 테넌트 ID
* @param string $finishedGoodsCode 완제품 코드 (예: FG-KQTS01)
* @param array $variables 입력 변수 ['W0' => 3000, 'H0' => 3000, 'QTY' => 1]
* @param int $tenantId 테넌트 ID
* @return array 성공 시 API 응답, 실패 시 ['success' => false, 'error' => '...']
*/
public function calculateBom(string $finishedGoodsCode, array $variables, int $tenantId): array
@@ -54,6 +54,7 @@ public function calculateBom(string $finishedGoodsCode, array $variables, int $t
if ($response->successful()) {
$json = $response->json();
// ApiResponse::handle()는 {success, message, data} 구조로 래핑
return $json['data'] ?? $json;
}
@@ -66,7 +67,7 @@ public function calculateBom(string $finishedGoodsCode, array $variables, int $t
return [
'success' => false,
'error' => 'API 응답 오류: HTTP ' . $response->status(),
'error' => 'API 응답 오류: HTTP '.$response->status(),
];
} catch (\Exception $e) {
Log::error('FormulaApiService: 예외 발생', [
@@ -76,7 +77,7 @@ public function calculateBom(string $finishedGoodsCode, array $variables, int $t
return [
'success' => false,
'error' => '수식 계산 서버 연결 실패: ' . $e->getMessage(),
'error' => '수식 계산 서버 연결 실패: '.$e->getMessage(),
];
}
}