soc达到不停止一直发
This commit is contained in:
parent
f928248447
commit
2e2ac8b278
@ -84,7 +84,7 @@ public class HttpUtils {
|
|||||||
connectTimeout).build();
|
connectTimeout).build();
|
||||||
// 初始化httpClient
|
// 初始化httpClient
|
||||||
httpClient = getConnection();
|
httpClient = getConnection();
|
||||||
System.out.println("HttpClient inited.");
|
logger.info("HttpClient inited.");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -154,16 +154,15 @@ public class RealtimeDataLogic implements ServiceLogic {
|
|||||||
} else {
|
} else {
|
||||||
Integer stopSoc = (Integer) cacheOrder.get("stopSoc");
|
Integer stopSoc = (Integer) cacheOrder.get("stopSoc");
|
||||||
if (stopSoc != null && socInt >= stopSoc) {
|
if (stopSoc != null && socInt >= stopSoc) {
|
||||||
|
R r = chargingController.nativeStopCharging(pileNo, gunId, default_version);
|
||||||
String alerted = (String) cacheOrder.get("socalerted");
|
String alerted = (String) cacheOrder.get("socalerted");
|
||||||
String tel = (String) cacheOrder.get("tel");
|
String tel = (String) cacheOrder.get("tel");
|
||||||
if (alerted == null && tel != null) {
|
if (alerted == null && tel != null) {
|
||||||
R r = chargingController.nativeStopCharging(pileNo, gunId, default_version);
|
|
||||||
if (r.getCode() == 200) {
|
if (r.getCode() == 200) {
|
||||||
HashMap<String, String> paramMap = new HashMap<>();
|
HashMap<String, String> paramMap = new HashMap<>();
|
||||||
paramMap.put("battery", stopSoc.toString());
|
paramMap.put("battery", stopSoc.toString());
|
||||||
paramMap.put("phone", tel);
|
paramMap.put("phone", tel);
|
||||||
paramMap.put("content", "【小华充电】尊敬的用户,你的车辆已充电达至设定的SOC(" + stopSoc + "%)" +
|
paramMap.put("content", "【小华充电】尊敬的用户,你的车辆已充电达至设定的SOC(" + stopSoc + "%)。");
|
||||||
"已自动停止充电,请您尽快将车辆挪走以方便他人使用充电桩,谢谢合作。");
|
|
||||||
smsService.sendNotice(paramMap);
|
smsService.sendNotice(paramMap);
|
||||||
cacheOrder.put("socalerted", "true");
|
cacheOrder.put("socalerted", "true");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user