From f161fdce357c0f78d14083d999cd94ecf013d4af Mon Sep 17 00:00:00 2001 From: Lemon Date: Tue, 9 Jan 2024 13:46:08 +0800 Subject: [PATCH] =?UTF-8?q?bugfix=20=E6=96=B0=E7=94=B5=E9=80=94=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E6=9F=A5=E8=AF=A2=E7=AB=99=E7=82=B9=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=8F=AA=E8=83=BD=E6=9F=A5=E8=AF=A2=E5=88=B0?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E8=AF=A5=E5=B9=B3=E5=8F=B0=E7=9A=84=E7=AB=99?= =?UTF-8?q?=E7=82=B9=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/XDTServiceImpl.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/xindiantu/service/impl/XDTServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/xindiantu/service/impl/XDTServiceImpl.java index 2fd6d0dbc..9a56b8fc1 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/xindiantu/service/impl/XDTServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/xindiantu/service/impl/XDTServiceImpl.java @@ -1,18 +1,24 @@ package com.jsowell.thirdparty.xindiantu.service.impl; +import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum; +import com.jsowell.pile.domain.ThirdPartyStationRelation; import com.jsowell.pile.dto.QueryEquipChargeStatusDTO; import com.jsowell.pile.dto.QueryEquipmentDTO; import com.jsowell.pile.dto.QueryStartChargeDTO; import com.jsowell.pile.dto.QueryStationInfoDTO; +import com.jsowell.pile.service.ThirdPartyStationRelationService; import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO; import com.jsowell.thirdparty.xindiantu.service.XDTService; import com.jsowell.thirdparty.zhongdianlian.dto.ZDLGetTokenDTO; import com.jsowell.thirdparty.zhongdianlian.service.ZDLService; +import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.io.UnsupportedEncodingException; +import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * 新电途Service @@ -25,6 +31,9 @@ public class XDTServiceImpl implements XDTService { @Autowired private ZDLService zdlService; + @Autowired + private ThirdPartyStationRelationService relationService; + /** * 获取令牌 * @param dto @@ -57,6 +66,16 @@ public class XDTServiceImpl implements XDTService { */ @Override public Map queryStationsInfo(QueryStationInfoDTO dto) { + // 查询出要查询的充电站id并set进 dto 的stationIds + ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); + relation.setThirdPartyType(ThirdPlatformTypeEnum.XIN_DIAN_TU.getCode()); + List xdtList = relationService.selectThirdPartyStationRelationList(relation); + if (CollectionUtils.isNotEmpty(xdtList)) { + List stationList = xdtList.stream() + .map(x -> String.valueOf(x.getStationId())) + .collect(Collectors.toList()); + dto.setStationIds(stationList); + } return zdlService.queryStationsInfo(dto); }