mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update 查询站点枪口列表 入参stationId ----> merchantId
This commit is contained in:
@@ -5,6 +5,8 @@ import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 运营端小程序查询枪口信息DTO
|
||||
*
|
||||
@@ -40,4 +42,14 @@ public class QueryConnectorInfoDTO {
|
||||
* 枪口编号
|
||||
*/
|
||||
private String pileConnectorCode;
|
||||
|
||||
/**
|
||||
* 站点Id List
|
||||
*/
|
||||
private List<String> stationIds;
|
||||
|
||||
/**
|
||||
* 运营商id
|
||||
*/
|
||||
private String merchantId;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.jsowell.common.util.spring.SpringUtils;
|
||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||
import com.jsowell.pile.domain.PileBasicInfo;
|
||||
import com.jsowell.pile.domain.PileConnectorInfo;
|
||||
import com.jsowell.pile.domain.PileStationInfo;
|
||||
import com.jsowell.pile.dto.QueryConnectorDTO;
|
||||
import com.jsowell.pile.dto.QueryConnectorListDTO;
|
||||
import com.jsowell.pile.dto.UpdateConnectorParkNoDTO;
|
||||
@@ -1056,15 +1057,30 @@ public class PileConnectorInfoServiceImpl implements PileConnectorInfoService {
|
||||
*/
|
||||
@Override
|
||||
public BusinessConnectorInfoVO getConnectorListByStationAndStatus(QueryConnectorInfoDTO dto) {
|
||||
String stationId = dto.getStationId();
|
||||
// String stationId = dto.getStationId();
|
||||
String merchantId = dto.getMerchantId();
|
||||
// List<String> stationIds = dto.getStationIds();
|
||||
String connectorStatus = dto.getConnectorStatus();
|
||||
int pageNum = dto.getPageNum();
|
||||
int pageSize = dto.getPageSize();
|
||||
BusinessConnectorInfoVO vo = new BusinessConnectorInfoVO();
|
||||
// 根据站点id查询枪口列表(有缓存)
|
||||
List<ConnectorInfoVO> uniAppConnectorList = getUniAppConnectorList(Long.parseLong(stationId));
|
||||
// 通过merchantId查询站点ids
|
||||
List<PileStationInfo> pileStationInfos = pileStationInfoService.selectStationListByMerchantIdWithAuth(Long.parseLong(merchantId));
|
||||
// 收集站点ids
|
||||
List<Long> longStationIds = pileStationInfos.stream()
|
||||
.map(PileStationInfo::getId)
|
||||
.collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(longStationIds)) {
|
||||
return vo;
|
||||
}
|
||||
List<String> StationIds = longStationIds.stream()
|
||||
.map(String::valueOf) // 或 s -> Long.parseLong(s)
|
||||
.collect(Collectors.toList());
|
||||
// 根据站点ids查询枪口列表(有缓存)
|
||||
// List<ConnectorInfoVO> uniAppConnectorList = getUniAppConnectorList(Long.parseLong(stationId));
|
||||
List<ConnectorInfoVO> connectorInfoVOS = batchSelectConnectorList(StationIds);
|
||||
// 筛选出枪口编号
|
||||
List<String> pileConnectorCodeList = uniAppConnectorList.stream()
|
||||
List<String> pileConnectorCodeList = connectorInfoVOS.stream()
|
||||
.map(ConnectorInfoVO::getPileConnectorCode)
|
||||
.collect(Collectors.toList());
|
||||
// 批量获取某状态的枪口数量
|
||||
@@ -1086,7 +1102,7 @@ public class PileConnectorInfoServiceImpl implements PileConnectorInfoService {
|
||||
QueryConnectorListDTO queryConnectorListDTO = QueryConnectorListDTO.builder()
|
||||
.pageNum(pageNum)
|
||||
.pageSize(pageSize)
|
||||
.stationIdList(Lists.newArrayList(Long.parseLong(stationId)))
|
||||
.stationIdList(longStationIds)
|
||||
.build();
|
||||
List<PileConnectorInfoVO> pileConnectorInfoVOList = getConnectorInfoListByParams(queryConnectorListDTO);
|
||||
if (connectorStatus != null) {
|
||||
|
||||
Reference in New Issue
Block a user