vname issue coursing npe
This commit is contained in:
parent
db87434480
commit
f279fb482a
@ -74,7 +74,6 @@ public class NotificationEquipChargeStatusTask extends CoreDispatcher {
|
||||
equipChargeStatus.setVoltageA(HexUtils.reverseHexInt(voltage == null ? "D80E" : voltage) / 10.0);
|
||||
Integer soc = REDIS.getCacheMapValue(orderkey, "endSoc");
|
||||
equipChargeStatus.setSoc(soc == null ? 0.0 : Double.valueOf(soc.toString()));
|
||||
equipChargeStatus.setStartTime(cacheGun.get("orderstarttime").toString());
|
||||
CacheRealtimeData lord = REDIS.getCacheObject(orderkey.concat(".lord"));
|
||||
String lordTime;
|
||||
if (lord != null) {
|
||||
@ -82,6 +81,7 @@ public class NotificationEquipChargeStatusTask extends CoreDispatcher {
|
||||
} else {
|
||||
lordTime = DateUtil.date2String(Calendar.getInstance().getTime(), DATE_FORMAT_DATE_TIME);
|
||||
}
|
||||
equipChargeStatus.setStartTime(REDIS.getCacheMapValue(orderkey, "startTime"));
|
||||
equipChargeStatus.setEndTime(lordTime);
|
||||
equipChargeStatus.setChargeModel(3);
|
||||
equipChargeStatus.setTotalPower(REDIS.getCacheMapValue(orderkey, "totalPower"));
|
||||
|
||||
@ -193,7 +193,7 @@ public class RealtimeDataLogic implements ServiceLogic {
|
||||
cacheOrder.put("abnormal", "1.1");//lord is null
|
||||
log.error("abnormal.1 order[{}]", orderNo);
|
||||
} else {
|
||||
CacheOrderData lordAsOd = new CacheOrderData(cacheRData, (String) cacheOrder.get("orderstarttime"),
|
||||
CacheOrderData lordAsOd = new CacheOrderData(cacheRData, (String) cacheOrder.get("pileStartTime"),
|
||||
(Integer) cacheOrder.get("startSoc"), (Integer) cacheOrder.get("stopSoc"));
|
||||
cacheOrder.put("orderData", lordAsOd);
|
||||
r = pileOrderService.pileEndOrder(orderNo);
|
||||
|
||||
@ -60,10 +60,10 @@ public class RemoteStartReplyDataLogic implements ServiceLogic {
|
||||
Map<String, Object> pushOrder = REDIS.getCacheMap(pushOrderKey);
|
||||
if (HEX_01.equals(remoteStartReplyData.getStartResult())) {
|
||||
final String orderstarttime = DateUtil.format(Calendar.getInstance().getTime(), NORM_DATETIME_FORMAT);
|
||||
cacheGun.put("orderstarttime", orderstarttime);
|
||||
cacheGun.put("pileStartTime", orderstarttime);
|
||||
cacheGun.put("orderstoptime", null);
|
||||
cacheGun.put("orderkey", orderkey);
|
||||
cacheOrder.put("orderstarttime", orderstarttime);
|
||||
cacheOrder.put("pileStartTime", orderstarttime);
|
||||
REDIS.setCacheMap(gunkey, cacheGun);
|
||||
REDIS.setCacheMap(orderkey, cacheOrder);
|
||||
pileOrderService.pileStartup(orderNo, 1, "启动充电成功");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user