避免电流电压没有值引起NPE

This commit is contained in:
ZZ 2022-07-18 16:20:30 +08:00
parent 5a2dab3704
commit dc8d2b7d99

View File

@ -154,7 +154,7 @@ public class RealtimeDataLogic implements ServiceLogic {
} else {
Integer vul = (Integer) cachePile.get("voltageUpperLimits");
Integer cul = (Integer) cachePile.get("currentLimit");
if (wc > cul || wv > vul) {
if(vul != null && cul != null && (wc > cul || wv > vul)) {
R r = chargingController.stopCharging(pileNo, gunId, default_version);
if (r.getCode() == 200) {
Integer vcpcnt = (Integer) cacheOrder.get("vcpcnt");