Merge pull request 'fix: 해구 조회 바운딩 박스 간소화' (#29) from develop into main
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 2m36s
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 2m36s
This commit is contained in:
커밋
ec20dc8e76
@ -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);
|
||||
|
||||
불러오는 중...
Reference in New Issue
Block a user