From bd84986e440eb43de40d5978115e1e2805295000 Mon Sep 17 00:00:00 2001 From: wuweida <2918581207@qq.com> Date: Fri, 20 May 2022 10:15:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87=E8=B7=AF=E5=BE=84=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hisense/monitormanage/controller/EventController.java | 4 +--- .../com/hisense/monitormanage/controller/FordController.java | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/hisense/monitormanage/controller/EventController.java b/src/main/java/com/hisense/monitormanage/controller/EventController.java index b5b0bf9..6b1d48f 100644 --- a/src/main/java/com/hisense/monitormanage/controller/EventController.java +++ b/src/main/java/com/hisense/monitormanage/controller/EventController.java @@ -107,9 +107,7 @@ public class EventController { event.setLatitude(camera.getBigDecimal("latitude")); event.setLongitude(camera.getBigDecimal("longitude")); JSONObject image = jsonObject.getJSONObject("image"); - String images = image.getString("imageUrl"); - String all = images.replaceAll(images.substring(19, 26), "7:8070"); - event.setImageUrl(all); + event.setImageUrl(image.getString("imageUrl")); event.setTaskId(jsonObject.getString("taskId")); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//要转换的时间格式 Date date; diff --git a/src/main/java/com/hisense/monitormanage/controller/FordController.java b/src/main/java/com/hisense/monitormanage/controller/FordController.java index ca3824f..c1ab9dd 100644 --- a/src/main/java/com/hisense/monitormanage/controller/FordController.java +++ b/src/main/java/com/hisense/monitormanage/controller/FordController.java @@ -15,7 +15,6 @@ import java.net.URLConnection; public class FordController { @GetMapping("components/**") - @ApiOperation("查询所有事件") public void ford(HttpServletRequest request, HttpServletResponse response)throws Exception{ String imageDomain = "http://10.132.191.48:30080"; @@ -45,7 +44,7 @@ public class FordController { outputStream.write(buffer, 0, len); len = inputStream.read(buffer); } - + inputStream.close(); }catch(Exception e) { e.printStackTrace(); }