mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 19:45:09 +08:00
update 对接lianlian平台
This commit is contained in:
@@ -922,7 +922,10 @@ public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
// 根据桩编号查询数据
|
||||
// String merchantId = StringUtils.substring(equipAuthSeq, 0, 9);
|
||||
String pileSn = StringUtils.substring(pileConnectorCode, 0, 14);
|
||||
vo.setSuccStat(1); // 1-失败 0-成功 默认失败
|
||||
// vo.setSuccStat(1); // 1-失败 0-成功 默认失败
|
||||
int succStat = 1;
|
||||
int failReason = 0;
|
||||
String failReasonMsg = "";
|
||||
PileBasicInfo pileBasicInfo = pileBasicInfoService.selectPileBasicInfoBySN(pileSn);
|
||||
if (pileBasicInfo != null) {
|
||||
// 查询当前枪口数据
|
||||
@@ -931,19 +934,23 @@ public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
|| StringUtils.equals(PileConnectorDataBaseStatusEnum.OCCUPIED_CHARGING.getValue(), String.valueOf(connectorInfo.getStatus()))
|
||||
|| StringUtils.equals(PileConnectorDataBaseStatusEnum.OCCUPIED_APPOINTMENT_LOCK.getValue(), String.valueOf(connectorInfo.getStatus()))
|
||||
) {
|
||||
vo.setSuccStat(0);
|
||||
vo.setFailReason(0);
|
||||
succStat = 0;
|
||||
failReason = 0;
|
||||
} else {
|
||||
vo.setSuccStat(1);
|
||||
vo.setFailReason(1); // 1- 此设备尚未插枪;
|
||||
succStat = 1;
|
||||
// 1- 此设备尚未插枪;
|
||||
failReason = 1;
|
||||
}
|
||||
vo.setFailReasonMsg("");
|
||||
vo.setEquipAuthSeq(equipAuthSeq);
|
||||
vo.setConnectorID(pileConnectorCode);
|
||||
} else {
|
||||
vo.setFailReason(2); // 设备检测失败
|
||||
vo.setFailReasonMsg("未查到该桩的数据");
|
||||
// 设备检测失败
|
||||
failReason = 2;
|
||||
failReasonMsg = "未查到该桩的数据";
|
||||
}
|
||||
vo.setSuccStat(succStat);
|
||||
vo.setFailReason(failReason); // 设备检测失败
|
||||
vo.setFailReasonMsg(failReasonMsg);
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(vo).getBytes(),
|
||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
|
||||
Reference in New Issue
Block a user