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