mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
将高德和第三方平台方法区分
This commit is contained in:
@@ -90,7 +90,7 @@ public class AMapServiceImpl implements AMapService {
|
||||
PageUtils.startPage(pageNo, pageSize);
|
||||
// 查询站点信息
|
||||
sw.start("查询站点信息");
|
||||
List<PileStationInfo> stationInfos = pileStationInfoService.getStationInfosByThirdParty();
|
||||
List<PileStationInfo> stationInfos = pileStationInfoService.getStationInfosByAmap();
|
||||
|
||||
PageInfo<PileStationInfo> pageInfo = new PageInfo<>(stationInfos);
|
||||
sw.stop();
|
||||
@@ -128,7 +128,7 @@ public class AMapServiceImpl implements AMapService {
|
||||
PageUtils.startPage(pageNo, pageSize);
|
||||
|
||||
// 第一次查询,得到站点
|
||||
List<PileStationInfo> stationInfos = pileStationInfoService.getStationInfosByThirdParty();
|
||||
List<PileStationInfo> stationInfos = pileStationInfoService.getStationInfosByAmap();
|
||||
PageInfo<PileStationInfo> pageInfo = new PageInfo<>(stationInfos);
|
||||
List<PileStationInfo> stationList = pageInfo.getList();
|
||||
if (CollectionUtils.isEmpty(stationList)) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -10,6 +10,7 @@ import com.jsowell.pile.domain.*;
|
||||
import com.jsowell.pile.dto.PushStationInfoDTO;
|
||||
import com.jsowell.pile.dto.QueryStationInfoDTO;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
|
||||
import com.jsowell.pile.vo.web.PileModelInfoVO;
|
||||
import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO;
|
||||
@@ -58,6 +59,9 @@ public class ZDLServiceImpl implements ZDLService {
|
||||
@Autowired
|
||||
private IPileModelInfoService pileModelInfoService;
|
||||
|
||||
@Autowired
|
||||
private IPileMerchantInfoService pileMerchantInfoService;
|
||||
|
||||
@Autowired
|
||||
private IPileConnectorInfoService pileConnectorInfoService;
|
||||
|
||||
@@ -105,11 +109,11 @@ public class ZDLServiceImpl implements ZDLService {
|
||||
String dataSecretIv = relationInfo.getDataSecretIv();
|
||||
String urlAddress = relationInfo.getUrlAddress();
|
||||
|
||||
// 组装联联平台所需要的数据格式
|
||||
// 组装中电联平台所需要的数据格式
|
||||
ZDLStationInfo info = ZDLStationInfo.builder()
|
||||
.stationId("ZDL" +dto.getStationId())
|
||||
.stationId(String.valueOf(dto.getStationId()))
|
||||
.operatorId(operatorId)
|
||||
.equipmentOwnerId(Constants.OPERATORID_JIANG_SU)
|
||||
// .equipmentOwnerId(Constants.OPERATORID_JIANG_SU)
|
||||
.stationName(pileStationInfo.getStationName())
|
||||
.countryCode(pileStationInfo.getCountryCode())
|
||||
.areaCode(pileStationInfo.getAreaCode())
|
||||
@@ -123,6 +127,14 @@ public class ZDLServiceImpl implements ZDLService {
|
||||
.construction(Integer.valueOf(pileStationInfo.getConstruction()))
|
||||
|
||||
.build();
|
||||
// 截取运营商组织机构代码(去除最后一位后的最后九位)
|
||||
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfo(String.valueOf(pileStationInfo.getMerchantId()));
|
||||
String organizationCode = merchantInfo.getOrganizationCode();
|
||||
if (organizationCode.length() == 18) {
|
||||
String equipmentOwnerId = StringUtils.substring(organizationCode, organizationCode.length() - 10, organizationCode.length() - 1);
|
||||
info.setEquipmentOwnerId(equipmentOwnerId);
|
||||
}
|
||||
|
||||
List<ZDLEquipmentInfo> pileList = getPileList(pileStationInfo);
|
||||
if (CollectionUtils.isNotEmpty(pileList)) {
|
||||
info.setEquipmentInfos(pileList); // 充电设备信息列表
|
||||
@@ -154,6 +166,12 @@ public class ZDLServiceImpl implements ZDLService {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String organizationCode = "91310120MAC13L2Q9P";
|
||||
String equipmentOwnerId = StringUtils.substring(organizationCode, organizationCode.length() - 10, organizationCode.length() - 1);
|
||||
System.out.println(equipmentOwnerId); // MAC13L2Q9
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询站点信息
|
||||
* @return
|
||||
|
||||
Reference in New Issue
Block a user