From bf16762dab50f12fd28dfebf18069a4c75430c93 Mon Sep 17 00:00:00 2001 From: htlee Date: Sun, 1 Mar 2026 01:30:10 +0900 Subject: [PATCH] =?UTF-8?q?fix(prediction):=20=EB=B6=84=EC=84=9D=20?= =?UTF-8?q?=EC=83=81=EC=84=B8=20=EC=A1=B0=ED=9A=8C=20500=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ACDNT_WEATHER 테이블의 실제 컬럼명에 맞게 weather 쿼리 수정 (WEATHER_DTM→OBS_DTM, WIND_SPD→WIND 등 존재하지 않는 컬럼 참조 제거) Co-Authored-By: Claude Opus 4.6 --- backend/src/prediction/predictionService.ts | 50 +++++++++++-------- .../tabs/prediction/services/predictionApi.ts | 16 +++--- 2 files changed, 37 insertions(+), 29 deletions(-) diff --git a/backend/src/prediction/predictionService.ts b/backend/src/prediction/predictionService.ts index b076730..e46afd3 100644 --- a/backend/src/prediction/predictionService.ts +++ b/backend/src/prediction/predictionService.ts @@ -54,13 +54,15 @@ interface PredictionDetail { insuranceData: unknown; }>; weather: Array<{ - weatherDtm: string; - windSpd: number | null; - windDir: string | null; - waveHgt: number | null; - currentSpd: number | null; - currentDir: string | null; - temp: number | null; + obsDtm: string; + locNm: string; + temp: string; + weatherDc: string; + wind: string; + wave: string; + humid: string; + vis: string; + sst: string; }>; } @@ -244,16 +246,18 @@ export async function getAnalysisDetail(acdntSn: number): Promise) => ({ - weatherDtm: String(w['weather_dtm'] ?? ''), - windSpd: w['wind_spd'] != null ? parseFloat(String(w['wind_spd'])) : null, - windDir: w['wind_dir'] != null ? String(w['wind_dir']) : null, - waveHgt: w['wave_hgt'] != null ? parseFloat(String(w['wave_hgt'])) : null, - currentSpd: w['current_spd'] != null ? parseFloat(String(w['current_spd'])) : null, - currentDir: w['current_dir'] != null ? String(w['current_dir']) : null, - temp: w['temp'] != null ? parseFloat(String(w['temp'])) : null, + obsDtm: w['obs_dtm'] ? String(w['obs_dtm']) : '', + locNm: String(w['loc_nm'] ?? ''), + temp: String(w['temp'] ?? ''), + weatherDc: String(w['weather_dc'] ?? ''), + wind: String(w['wind'] ?? ''), + wave: String(w['wave'] ?? ''), + humid: String(w['humid'] ?? ''), + vis: String(w['vis'] ?? ''), + sst: String(w['sst'] ?? ''), })); return { diff --git a/frontend/src/tabs/prediction/services/predictionApi.ts b/frontend/src/tabs/prediction/services/predictionApi.ts index 53b4651..fcd0d65 100644 --- a/frontend/src/tabs/prediction/services/predictionApi.ts +++ b/frontend/src/tabs/prediction/services/predictionApi.ts @@ -54,13 +54,15 @@ export interface PredictionDetail { insuranceData: unknown; }>; weather: Array<{ - weatherDtm: string; - windSpd: number | null; - windDir: string | null; - waveHgt: number | null; - currentSpd: number | null; - currentDir: string | null; - temp: number | null; + obsDtm: string; + locNm: string; + temp: string; + weatherDc: string; + wind: string; + wave: string; + humid: string; + vis: string; + sst: string; }>; }