将启动结果写入缓存
This commit is contained in:
parent
6fadbb070d
commit
ff2f2eee4a
@ -73,7 +73,7 @@ public class OrderDataLogic implements ServiceLogic {
|
|||||||
final R r = pileOrderService.pileEndOrder(orderNo);
|
final R r = pileOrderService.pileEndOrder(orderNo);
|
||||||
if (orderNo.equals("00000000000000000000000000000000") || (r != null && r.getMsg() != null && r.getMsg().contains(
|
if (orderNo.equals("00000000000000000000000000000000") || (r != null && r.getMsg() != null && r.getMsg().contains(
|
||||||
"无效订单"))) {
|
"无效订单"))) {
|
||||||
log.error(">>INVALID order [{}] detected. MUST check the system.<<", orderNo);
|
log.error(">>INVALID order [{}] detected. MUST check the system or [{}].<<", orderNo, gunkey);
|
||||||
}
|
}
|
||||||
String resultStr = "6815".concat(req.get("seqhex").toString()).concat("0040").concat(orderNo);
|
String resultStr = "6815".concat(req.get("seqhex").toString()).concat("0040").concat(orderNo);
|
||||||
if (r != null && r.getCode() == 200) {
|
if (r != null && r.getCode() == 200) {
|
||||||
|
|||||||
@ -43,7 +43,6 @@ public class RemoteStartReplyDataLogic implements ServiceLogic {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ServiceResult service(ServiceParameter sp) throws Exception {
|
public ServiceResult service(ServiceParameter sp) throws Exception {
|
||||||
|
|
||||||
Map<String, Object> req = sp.getParameters();
|
Map<String, Object> req = sp.getParameters();
|
||||||
ObjectMapper objectMapper = new ObjectMapper();
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
RemoteStartReplyData remoteStartReplyData = objectMapper.convertValue(req, RemoteStartReplyData.class);
|
RemoteStartReplyData remoteStartReplyData = objectMapper.convertValue(req, RemoteStartReplyData.class);
|
||||||
@ -69,12 +68,20 @@ public class RemoteStartReplyDataLogic implements ServiceLogic {
|
|||||||
pileOrderService.pileStartup(orderNo, 1, "启动充电成功");
|
pileOrderService.pileStartup(orderNo, 1, "启动充电成功");
|
||||||
if (pushOrder != null) {
|
if (pushOrder != null) {
|
||||||
REDIS.setCacheMapValue(pushOrderKey, "startChargeSeqStat", 2);
|
REDIS.setCacheMapValue(pushOrderKey, "startChargeSeqStat", 2);
|
||||||
|
} else {
|
||||||
|
Map map = new HashMap<>();
|
||||||
|
map.put("startChargeSeqStat", Integer.valueOf(2));
|
||||||
|
REDIS.setCacheMap(pushOrderKey, map);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
final String remark = frs.get(remoteStartReplyData.getFailReason());
|
final String remark = frs.get(remoteStartReplyData.getFailReason());
|
||||||
pileOrderService.pileStartup(orderNo, 2, remark == null ? "未知错误" : remark);
|
pileOrderService.pileStartup(orderNo, 2, remark == null ? "未知错误" : remark);
|
||||||
if (pushOrder != null) {
|
if (pushOrder != null) {
|
||||||
REDIS.setCacheMapValue(pushOrderKey, "startChargeSeqStat", 4);
|
REDIS.setCacheMapValue(pushOrderKey, "startChargeSeqStat", 4);
|
||||||
|
} else {
|
||||||
|
Map map = new HashMap<>();
|
||||||
|
map.put("startChargeSeqStat", Integer.valueOf(4));
|
||||||
|
REDIS.setCacheMap(pushOrderKey, map);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new ServiceResult(false);
|
return new ServiceResult(false);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user