空闲计数器重置
This commit is contained in:
parent
062e0c769f
commit
df5db7c729
@ -163,20 +163,23 @@ public class RealtimeDataLogic implements ServiceLogic {
|
||||
}
|
||||
REDIS.setCacheMap(orderkey, cacheOrder);
|
||||
} else {
|
||||
Integer idleCnt = (Integer) cacheGun.get("idleCnt");
|
||||
idleCnt = idleCnt == null ? 0 : idleCnt;
|
||||
idleCnt++;
|
||||
orderkey = (String) cacheGun.get("orderkey");
|
||||
if (idleCnt > 3 && orderkey != null) {
|
||||
Map<String, Object> problematicOrder = REDIS.getCacheMap(orderkey);
|
||||
Object orderData = problematicOrder.get("orderData");
|
||||
String status = (String) problematicOrder.get("status");
|
||||
if (!isInteger(status) && !status.equals("充电中") && orderData == null) {
|
||||
pileOrderService.abnormalOrder(orderNo);
|
||||
cacheGun.put("orderkey", null);
|
||||
if (orderkey != null) {
|
||||
Integer idleCnt = (Integer) cacheGun.get("idleCnt");
|
||||
idleCnt = idleCnt == null ? 0 : idleCnt;
|
||||
idleCnt++;
|
||||
if (idleCnt > 3 && orderkey != null) {
|
||||
Map<String, Object> problematicOrder = REDIS.getCacheMap(orderkey);
|
||||
Object orderData = problematicOrder.get("orderData");
|
||||
String status = (String) problematicOrder.get("status");
|
||||
if (!isInteger(status) && !status.equals("充电中") && orderData == null) {
|
||||
pileOrderService.abnormalOrder(orderNo);
|
||||
cacheGun.put("orderkey", null);
|
||||
idleCnt = 0;
|
||||
}
|
||||
}
|
||||
cacheGun.put("idleCnt", idleCnt);
|
||||
}
|
||||
cacheGun.put("idleCnt", idleCnt);
|
||||
}
|
||||
REDIS.setCacheMap(gunkey, cacheGun);
|
||||
return new ServiceResult(false);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user