src/main/java/com/skyline/electricity/controller/DetectController.java
@@ -608,7 +608,7 @@ catch (Exception e) { e.printStackTrace(); } System.out.println(polygon.toString()); //System.out.println(polygon.toString()); final FencePosition fencePosition = new FencePosition(); fencePosition.setFenceposition(polygon.toString()); fencePosition.setCreatetime(new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date())); src/main/java/com/skyline/electricity/controller/DeviceController.java
@@ -233,7 +233,7 @@ final Map<String, Object> map = new HashMap<String, Object>(); final String dzzzresponse = (String)template.getForObject(this.configInfo.getDzzzUrl(), (Class)String.class, new Object[0]); final JSONObject json = JSONObject.parseObject(dzzzresponse); System.out.println(json.getJSONObject("data").getString("id")); //System.out.println(json.getJSONObject("data").getString("id")); DeviceController.log.warn(dzzzresponse.toString()); return dzzzresponse; } src/main/java/com/skyline/electricity/controller/RemoteController.java
@@ -585,7 +585,7 @@ final ResponseEntity<String> responseEntity1 = (ResponseEntity<String>)restTemplate.getForEntity(this.configInfo.getUWB_Historylocation() + "?apikey=" + this.configInfo.getApikey() + "&userId={userId}&shopId={shopId}&startTime={startTime}&endTime={endTime}", (Class)String.class, (Map)params1); final String body1 = (String)responseEntity1.getBody(); final JSONObject jsonObjectResult1 = JSONObject.parseObject(body1); System.out.println(jsonObjectResult1.get((Object)"data")); //System.out.println(jsonObjectResult1.get((Object)"data")); if (jsonObjectResult1 != null) { final JSONArray jsonArray1 = (JSONArray)jsonObjectResult1.get((Object)"data"); final List<UWBHistoryInfo> list1 = (List<UWBHistoryInfo>)jsonArray1.toJavaList((Class)UWBHistoryInfo.class); @@ -717,7 +717,7 @@ final ResponseEntity<String> responseEntity2 = (ResponseEntity<String>)restTemplate.postForEntity(this.configInfo.getGPS_Historylocation()+ "?apikey=" + this.configInfo.getApikey(), (Object)httpEntity, (Class)String.class, new Object[0]); final String body2 = (String)responseEntity2.getBody(); final JSONObject jsonObjectResult2 = JSONObject.parseObject(body2); System.out.println(jsonObjectResult2.get((Object)"data")); //System.out.println(jsonObjectResult2.get((Object)"data")); final JSONObject object = (JSONObject)jsonObjectResult2.get((Object)"data"); if (object != null) { final JSONArray jsonArray2 = (JSONArray)object.get((Object)"statisticList"); src/main/java/com/skyline/electricity/controller/WebSocketServer.java
@@ -20,7 +20,7 @@ @PostConstruct public void init() { System.out.println("websocket 加载"); // System.out.println("websocket 加载"); } @OnOpen src/main/java/com/skyline/electricity/interceptor/IAMUtils.java
@@ -26,7 +26,7 @@ final ResponseEntity<String> responseEntity = (ResponseEntity<String>)restTemplate.exchange(url, HttpMethod.GET, httpEntity, (Class)String.class, new Object[0]); if (responseEntity.getStatusCode().value() == 200) { result = (String)responseEntity.getBody(); System.out.println(result); //System.out.println(result); } if ("".equals(result)) { return null; @@ -50,14 +50,14 @@ final ResponseEntity<String> responseEntity = (ResponseEntity<String>)restTemplate.getForEntity(url, (Class)String.class, new Object[0]); if (responseEntity.getStatusCode().value() == 200) { result = (String)responseEntity.getBody(); System.out.println(result); //System.out.println(result); } if (StringUtils.isBlank((CharSequence)result)) { return null; } final JSONObject resultJson = JSONObject.parseObject(result); if (resultJson.containsKey((Object)"error")) { System.out.println(resultJson.toJSONString()); //System.out.println(resultJson.toJSONString()); return null; } return resultJson.getString("data"); @@ -69,7 +69,7 @@ } public String getInfo() { System.out.println(PropertiesUtil.getProperty("userInfo_url") + PropertiesUtil.getProperty("token_url")); //System.out.println(PropertiesUtil.getProperty("userInfo_url") + PropertiesUtil.getProperty("token_url")); return PropertiesUtil.getProperty("userInfo_url") + PropertiesUtil.getProperty("token_url"); } } src/main/java/com/skyline/electricity/timer/Consumer.java
@@ -41,7 +41,7 @@ InformationService informationService ; @Override public void onMessage(String message) { System.out.println("recv msg: "+message); //System.out.println("recv msg: "+message); sendAllMessage(message); } @@ -64,13 +64,13 @@ */ public void sendAllMessage(String message) { System.out.println("【websocket消息】广播消息:"+message); //System.out.println("【websocket消息】广播消息:"+message); JSONObject jsonObject = JSONObject.parseObject(message); String personNo = jsonObject.getString("personNo"); SysUser sysUser = infoSynchService.selectUserInfoById(personNo) ; System.out.println("【user]:"+JSONObject.toJSONString(sysUser)); //System.out.println("【user]:"+JSONObject.toJSONString(sysUser)); List<RetInfo> list = new ArrayList<>(); //查询用户所处围栏 List<FencePosition> fencePositionList = null ; @@ -79,7 +79,7 @@ }catch (Exception e){ System.out.println(e.getMessage()); } System.out.println("【FencePosition]:"+JSONObject.toJSONString(fencePositionList)); //System.out.println("【FencePosition]:"+JSONObject.toJSONString(fencePositionList)); RetInfo alertinfo = new RetInfo(); initAlertInfos(jsonObject, personNo, sysUser, alertinfo); if( fencePositionList != null && fencePositionList.size() > 0){ @@ -101,7 +101,7 @@ list.add(alertinfo) ; } insertInformation(list); System.out.println( "list:"+jsonObject.toJSONString(list)); // System.out.println( "list:"+jsonObject.toJSONString(list)); // if( list != null && list.size() > 0) // System.out.println( "websocket status ..["+webSocketController.sendAllMessage(JSONObject.toJSONString(list))+"["+JSONObject.toJSONString(list)+"]" ); } src/main/java/com/skyline/electricity/timer/SchedulerTask.java
@@ -92,8 +92,10 @@ List<RetInfo> rlist = new ArrayList<>(); list.stream().forEach(r->rlist.add(JSONObject.parseObject(r,RetInfo.class))) ; if( list != null && list.size() > 0) System.out.println( "websocket status ..["+webSocketController.sendAllMessage(JSONObject.toJSONString(rlist))+"["+JSONObject.toJSONString(rlist)+"]" ); if( list != null && list.size() > 0){ webSocketController.sendAllMessage(JSONObject.toJSONString(rlist)); } // System.out.println( "websocket status ..["+JSONObject.toJSONString(rlist)+"]" ); //推送报警信息 pushIM(rlist); } @@ -116,7 +118,7 @@ rlist.stream().forEach((k) -> { // if( k.getStatus().equals("ok")) return ; System.out.println( "k====="+k.getLongitude()+" "+k.getLatitude()) ; //System.out.println( "k====="+k.getLongitude()+" "+k.getLatitude()) ; MonitorInfo monitor = informationService.queryMinDistance(k.getLongitude(),k.getLatitude()); if( monitor == null ) return ; @@ -139,11 +141,11 @@ map.put("startDate",formattedDate); map.put("warnName", k.getUserName()+"进入"+k.getFence_name()); String url = configInfo.getWarn_url(); System.out.println( "post url warning "+url) ; System.out.println( "post url warning "+configInfo.getServer_url()) ; //System.out.println( "post url warning "+url) ; //System.out.println( "post url warning "+configInfo.getServer_url()) ; url = "http://10.69.206.205:8080/a/ew/ewWarning/warning"; ResponseEntity<String> result = template.postForEntity(url, map,String.class); System.out.println("【user info】:"+result); //System.out.println("【user info】:"+result); }); @@ -511,7 +513,7 @@ final JSONObject json = JSONObject.parseObject(dzzzresponse); SchedulerTask.log.warn(dzzzresponse.toString()); SchedulerTask.log.warn(json.getJSONObject("data").getString("id")); System.out.println(json.getJSONObject("data").getString("id")); //System.out.println(json.getJSONObject("data").getString("id")); if (',' == recipent.charAt(recipent.length() - 1)) { recipent.append(json.getJSONObject("data").getString("id")); } @@ -547,7 +549,7 @@ final JSONObject json = JSONObject.parseObject(dzzzresponse); SchedulerTask.log.warn(dzzzresponse.toString()); SchedulerTask.log.warn(json.getJSONObject("data").getString("id")); System.out.println(json.getJSONObject("data").getString("id")); //System.out.println(json.getJSONObject("data").getString("id")); if (',' == recipent.charAt(recipent.length() - 1)) { recipent.append(json.getJSONObject("data").getString("id")); } src/main/java/com/skyline/electricity/utils/TestClass.java
@@ -8,7 +8,7 @@ final float[] a = { 2.0f, 3.0f, 4.0f }; final float[] b = { 2.0f, 3.0f, 4.0f }; final float[] g = new float[4]; System.out.println(g.length); //System.out.println(g.length); final float[][] p = { a, b }; final float[][] c = { a, b }; final float[][][] t = { p, c };