bad959b1 张雷

人员定位修改

1 个父辈 c9473d90
......@@ -119,12 +119,12 @@ public class ThirdController {
* @return
*/
@GetMapping("/alarmListByCount")
public Result<JSONObject> getAlarmListByCount() {
Result<JSONObject> result = new Result<JSONObject>();
public Result<Object> getAlarmListByCount() {
Result<Object> result = new Result<Object>();
String res = thirdService.getAlarmListByCount();
JSONObject json = JSONObject.parseObject(res);
result.setSuccess(true);
result.setResult(json);
result.setResult(json.get("data"));
return result;
}
......@@ -133,12 +133,26 @@ public class ThirdController {
* @return
*/
@GetMapping("/weekAlarmState")
public Result<JSONObject> getWeekAlarmState() {
Result<JSONObject> result = new Result<JSONObject>();
public Result<Object> getWeekAlarmState() {
Result<Object> result = new Result<Object>();
String res = thirdService.getWeekAlarmState();
JSONObject json = JSONObject.parseObject(res);
result.setSuccess(true);
result.setResult(json);
result.setResult(json.get("data"));
return result;
}
/**
* 获取最近7天的告警统计数据
* @return
*/
@GetMapping("/safeArea")
public Result<Object> getSafeArea() {
Result<Object> result = new Result<Object>();
String res = thirdService.getSafeArea();
JSONObject json = JSONObject.parseObject(res);
result.setSuccess(true);
result.setResult(json.get("data"));
return result;
}
}
......
......@@ -18,4 +18,6 @@ public interface IThirdService {
String getWeekAlarmState();
ThirdPosition getRealTimeLocation(String deviceId);
String getSafeArea();
}
......
......@@ -212,5 +212,11 @@ public class IThirdServiceImpl implements IThirdService {
return thirdPosition;
}
@Override
public String getSafeArea() {
String get = HttpUtil.get(CommonConstant.SAFE_AREA_URL+"?buildingId=10");
return get;
}
}
......
......@@ -33,6 +33,7 @@ public interface CommonConstant {
String BUILD_URL = CMCC_IP + "/api/v1/buildingAllInfo.shtml";//场景信息
String HISTORY_URL = CMCC_IP + "/api/positionByDeviceId.shtml";//历史轨迹
String ALARM_URL = CMCC_IP + "/api/v1/alarmListByCount.shtml";//告警信息
String WEEK_ALARM_URL = CMCC_IP + "/api/v1/weekAlarmState.shtml";//获取最近7天的告警统计数据*
String WEEK_ALARM_URL = CMCC_IP + "/api/v1/weekAlarmState.shtml";//获取最近7天的告警统计数据
String SAFE_AREA_URL = CMCC_IP + "/riskArea/all.shtml";//安全区域
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!