优化修复:费率下发,卡启动,扫码启动
This commit is contained in:
parent
1d6b47cb7e
commit
f060712145
@ -132,7 +132,7 @@ public class XhpcChargeOrderServiceImpl extends BaseService implements IXhpcChar
|
|||||||
String openId = loginUser.getOpenId();
|
String openId = loginUser.getOpenId();
|
||||||
String tenantId = loginUser.getTenantId();
|
String tenantId = loginUser.getTenantId();
|
||||||
R user = userTypeService.getUser(null, userid, userType, terminalSerialNumber,loginUser.getTenantId());
|
R user = userTypeService.getUser(null, userid, userType, terminalSerialNumber,loginUser.getTenantId());
|
||||||
if(userId !=userid || user ==null || user.getData() ==null){
|
if (!userid.equals(userId) || user == null || user.getData() == null) {
|
||||||
return AjaxResult.error(UserTypeUtil.LOGIN_TYPE, "请重新登录");
|
return AjaxResult.error(UserTypeUtil.LOGIN_TYPE, "请重新登录");
|
||||||
}
|
}
|
||||||
Map<String, Object> userMessage = (Map<String, Object>)user.getData();
|
Map<String, Object> userMessage = (Map<String, Object>)user.getData();
|
||||||
|
|||||||
@ -80,7 +80,10 @@ public class PileStartChargingDataLogic implements ServiceLogic {
|
|||||||
} else {
|
} else {
|
||||||
// 调用订单接口
|
// 调用订单接口
|
||||||
cardNo = iccardInfo.getCardno();
|
cardNo = iccardInfo.getCardno();
|
||||||
Integer rateModelId = pileStartChargingData.getRateModelId();
|
Integer rateModelId = pileStartChargingData.getRateModelId(); // todo not very strict.
|
||||||
|
if (rateModelId == null)
|
||||||
|
rateModelId = ((Long) REDIS.getCacheMapValue("pile:".concat(connectorId.substring(0, 14)),
|
||||||
|
"rateModelId")).intValue();
|
||||||
R r = cardService.cardStartup(cardNo, connectorId, rateModelId.toString());
|
R r = cardService.cardStartup(cardNo, connectorId, rateModelId.toString());
|
||||||
if (r.getCode() == 200) {
|
if (r.getCode() == 200) {
|
||||||
result = ServiceResult.HEX_01;
|
result = ServiceResult.HEX_01;
|
||||||
|
|||||||
@ -52,8 +52,8 @@ public class RateModelValidateLogic implements ServiceLogic {
|
|||||||
String hexCode = ServiceResult.HEX_00;
|
String hexCode = ServiceResult.HEX_00;
|
||||||
Long rateModelId;
|
Long rateModelId;
|
||||||
String version = (String) cachePile.get("version");
|
String version = (String) cachePile.get("version");
|
||||||
if ("0C".equals(version)) rateModelId = Long.valueOf(HexUtils.reverseHexInt(rateModelIdStr));
|
if ("0C".equals(version)) rateModelId = Long.valueOf(rateModelIdStr);
|
||||||
else rateModelId = Long.valueOf(rateModelIdStr);
|
else rateModelId = Long.valueOf(Integer.parseInt(rateModelIdStr, 16));
|
||||||
Long csRateModelId = rateModelId;
|
Long csRateModelId = rateModelId;
|
||||||
if (!charging) {
|
if (!charging) {
|
||||||
ChargingStationDto cacheStation = REDIS.getCacheObject("station:".concat(cachePile.get("stationId").toString()));
|
ChargingStationDto cacheStation = REDIS.getCacheObject("station:".concat(cachePile.get("stationId").toString()));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user