WIP:三方对接逻辑 @Chen
This commit is contained in:
parent
ae868142a2
commit
b5953a66ac
@ -357,11 +357,11 @@ public class XhpcChargeOrderServiceImpl implements IXhpcChargeOrderService {
|
||||
public R startUpBy3rd(String internetSerialNumber, String driverId, Integer chargingAmt, String plateNum, Integer status, String connectorId) {
|
||||
|
||||
R r = new R();
|
||||
String day = internetSerialNumber.substring(9, internetSerialNumber.length() - 4);
|
||||
if (!isValidDate(day)) {
|
||||
r.setCode(500);
|
||||
return r;
|
||||
}
|
||||
// String day = internetSerialNumber.substring(9, internetSerialNumber.length() - 4);
|
||||
// if (!isValidDate(day)) {
|
||||
// r.setCode(500);
|
||||
// return r;
|
||||
// }
|
||||
|
||||
int resTime = xhpcInternetUserMapper.selectByOperatorIdEvcs(internetSerialNumber.substring(0, 9));
|
||||
if (resTime == 0) {
|
||||
@ -371,7 +371,7 @@ public class XhpcChargeOrderServiceImpl implements IXhpcChargeOrderService {
|
||||
|
||||
StartChargingData startChargingData = new StartChargingData();
|
||||
//500000 equals 500 yuan
|
||||
startChargingData.setBalance(500000);
|
||||
startChargingData.setBalance(500000); //todo @Chen use param amt
|
||||
|
||||
startChargingData.setGunId(connectorId);
|
||||
|
||||
@ -397,7 +397,7 @@ public class XhpcChargeOrderServiceImpl implements IXhpcChargeOrderService {
|
||||
} else {
|
||||
String statusCache = cacheMap.get("status").toString();
|
||||
//不同的状态
|
||||
if ("离线".equals(statusCache) || "故障".equals(statusCache) || "充电".equals(statusCache)) {
|
||||
if (!"空闲".equals(statusCache) || "故障".equals(statusCache) || "充电".equals(statusCache)) {
|
||||
r.setCode(500);
|
||||
return r;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user