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:
@@ -186,6 +186,50 @@ public class PileService {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_STATION_IS_NOT_OPEN);
|
||||
}
|
||||
|
||||
List<ConnectorInfoVO> connectorInfoList = pileConnectorInfoService.selectConnectorInfoList(pileSn);
|
||||
List<BillingPriceVO> billingPriceVOS = pileBillingTemplateService.queryBillingPrice(pileInfoVO.getStationId());
|
||||
MerchantInfoVO merchantInfoVO = pileMerchantInfoService.getMerchantInfoVO(pileInfoVO.getMerchantId());
|
||||
|
||||
vo = AppletPileDetailVO.builder()
|
||||
.pileInfo(pileInfoVO)
|
||||
.connectorInfoList(connectorInfoList)
|
||||
.merchantInfo(merchantInfoVO)
|
||||
.stationInfo(stationInfo)
|
||||
.billingPriceList(billingPriceVOS)
|
||||
.build();
|
||||
return vo;
|
||||
}
|
||||
|
||||
public AppletPileDetailVO getPileDetailByPileSnOld(String param) throws Exception {
|
||||
AppletPileDetailVO vo = null;
|
||||
log.info("查询充电枪口详情-getPileDetailByPileSn, param:{}", param);
|
||||
if (StringUtils.isBlank(param)) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
||||
}
|
||||
String pileSn = YKCUtils.getPileSn(param);
|
||||
log.info("查询充电枪口详情-getPileDetailByPileSn, pileSn:{}", pileSn);
|
||||
// 查询充电桩信息
|
||||
PileInfoVO pileInfoVO = pileBasicInfoService.selectPileInfoBySn(pileSn);
|
||||
log.info("查询充电枪口详情-pileInfoVO:{}", JSON.toJSONString(pileInfoVO));
|
||||
if (pileInfoVO == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 判断桩是否在线
|
||||
boolean onLineStatus = pileConnectorInfoService.checkPileOffLine(pileInfoVO.getPileSn());
|
||||
log.info("查询充电枪口详情-判断桩是否在线:{}, onLineStatus:{}", pileInfoVO.getPileSn(), onLineStatus);
|
||||
if (onLineStatus) {
|
||||
// true为离线
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_PILE_CONNECTOR_STATUS_OFF_LINE);
|
||||
}
|
||||
|
||||
// 查询站点信息
|
||||
PileStationVO stationInfo = pileStationInfoService.getStationInfo(pileInfoVO.getStationId());
|
||||
log.info("查询充电枪口详情-getStationInfo:{}, onLineStatus:{}", pileInfoVO.getStationId(), JSON.toJSONString(stationInfo));
|
||||
if (stationInfo == null || StringUtils.equals(stationInfo.getOpenFlag(), Constants.ZERO)) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_STATION_IS_NOT_OPEN);
|
||||
}
|
||||
|
||||
// 查询充电桩下枪口信息
|
||||
CompletableFuture<List<ConnectorInfoVO>> connectorInfoListFuture = CompletableFuture.supplyAsync(() -> pileConnectorInfoService.selectConnectorInfoList(pileSn));
|
||||
log.info("查询充电枪口详情-supplyAsync-selectConnectorInfoList:{}", connectorInfoListFuture);
|
||||
|
||||
Reference in New Issue
Block a user