todo: 优化第三方
This commit is contained in:
parent
c923d06869
commit
e26004fd17
@ -52,7 +52,7 @@ public class QueryTokenController {
|
||||
tokenResponse.setOperatorId("MA6DFCTD5");
|
||||
tokenResponse.setSuccStat(0);
|
||||
tokenResponse.setFailReason(0);
|
||||
String data = null;
|
||||
String data = null; //todo 优化OperatorIdEvcs like
|
||||
XhpcInternetUser xhpcInternetUser =
|
||||
xhpcInternetUserRepository.findByOperatorIdEvcsAndCooperationStartTimeBeforeAndCooperationEndTimeAfter(tokenRequest.getOperatorId(), Instant.now(), Instant.now());
|
||||
if (xhpcInternetUser != null) {
|
||||
|
||||
@ -68,7 +68,7 @@ public class OrderDataLogic implements ServiceLogic {
|
||||
String resultStr =
|
||||
"6815".concat(req.get("seqhex").toString()).concat("0040").concat(orderNo).concat(ServiceResult.HEX_00);
|
||||
resultStr = resultStr.concat(CRCCalculator.calcCrc(resultStr));
|
||||
final R r = pileOrderService.pileEndOrder(orderNo);
|
||||
final R r = pileOrderService.pileEndOrder(orderNo); //todo 优化 通知第三方
|
||||
if (r.getCode() == 200)
|
||||
return new ServiceResult(HexUtils.toBytes(resultStr), ServiceResult.OK);
|
||||
else
|
||||
|
||||
@ -23,7 +23,10 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static cn.hutool.core.util.NumberUtil.isInteger;
|
||||
import static com.xhpc.common.data.redis.StaticBeanUtil.REDIS;
|
||||
@ -187,12 +190,12 @@ public class RealtimeDataLogic implements ServiceLogic {
|
||||
R r = null;
|
||||
final String stopResult = (String) cacheOrder.get("stopResult");
|
||||
if (cacheRData == null) {
|
||||
r = pileOrderService.abnormalOrder(orderNo);
|
||||
r = pileOrderService.abnormalOrder(orderNo); //todo 优化 通知第三方
|
||||
} else if ("01".equals(stopResult)) {
|
||||
CacheOrderData lordAsOd = new CacheOrderData(cacheRData, (String) cacheOrder.get("orderstarttime"),
|
||||
(Integer) cacheOrder.get("startSoc"), (Integer) cacheOrder.get("stopSoc"));
|
||||
cacheOrder.put("orderData", lordAsOd);
|
||||
r = pileOrderService.pileEndOrder(orderNo);
|
||||
r = pileOrderService.pileEndOrder(orderNo); //todo 优化 通知第三方
|
||||
REDIS.setCacheMap(orderkey, cacheOrder);
|
||||
}
|
||||
if (r == null || r.getCode() != 200) {
|
||||
@ -217,16 +220,16 @@ public class RealtimeDataLogic implements ServiceLogic {
|
||||
Object orderData = problematicOrder.get("orderData");
|
||||
String status = (String) problematicOrder.get("status");
|
||||
if (!isInteger(status) && !status.equals("充电中") && orderData == null) {
|
||||
pileOrderService.abnormalOrder(orderNo);
|
||||
pileOrderService.abnormalOrder(orderNo); //todo 优化 通知第三方
|
||||
log.error("abnormal.2 order[{}]", orderNo);
|
||||
cacheGun.put("orderkey", null);
|
||||
idleCnt = 0;
|
||||
}
|
||||
} else {
|
||||
Collection<String> cacheOrderKyes = REDIS.keys("order:".concat(terminalId).concat("*"));
|
||||
for (String cacheOrderKye : cacheOrderKyes) {
|
||||
|
||||
}
|
||||
// } else {
|
||||
// Collection<String> cacheOrderKyes = REDIS.keys("order:".concat(terminalId).concat("*"));
|
||||
// for (String cacheOrderKye : cacheOrderKyes) { //todo ???
|
||||
//
|
||||
// }
|
||||
}
|
||||
}
|
||||
cacheGun.put("idleCnt", idleCnt);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user