|
@@ -51,10 +51,11 @@ public class AisInfoServiceImpl implements IAisInfoService {
|
|
|
params.put("startTime", startTime);
|
|
|
params.put("endTime", endTime);
|
|
|
params.put("mmsi", mmsi);
|
|
|
- params.put("shipId", shipId);
|
|
|
- params.put("shipNameCn", shipNameCn);
|
|
|
+// params.put("shipId", shipId);
|
|
|
+// params.put("shipNameCn", shipNameCn);
|
|
|
try {
|
|
|
- String getResult = HttpUtil.get(shipEepReportRecInfoUrl, params);
|
|
|
+ String getResult = HttpUtil.get(shipEepReportRecInfoUrl + "?" + HttpUtil.toParams(params));
|
|
|
+ log.info("获取进出港数据:{}", getResult);
|
|
|
JSONObject jsonObject = JSON.parseObject(getResult);
|
|
|
if (jsonObject != null && 200 == jsonObject.getInteger("code")) {
|
|
|
JSONArray result = jsonObject.getJSONArray("result");
|
|
@@ -73,14 +74,17 @@ public class AisInfoServiceImpl implements IAisInfoService {
|
|
|
|
|
|
@Override
|
|
|
public AisShipInfo getShipInfo(String shipnameCn, String mmsi, String shipId, String shipNo) {
|
|
|
+ log.info("当前环境:{}", profile);
|
|
|
if ("prod".equals(profile)) {
|
|
|
Map<String, Object> params = new HashMap<>();
|
|
|
- params.put("shipnameCn", shipnameCn);
|
|
|
+// params.put("shipnameCn", shipnameCn);
|
|
|
params.put("mmsi", mmsi);
|
|
|
- params.put("shipId", shipId);
|
|
|
- params.put("shipNo", shipNo);
|
|
|
+// params.put("shipId", shipId);
|
|
|
+// params.put("shipNo", shipNo);
|
|
|
try {
|
|
|
- String getResult = HttpUtil.get(shipBaseInfo, params);
|
|
|
+ String url = shipBaseInfo + "?" + HttpUtil.toParams(params);
|
|
|
+ String getResult = HttpUtil.get(url);
|
|
|
+ log.info("调用地址:{}。获取船舶数据:{}", url, getResult);
|
|
|
JSONObject jsonObject = JSON.parseObject(getResult);
|
|
|
if (jsonObject != null && 200 == jsonObject.getInteger("code")) {
|
|
|
JSONArray result = jsonObject.getJSONArray("data");
|