丢弃空闲的实时数据
This commit is contained in:
parent
ca414bf210
commit
cfce6e7dba
@ -230,12 +230,16 @@ public class ChargingController {
|
|||||||
return R.fail("端口不在空闲或正常状态,稍后再试");
|
return R.fail("端口不在空闲或正常状态,稍后再试");
|
||||||
}
|
}
|
||||||
if (CacheDataUtils.hori(gunkey)) return R.fail("请检查枪号是否正确,稍后再试");
|
if (CacheDataUtils.hori(gunkey)) return R.fail("请检查枪号是否正确,稍后再试");
|
||||||
|
String orderkey = "order:".concat(startChargingData.getOrderNo());
|
||||||
|
// String oldOrderKey = (String) cacheGun.get("orderkey");
|
||||||
|
// if (oldOrderKey!=null && !oldOrderKey.equals(orderkey)) {
|
||||||
|
// return R.fail("端口正在充电");
|
||||||
|
// } //todo delete oldOrderKey val?
|
||||||
String skey = gunkey.concat(".seqhex");
|
String skey = gunkey.concat(".seqhex");
|
||||||
String seq = seqHex(skey);
|
String seq = seqHex(skey);
|
||||||
byte[] msg = translateStart(startChargingData, seq);
|
byte[] msg = translateStart(startChargingData, seq);
|
||||||
handler.sendClientBinary(msg);
|
handler.sendClientBinary(msg);
|
||||||
Integer balance = startChargingData.getBalance();
|
Integer balance = startChargingData.getBalance();
|
||||||
String orderkey = "order:".concat(startChargingData.getOrderNo());
|
|
||||||
Map<String, Object> cacheOrder = REDIS.getCacheMap(orderkey);
|
Map<String, Object> cacheOrder = REDIS.getCacheMap(orderkey);
|
||||||
String pkey = "pile:".concat(pileNo);
|
String pkey = "pile:".concat(pileNo);
|
||||||
Map<String, Object> cachePile = REDIS.getCacheMap(pkey);
|
Map<String, Object> cachePile = REDIS.getCacheMap(pkey);
|
||||||
|
|||||||
@ -99,7 +99,7 @@ public class RealtimeDataLogic implements ServiceLogic {
|
|||||||
REDIS.setCacheMap(stationTermStatusKey, cacheTerminalStatusMap);
|
REDIS.setCacheMap(stationTermStatusKey, cacheTerminalStatusMap);
|
||||||
Map<String, Object> cacheOrder = REDIS.getCacheMap(orderkey);
|
Map<String, Object> cacheOrder = REDIS.getCacheMap(orderkey);
|
||||||
List<CacheRealtimeData> realtimeDataList = (List<CacheRealtimeData>) cacheOrder.get("realtimeDataList");
|
List<CacheRealtimeData> realtimeDataList = (List<CacheRealtimeData>) cacheOrder.get("realtimeDataList");
|
||||||
if (!orderNo.equals("00000000000000000000000000000000")) {
|
if (!orderNo.equals("00000000000000000000000000000000") && statusInt != 2) {
|
||||||
if (realtimeDataList == null) {
|
if (realtimeDataList == null) {
|
||||||
realtimeDataList = new ArrayList<>();
|
realtimeDataList = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user