|
@@ -1,5 +1,6 @@
|
|
|
package com.shanghaichengdi.ghjgitem.controller;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.shanghaichengdi.ghjgitem.constant.HttpStatus;
|
|
|
import com.shanghaichengdi.ghjgitem.exception.EnumException;
|
|
@@ -52,6 +53,25 @@ public class BoatController extends CommonController {
|
|
|
return ReturnMsg.success("获取成功", encodedData);
|
|
|
}
|
|
|
|
|
|
+ @PostMapping("/getAisRealTimePoint")
|
|
|
+ public ReturnMsg getAisRealTimePoint(@RequestBody @Validated ObjectBodyVo vo) throws ParseException {
|
|
|
+ if (!checkDbKey(vo.getKey())) {
|
|
|
+ return ReturnMsg.error(HttpStatus.BAD_REQUEST, "key值有误,请确认您输入的key值正确!");
|
|
|
+ }
|
|
|
+ String paramJsonData = getParamJsonData(vo.getData());
|
|
|
+ JSONArray mmsiList = JSONArray.parseArray(paramJsonData);
|
|
|
+ if(mmsiList.size()>100){
|
|
|
+ throw new EnumException("查询条数不得超过100");
|
|
|
+ }
|
|
|
+ List<BoatAISVo> boatAISVoList = commonService.selectAisRealTimePointList(mmsiList);
|
|
|
+ ResultRes resultRes = ResultRes.encapsulationResult( boatAISVoList);
|
|
|
+ String jsonString = JSONObject.toJSONString(resultRes);
|
|
|
+ String encodedData = resultEncode(jsonString);
|
|
|
+ return ReturnMsg.success("获取成功", encodedData);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
@PostMapping("/getInfoList")
|
|
|
public ReturnMsg getInfoList(@RequestBody @Validated ObjectBodyVo vo) {
|