diff --git a/src/main/java/com/zcloud/controller/mapApi/MapController.java b/src/main/java/com/zcloud/controller/mapApi/MapController.java index dc5ed1c..48ac4b6 100644 --- a/src/main/java/com/zcloud/controller/mapApi/MapController.java +++ b/src/main/java/com/zcloud/controller/mapApi/MapController.java @@ -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 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 diff --git a/src/main/java/com/zcloud/util/PLSUtil.java b/src/main/java/com/zcloud/util/PLSUtil.java index 3eff458..1e7d152 100644 --- a/src/main/java/com/zcloud/util/PLSUtil.java +++ b/src/main/java/com/zcloud/util/PLSUtil.java @@ -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 httpEntity = new HttpEntity<>(headers); + ResponseEntity 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 httpEntity = new HttpEntity<>(headers); - ResponseEntity exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) + "/device/camera/list?pageNum=1&pageSize=100000&str=", HttpMethod.GET, httpEntity, JSONObject.class); + ResponseEntity exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) + + "/device/camera/list?pageNum=1&pageSize=100000&str=", HttpMethod.GET, httpEntity, JSONObject.class); return exchange.getBody(); }