| | |
| | | package com.skyline.electricity.timer; |
| | | |
| | | import org.apache.http.client.ClientProtocolException; |
| | | import org.apache.http.client.config.RequestConfig; |
| | | import org.apache.http.client.entity.UrlEncodedFormEntity; |
| | | import org.apache.http.client.methods.CloseableHttpResponse; |
| | | import org.apache.http.client.methods.HttpPost; |
| | | import org.apache.http.impl.client.CloseableHttpClient; |
| | | import org.apache.http.impl.client.HttpClients; |
| | | import org.apache.http.message.BasicNameValuePair; |
| | | import org.apache.http.protocol.HTTP; |
| | | import org.apache.http.util.EntityUtils; |
| | | import org.springframework.stereotype.*; |
| | | import org.springframework.context.annotation.*; |
| | | import org.springframework.beans.factory.annotation.*; |
| | |
| | | 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("scheduled....push size:"+list.size()); |
| | | webSocketController.sendAllMessage(JSONObject.toJSONString(rlist)); |
| | | } |
| | | // System.out.println( "websocket status ..["+JSONObject.toJSONString(rlist)+"]" ); |
| | | //推送报警信息 |
| | | pushIM(rlist); |
| | | //pushIM(rlist); |
| | | } |
| | | |
| | | /** |