feat: 어구 연관성 멀티모델 + deck.gl 리플레이 전환 #207
@ -61,11 +61,17 @@ public class GroupPolygonService {
|
||||
private static final String GROUP_CORRELATIONS_SQL = """
|
||||
SELECT s.target_mmsi, s.target_type, s.target_name,
|
||||
s.current_score, s.streak_count, s.observation_count,
|
||||
s.freeze_state,
|
||||
s.proximity_ratio, s.visit_score, s.heading_coherence,
|
||||
s.freeze_state, s.shadow_bonus_total,
|
||||
r.proximity_ratio, r.visit_score, r.heading_coherence,
|
||||
m.id AS model_id, m.name AS model_name, m.is_default
|
||||
FROM kcg.gear_correlation_scores s
|
||||
JOIN kcg.correlation_param_models m ON s.model_id = m.id
|
||||
LEFT JOIN LATERAL (
|
||||
SELECT proximity_ratio, visit_score, heading_coherence
|
||||
FROM kcg.gear_correlation_raw_metrics
|
||||
WHERE group_key = s.group_key AND target_mmsi = s.target_mmsi
|
||||
ORDER BY observed_at DESC LIMIT 1
|
||||
) r ON TRUE
|
||||
WHERE s.group_key = ? AND s.current_score >= ? AND m.is_active = TRUE
|
||||
ORDER BY m.is_default DESC, s.current_score DESC
|
||||
""";
|
||||
@ -107,6 +113,7 @@ public class GroupPolygonService {
|
||||
row.put("streak", rs.getInt("streak_count"));
|
||||
row.put("observations", rs.getInt("observation_count"));
|
||||
row.put("freezeState", rs.getString("freeze_state"));
|
||||
row.put("shadowBonus", rs.getDouble("shadow_bonus_total"));
|
||||
row.put("proximityRatio", rs.getObject("proximity_ratio"));
|
||||
row.put("visitScore", rs.getObject("visit_score"));
|
||||
row.put("headingCoherence", rs.getObject("heading_coherence"));
|
||||
|
||||
불러오는 중...
Reference in New Issue
Block a user