mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update 对接lianlian平台
This commit is contained in:
@@ -379,8 +379,6 @@ public class LianLianController extends BaseController {
|
||||
|
||||
// 查询配置信息
|
||||
ThirdPartyPlatformConfig platformConfig = thirdPartyPlatformConfigService.getInfoByOperatorId(dto.getOperatorID());
|
||||
String operatorSecret = platformConfig.getOperatorSecret();
|
||||
String dataString = dto.getData();
|
||||
String dataSecret = platformConfig.getDataSecret();
|
||||
String dataSecretIV = platformConfig.getDataSecretIv();
|
||||
|
||||
@@ -393,7 +391,6 @@ public class LianLianController extends BaseController {
|
||||
queryEquipmentDTO.setOperatorID(dto.getOperatorID());
|
||||
// Map<String, String> map = lianLianService.query_equip_auth(queryEquipmentDTO);
|
||||
Map<String, String> map = lianLianService.queryEquipAuth(queryEquipmentDTO);
|
||||
|
||||
return CommonResult.success(0, "请求设备认证成功!", map.get("Data"), map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.error("联联平台请求设备认证 error:", e);
|
||||
|
||||
@@ -464,9 +464,6 @@ public class MemberBasicInfoServiceImpl implements MemberBasicInfoService {
|
||||
MemberPlateNumberRelation memberPlateNumberRelation = new MemberPlateNumberRelation();
|
||||
memberPlateNumberRelation.setMemberId(memberId);
|
||||
List<MemberPlateNumberRelation> list = memberPlateNumberRelationMapper.selectMemberPlateNumberRelationList(memberPlateNumberRelation);
|
||||
// List<String> plateNumberList = list.stream()
|
||||
// .map(MemberPlateNumberRelation::getLicensePlateNumber)
|
||||
// .collect(Collectors.toList());
|
||||
List<String> plateNumberList = new ArrayList<>();
|
||||
List<String> vinCodeList = new ArrayList<>();
|
||||
for (MemberPlateNumberRelation relation : list) {
|
||||
|
||||
@@ -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