mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update 电单车
This commit is contained in:
@@ -2,6 +2,7 @@ package com.jsowell.pile.service.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.jsowell.common.YouDianUtils;
|
||||
import com.jsowell.common.constant.CacheConstants;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
|
||||
@@ -426,7 +427,7 @@ public class PileBasicInfoServiceImpl implements PileBasicInfoService {
|
||||
// 获取桩状态
|
||||
Map<String, String> pileStatusMap = pileConnectorInfoService.getPileStatus(Lists.newArrayList(pileInfoVO.getPileSn()));
|
||||
pileInfoVO.setStatus(pileStatusMap.get(pileInfoVO.getPileSn()));
|
||||
String pileQrCodeUrl = getPileQrCodeUrl(pileInfoVO.getPileSn());
|
||||
String pileQrCodeUrl = getPileQrCodeUrl(pileInfoVO.getPileSn(), pileInfoVO.getChargePortType());
|
||||
pileInfoVO.setQrCodeURL(pileQrCodeUrl);
|
||||
// 设备型号
|
||||
PileModelInfo pileModelInfo = pileModelInfoService.selectPileModelInfoById(Long.parseLong(pileInfoVO.getModelId()));
|
||||
@@ -445,7 +446,7 @@ public class PileBasicInfoServiceImpl implements PileBasicInfoService {
|
||||
// 获取桩状态
|
||||
Map<String, String> pileStatusMap = pileConnectorInfoService.getPileStatus(Lists.newArrayList(pileInfoVO.getPileSn()));
|
||||
pileInfoVO.setStatus(pileStatusMap.get(pileInfoVO.getPileSn()));
|
||||
String pileQrCodeUrl = getPileQrCodeUrl(pileInfoVO.getPileSn());
|
||||
String pileQrCodeUrl = getPileQrCodeUrl(pileInfoVO.getPileSn(), pileInfoVO.getChargePortType());
|
||||
pileInfoVO.setQrCodeURL(pileQrCodeUrl);
|
||||
// 设备型号
|
||||
PileModelInfo pileModelInfo = pileModelInfoService.selectPileModelInfoById(Long.parseLong(pileInfoVO.getModelId()));
|
||||
@@ -667,6 +668,10 @@ public class PileBasicInfoServiceImpl implements PileBasicInfoService {
|
||||
*/
|
||||
@Override
|
||||
public String getPileQrCodeUrl(String pileSn) {
|
||||
return getPileQrCodeUrl(pileSn, "");
|
||||
}
|
||||
|
||||
public String getPileQrCodeUrl(String pileSn, String chargePortType) {
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append(BASE_URL_PREFIX);
|
||||
stringBuilder.append("/app-xcx-h5/pile/pileDetail/");
|
||||
@@ -674,6 +679,9 @@ public class PileBasicInfoServiceImpl implements PileBasicInfoService {
|
||||
if (!stringBuilder.toString().endsWith("/")) {
|
||||
stringBuilder.append("/");
|
||||
}
|
||||
if (StringUtils.equals(chargePortType, "3")) {
|
||||
pileSn = YouDianUtils.getPhysicalIdHEXStr(Integer.parseInt(pileSn));
|
||||
}
|
||||
stringBuilder.append(pileSn);
|
||||
}
|
||||
return stringBuilder.toString();
|
||||
|
||||
Reference in New Issue
Block a user