fix: 해구 조회 바운딩 박스 간소화 #29

병합
htlee develop 에서 main 로 2 commits 를 머지했습니다 2026-02-19 18:54:44 +09:00

파일 보기

@ -103,18 +103,18 @@ public class MonitoringController {
JOIN signal.t_ais_position a
ON a.lat BETWEEN h.min_lat AND h.max_lat
AND a.lon BETWEEN h.min_lon AND h.max_lon
AND public.ST_Contains(h.geom, a.geom)
WHERE a.last_update > NOW() - INTERVAL '30 minutes'
GROUP BY h.haegu_no, h.min_lat, h.min_lon, h.max_lat, h.max_lon,
h.center_lon, h.center_lat, h.geom
h.center_lon, h.center_lat
HAVING COUNT(DISTINCT a.mmsi) > 0
ORDER BY current_vessels DESC
LIMIT 50
""";
try {
long start = System.currentTimeMillis();
List<Map<String, Object>> result = queryJdbcTemplate.queryForList(sql);
log.info("Haegu realtime query returned {} rows", result.size());
log.info("Haegu realtime query: {} rows in {}ms", result.size(), System.currentTimeMillis() - start);
return result;
} catch (Exception e) {
log.error("Failed to get realtime haegu status: {}", e.getMessage(), e);