时段明细数据计算

This commit is contained in:
ZZ 2021-09-28 18:16:36 +08:00
parent 0fa49ff845
commit f9e9c30ad9
2 changed files with 3 additions and 2 deletions

View File

@ -148,7 +148,7 @@ public class ChargingController {
if (!REGISTERED.equals(status)) {
r = R.fail("充电桩离线");
}
String gunkey = pkey.concat(gunId);
String gunkey = pkey.concat(gunId).replace("pile", "gun");
final Map<String, Object> cacheGun = REDIS.getCacheMap(gunkey);
if (cacheGun.get("orderkey") == null || !cacheGun.get("orderkey").toString().endsWith(orderNo) || !orderNo.contains(pileNo)) {
r = R.fail("错误的订单号");

View File

@ -121,11 +121,12 @@ public class RealtimeDataLogic implements ServiceLogic {
Integer cacheStartSoc = (Integer) cacheOrder.get("startSoc");
if (cacheStartSoc == null) cacheOrder.put("startSoc", socInt);
cacheOrder.put("endSoc", socInt);
cacheOrder.put("tp", realtimeData.getChargingDegree());
// cacheOrder.put("em", realtimeData.()); //todo 实时时段明细数据是否由桩直接上传?
cacheOrder.put("rbalance", balance);
cacheOrder.put("remainingTime", tr);
cacheOrder.put("status", statusplain);
cacheOrder.put("totalPower", cacheRealtimeData.getChargingDegree() / 10000.0);
cacheOrder.put("totalMoney", cacheRealtimeData.getAmountCharged() / 10000.0);
cacheOrder.put("realtimeDataList", realtimeDataList);
REDIS.setCacheMap(orderkey, cacheOrder);
pileOrderService.pileRimeOrder(orderNo);