地图上报警信息

pull/4/head
dearlin 2024-02-21 09:04:50 +08:00
parent d6bb1fd3fe
commit 089969712d
2 changed files with 47 additions and 2 deletions

View File

@ -73,7 +73,29 @@ public class MapController extends BaseController {
public ReturnMap getAlarmTypeCount() throws Exception {
return ReturnMap.ok().put("data", PLSUtil.getAlarmTypeCount(Jurisdiction.getCORPINFO_ID()));
}
/**
* @Description:
* @Author: dearLin
* @Date: 2024/1/26/026 16:43
* @Param: [] []
* @Return: com.zcloud.util.ReturnMap
*/
@RequestMapping(value = "/getAlArmDataList")
@ResponseBody
public ReturnMap getAlArmDataList(Page page) throws Exception {
PageData pageData = this.getPageData();
ReturnMap returnMap = new ReturnMap();
JSONObject body = PLSUtil.getAlArmDataList(
Jurisdiction.getCORPINFO_ID(), page.getCurrentPage() + 1, page.getShowCount(), "", Integer.parseInt(pageData.getString("status")), Integer.parseInt(pageData.getString("eleType"))
);
if (body != null) {
List<JSONObject> list = body.getJSONArray("rows").toJavaList(JSONObject.class);
returnMap.put("varList", list);
page.setTotalResult(body.getIntValue("total"));
returnMap.put("page", page);
}
return returnMap;
}
/**
* @Description:
* @Author: dearLin

View File

@ -68,6 +68,28 @@ public class PLSUtil {
JSONObject.class);
return exchange.getBody();
}
/**
* @Description:
* @Author: dearLin
* @Date: 2024/1/25/025 14:37
* @Param: [java.lang.String, java.lang.Integer, java.lang.Integer] [keywords, currentPage, showCount]
* @Return: com.alibaba.fastjson.JSONObject
*/
public static JSONObject getAlArmDataList(String CORPINFO_ID, Integer currentPage, Integer showCount ,String keywords,Integer status,Integer eleType) throws Exception {
HttpHeaders headers = new HttpHeaders();
headers.set("Authorization", getToken(CORPINFO_ID));
// "/region/alarm/list?pageNum=" +
// currentPage + "&pageSize=" + showCount +"&str=" + "&eleType="+eleType+ "&status="+status
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers);
ResponseEntity<JSONObject> exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) +
"/region/alarm/list?eleType="+eleType+"+&status="+status+"&pageNum="+currentPage+"&pageSize="+showCount+"&str="
,HttpMethod.GET, httpEntity, JSONObject.class);
return exchange.getBody();
}
/**
* @Description:
* @Author: dearLin
@ -79,7 +101,8 @@ public class PLSUtil {
HttpHeaders headers = new HttpHeaders();
headers.set("Authorization", getToken(CORPINFO_ID));
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers);
ResponseEntity<JSONObject> exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) + "/device/camera/list?pageNum=1&pageSize=100000&str=", HttpMethod.GET, httpEntity, JSONObject.class);
ResponseEntity<JSONObject> exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) +
"/device/camera/list?pageNum=1&pageSize=100000&str=", HttpMethod.GET, httpEntity, JSONObject.class);
return exchange.getBody();
}