diff --git a/src/main/java/com/hisense/monitormanage/controller/KeyAreaController.java b/src/main/java/com/hisense/monitormanage/controller/KeyAreaController.java index b2c8b7b..40a1177 100644 --- a/src/main/java/com/hisense/monitormanage/controller/KeyAreaController.java +++ b/src/main/java/com/hisense/monitormanage/controller/KeyAreaController.java @@ -67,16 +67,16 @@ public class KeyAreaController { } /** - * 查询所有事件 + * 重点区域场景查询所有事件 * @return */ - @GetMapping("selectEvent") - @ApiOperation("查询所有事件") + @GetMapping("selectAreaEvent") + @ApiOperation("重点区域场景查询所有事件") @ApiImplicitParams({ @ApiImplicitParam(name = "page", value = "页码", required = false, dataType = "Integer"), @ApiImplicitParam(name = "pageSize", value = "页码大小", required = false, dataType = "Integer") }) - public Result selectEvent(Integer page,Integer pageSize){ + public Result selectAreaEvent(Integer page,Integer pageSize){ List events = eventMapper.selectEvent(page,pageSize); for (EventDto event: events) { if (event.getEventCnName().equals("街头伞篷") || event.getEventCnName().equals("水果和食品摊") @@ -104,12 +104,12 @@ public class KeyAreaController { } /** - * 查询当天事件 + * 重点区域场景查询当天事件 * @return */ - @GetMapping("selectByTime") - @ApiOperation("查询当天事件") - public Result selectByTime(){ + @GetMapping("selectAreaByTime") + @ApiOperation("重点区域场景查询当天事件") + public Result selectAreaByTime(){ List events = eventMapper.selectByTime(); for (EventDto event: events) { if (event.getEventCnName().equals("街头伞篷") || event.getEventCnName().equals("水果和食品摊") @@ -138,14 +138,14 @@ public class KeyAreaController { * @param eventNewName * @return */ - @GetMapping("selectByName") + @GetMapping("selectAreaByName") @ApiOperation("重点区域场景根据事件名称查询事件") @ApiImplicitParams({ @ApiImplicitParam(name = "eventNewName",value = "事件名称",required = true,dataType = "String"), @ApiImplicitParam(name = "page", value = "页码", required = false, dataType = "Integer"), @ApiImplicitParam(name = "pageSize", value = "页码大小", required = false, dataType = "Integer") }) - public Result selectAreaByEventName(String eventNewName,Integer page,Integer pageSize){ + public Result selectAreaByName(String eventNewName,Integer page,Integer pageSize){ if (eventNewName.equals("环境卫生")){ List lists = eventMapper.selectByName("'塑料篮子','纸箱','街头散落垃圾'",page,pageSize); for (EventDto list: lists) { diff --git a/src/main/java/com/hisense/monitormanage/service/QidiService.java b/src/main/java/com/hisense/monitormanage/service/QidiService.java index d855052..55b74cc 100644 --- a/src/main/java/com/hisense/monitormanage/service/QidiService.java +++ b/src/main/java/com/hisense/monitormanage/service/QidiService.java @@ -67,19 +67,19 @@ public class QidiService { HttpHeaders headers = new HttpHeaders(); headers.add("Authorization", "Bearer " + token); - Map map = new HashMap<>(); + /*Map map = new HashMap<>(); JSONObject search = new JSONObject(); search.put("opt","LIKE"); search.put("key","UPLOADTIME"); search.put("val",this.dateStr()); - map.put("json",search); + map.put("json",search);*/ - String url = "http://120.221.95.13:9090/catalog/resCatalogApply/getData/UC_QUERY_ZTYS_307013600000000022_2?search=[{json}]"; + String url = "http://120.221.95.13:9090/catalog/resCatalogApply/getData/UC_QUERY_ZTYS_307013600000000022_2"; HttpEntity httpEntity = new HttpEntity<>(null, headers); ResponseEntity responseEntity; try { - responseEntity = restTemplate.exchange(url, HttpMethod.GET, httpEntity, JSONObject.class,map); + responseEntity = restTemplate.exchange(url, HttpMethod.GET, httpEntity, JSONObject.class); JSONObject jsonObject = responseEntity.getBody(); JSONArray jsonArray = jsonObject.getJSONArray("list"); @@ -98,8 +98,8 @@ public class QidiService { HttpHeaders headers = new HttpHeaders(); headers.add("Authorization", "Bearer " + token); - Map map = new HashMap<>(); - /*JSONObject search = new JSONObject(); + /* Map map = new HashMap<>(); + JSONObject search = new JSONObject(); search.put("opt","LIKE"); search.put("key","updatetime"); search.put("val",this.dateStr());