刷卡启动兼容
This commit is contained in:
parent
9dd98bc332
commit
a3981c6802
@ -63,7 +63,15 @@ public class PileStartChargingDataLogic implements ServiceLogic {
|
|||||||
if (pileStartChargingData.getStartType().equals("01")) { //刷卡启动
|
if (pileStartChargingData.getStartType().equals("01")) { //刷卡启动
|
||||||
IccardInfoExample example = new IccardInfoExample();
|
IccardInfoExample example = new IccardInfoExample();
|
||||||
IccardInfoExample.Criteria criteria = example.createCriteria();
|
IccardInfoExample.Criteria criteria = example.createCriteria();
|
||||||
criteria.andCardidEqualTo(accountOrCardNo.startsWith("00000000") ? accountOrCardNo.substring(8) : accountOrCardNo).andCorpnoEqualTo(corpNo); // todo remove corpNo
|
String pyhsicCardNo = null;
|
||||||
|
if (accountOrCardNo.startsWith("00000000")) {
|
||||||
|
pyhsicCardNo = accountOrCardNo.substring(8);
|
||||||
|
} else if (accountOrCardNo.endsWith("00000000")) {
|
||||||
|
pyhsicCardNo = accountOrCardNo.substring(0, 8);
|
||||||
|
} else {
|
||||||
|
pyhsicCardNo = accountOrCardNo;
|
||||||
|
}
|
||||||
|
criteria.andCardidEqualTo(pyhsicCardNo).andCorpnoEqualTo(corpNo); // todo remove corpNo
|
||||||
List<IccardInfo> iccardInfos = iccardInfoMapper.selectByExample(example);
|
List<IccardInfo> iccardInfos = iccardInfoMapper.selectByExample(example);
|
||||||
if (iccardInfos.size() == 1) {
|
if (iccardInfos.size() == 1) {
|
||||||
IccardInfo iccardInfo = iccardInfos.get(0);
|
IccardInfo iccardInfo = iccardInfos.get(0);
|
||||||
@ -101,7 +109,7 @@ public class PileStartChargingDataLogic implements ServiceLogic {
|
|||||||
} else {
|
} else {
|
||||||
String internalError = r.getMsg();
|
String internalError = r.getMsg();
|
||||||
if (internalError.startsWith("0") || internalError.startsWith("1")) {
|
if (internalError.startsWith("0") || internalError.startsWith("1")) {
|
||||||
resultStr = internalError;
|
result = internalError;
|
||||||
} else {
|
} else {
|
||||||
log.error(internalError);
|
log.error(internalError);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user