mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-23 16:49:49 +08:00
update 第三方平台查询站点信息接口只查推送的对应平台下的站点信息
This commit is contained in:
@@ -94,7 +94,7 @@ public class ZDLController extends BaseController {
|
|||||||
// 转换成相应对象
|
// 转换成相应对象
|
||||||
QueryStationInfoDTO queryStationInfoDTO = JSONObject.parseObject(dataStr, QueryStationInfoDTO.class);
|
QueryStationInfoDTO queryStationInfoDTO = JSONObject.parseObject(dataStr, QueryStationInfoDTO.class);
|
||||||
queryStationInfoDTO.setOperatorId(dto.getOperatorID());
|
queryStationInfoDTO.setOperatorId(dto.getOperatorID());
|
||||||
queryStationInfoDTO.setAddress("宁波");
|
queryStationInfoDTO.setThirdPlatformType(ThirdPlatformTypeEnum.ZHONG_DIAN_LIAN_PLATFORM.getTypeCode());
|
||||||
Map<String, String> map = zdlService.queryStationsInfo(queryStationInfoDTO);
|
Map<String, String> map = zdlService.queryStationsInfo(queryStationInfoDTO);
|
||||||
logger.info("中电联平台查询充电站信息 result:{}", JSON.toJSONString(map));
|
logger.info("中电联平台查询充电站信息 result:{}", JSON.toJSONString(map));
|
||||||
return CommonResult.success(0, "查询充电站信息成功!", map.get("Data"), map.get("Sig"));
|
return CommonResult.success(0, "查询充电站信息成功!", map.get("Data"), map.get("Sig"));
|
||||||
|
|||||||
@@ -31,9 +31,6 @@ public class XDTServiceImpl implements XDTService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ZDLService zdlService;
|
private ZDLService zdlService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ThirdPartyStationRelationService relationService;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private PileStationInfoService pileStationInfoService;
|
private PileStationInfoService pileStationInfoService;
|
||||||
|
|
||||||
@@ -75,16 +72,7 @@ public class XDTServiceImpl implements XDTService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> queryStationsInfo(QueryStationInfoDTO dto) {
|
public Map<String, String> queryStationsInfo(QueryStationInfoDTO dto) {
|
||||||
// 查询出要查询的充电站id并set进 dto 的stationIds
|
dto.setThirdPlatformType(ThirdPlatformTypeEnum.XIN_DIAN_TU.getTypeCode());
|
||||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
|
||||||
relation.setThirdPartyType(ThirdPlatformTypeEnum.XIN_DIAN_TU.getTypeCode());
|
|
||||||
List<ThirdPartyStationRelation> xdtList = relationService.selectThirdPartyStationRelationList(relation);
|
|
||||||
if (CollectionUtils.isNotEmpty(xdtList)) {
|
|
||||||
List<String> stationList = xdtList.stream()
|
|
||||||
.map(x -> String.valueOf(x.getStationId()))
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
dto.setStationIds(stationList);
|
|
||||||
}
|
|
||||||
return zdlService.queryStationsInfo(dto);
|
return zdlService.queryStationsInfo(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -155,16 +155,7 @@ public class YCBCServiceImpl implements YCBCService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> queryStationsInfo(QueryStationInfoDTO dto) {
|
public Map<String, String> queryStationsInfo(QueryStationInfoDTO dto) {
|
||||||
// 查询出要查询的充电站id并set进 dto 的stationIds
|
dto.setThirdPlatformType(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getTypeCode());
|
||||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
|
||||||
relation.setThirdPartyType(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getTypeCode());
|
|
||||||
List<ThirdPartyStationRelation> ycbcList = relationService.selectThirdPartyStationRelationList(relation);
|
|
||||||
if (CollectionUtils.isNotEmpty(ycbcList)) {
|
|
||||||
List<String> stationList = ycbcList.stream()
|
|
||||||
.map(x -> String.valueOf(x.getStationId()))
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
dto.setStationIds(stationList);
|
|
||||||
}
|
|
||||||
return zdlService.queryStationsInfo(dto);
|
return zdlService.queryStationsInfo(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 中电联 Service
|
* 中电联 Service
|
||||||
@@ -321,6 +322,17 @@ public class ZDLServiceImpl implements ZDLService {
|
|||||||
int pageNo = dto.getPageNo() == null ? 1 : dto.getPageNo();
|
int pageNo = dto.getPageNo() == null ? 1 : dto.getPageNo();
|
||||||
int pageSize = dto.getPageSize() == null ? 10 : dto.getPageSize();
|
int pageSize = dto.getPageSize() == null ? 10 : dto.getPageSize();
|
||||||
|
|
||||||
|
// 根据第三方平台类型查询出要查询的充电站id并set进 dto 的stationIds
|
||||||
|
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||||
|
relation.setThirdPartyType(dto.getThirdPlatformType());
|
||||||
|
List<ThirdPartyStationRelation> xdtList = thirdPartyStationRelationService.selectThirdPartyStationRelationList(relation);
|
||||||
|
if (CollectionUtils.isNotEmpty(xdtList)) {
|
||||||
|
List<String> stationList = xdtList.stream()
|
||||||
|
.map(x -> String.valueOf(x.getStationId()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
dto.setStationIds(stationList);
|
||||||
|
}
|
||||||
|
|
||||||
PageUtils.startPage(pageNo, pageSize);
|
PageUtils.startPage(pageNo, pageSize);
|
||||||
List<ThirdPartyStationInfoVO> stationInfos = pileStationInfoService.getStationInfosByThirdParty(dto);
|
List<ThirdPartyStationInfoVO> stationInfos = pileStationInfoService.getStationInfosByThirdParty(dto);
|
||||||
if (CollectionUtils.isEmpty(stationInfos)) {
|
if (CollectionUtils.isEmpty(stationInfos)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user