|
@@ -353,6 +353,18 @@ public class GasCommonController {
|
|
|
return AjaxResult.success(toMapList(cacheMap, areaLatitude1, areaLatitude2, areaLongitude1, areaLongitude2));
|
|
|
}
|
|
|
|
|
|
+ @GetMapping("/queryCurrentShip")
|
|
|
+ @ApiOperation("获取某个船的实时位置")
|
|
|
+ public AjaxResult queryCurrentShip(@RequestParam String mmsi) {
|
|
|
+ Object cacheMapValue = redisCache.getCacheMapValue("ais:ship", mmsi);
|
|
|
+ if (cacheMapValue == null) {
|
|
|
+ return AjaxResult.error("目前无法定位到该船舶位置!");
|
|
|
+ }
|
|
|
+ cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(cacheMapValue);
|
|
|
+ Object result = jsonObject.getBigDecimal("lng") + "," + jsonObject.getBigDecimal("lat");
|
|
|
+ return AjaxResult.success(result);
|
|
|
+ }
|
|
|
+
|
|
|
@GetMapping("/queryShipMonitorInfo")
|
|
|
@ApiOperation("获取船舶监测数据")
|
|
|
public AjaxResult queryShipMonitorInfo(@RequestParam String mmsi) {
|