mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
Merge branch 'dev' of http://192.168.2.46:8099/jsowell/jsowell-charger-web into dev
This commit is contained in:
@@ -35,4 +35,9 @@ public class QueryConnectorInfoDTO {
|
||||
* 每页条数
|
||||
*/
|
||||
private int pageSize;
|
||||
|
||||
/**
|
||||
* 枪口编号
|
||||
*/
|
||||
private String pileConnectorCode;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.jsowell.pile.mapper;
|
||||
|
||||
import com.jsowell.pile.domain.PileConnectorInfo;
|
||||
import com.jsowell.pile.dto.QueryConnectorDTO;
|
||||
import com.jsowell.pile.dto.business.QueryConnectorInfoDTO;
|
||||
import com.jsowell.pile.vo.base.ConnectorInfoVO;
|
||||
import com.jsowell.pile.vo.web.PileConnectorInfoVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -120,4 +121,11 @@ public interface PileConnectorInfoMapper {
|
||||
* @return
|
||||
*/
|
||||
List<PileConnectorInfo> getConnectorStatus(@Param("pileConnectorCodeList") List<String> pileConnectorCodeList);
|
||||
|
||||
/**
|
||||
* 通过查询参数查询枪口信息
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
PileConnectorInfoVO getConnectorInfoByParams(@Param("dto") QueryConnectorInfoDTO dto);
|
||||
}
|
||||
|
||||
@@ -143,4 +143,18 @@ public interface PileConnectorInfoService {
|
||||
* 通过站点id和枪口状态查询枪口列表
|
||||
*/
|
||||
BusinessConnectorInfoVO getConnectorListByStationAndStatus(QueryConnectorInfoDTO dto);
|
||||
|
||||
/**
|
||||
* 通过查询参数查询枪口信息
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
PileConnectorInfoVO getConnectorInfoByParams(QueryConnectorInfoDTO dto);
|
||||
|
||||
/**
|
||||
* 运营端小程序搜索枪口信息接口
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
public PileConnectorInfoVO BusinessSearchConnectorInfo(QueryConnectorInfoDTO dto);
|
||||
}
|
||||
|
||||
@@ -876,8 +876,51 @@ public class PileConnectorInfoServiceImpl implements PileConnectorInfoService {
|
||||
.filter(x -> x.getStatus() == Integer.parseInt(connectorStatus))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
vo.setPileConnectorInfoVOList(pileConnectorInfoVOList);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过查询参数查询枪口信息
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public PileConnectorInfoVO getConnectorInfoByParams(QueryConnectorInfoDTO dto) {
|
||||
|
||||
return pileConnectorInfoMapper.getConnectorInfoByParams(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 运营端小程序搜索枪口信息接口
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public PileConnectorInfoVO BusinessSearchConnectorInfo(QueryConnectorInfoDTO dto) {
|
||||
PileConnectorInfoVO vo = new PileConnectorInfoVO();
|
||||
String stationId = dto.getStationId();
|
||||
String pileConnectorCode = dto.getPileConnectorCode();
|
||||
vo.setStationId(stationId);
|
||||
vo.setPileConnectorCode(pileConnectorCode);
|
||||
// 通过站点id和枪口号查询枪口信息
|
||||
QueryConnectorInfoDTO queryDTO = QueryConnectorInfoDTO.builder()
|
||||
.stationId(stationId)
|
||||
.pileConnectorCode(pileConnectorCode)
|
||||
.build();
|
||||
PileConnectorInfoVO connectorInfoVO = getConnectorInfoByParams(queryDTO);
|
||||
if (connectorInfoVO == null) {
|
||||
return vo;
|
||||
}
|
||||
// 如果状态为充电中,将SOC、已充时长、剩余时长返回
|
||||
if (StringUtils.equals(String.valueOf(connectorInfoVO.getStatus()), PileConnectorDataBaseStatusEnum.OCCUPIED_CHARGING.getValue())) {
|
||||
// 当枪口状态为充电中时,再去查询实时数据等信息
|
||||
OrderBasicInfo order = orderBasicInfoService.queryChargingByPileConnectorCode(pileConnectorCode);
|
||||
if (order != null) {
|
||||
vo.setOrderCode(order.getOrderCode());
|
||||
}
|
||||
queryRealTimeData(Lists.newArrayList(vo));
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user