mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
打印日志
This commit is contained in:
@@ -133,6 +133,7 @@ public class JumpController extends BaseController {
|
||||
}
|
||||
|
||||
AppletPileDetailVO vo = pileService.getConnectorDetail(pileConnectorCode);
|
||||
logger.info("查询充电枪口详情, pileConnectorCode:{}, vo:{}", pileConnectorCode, JSON.toJSONString(vo));
|
||||
if (StringUtils.isNotBlank(memberId)) {
|
||||
addMember2MemberGroup(memberId, vo);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StopWatch;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
@@ -158,20 +157,22 @@ public class PileService {
|
||||
* 前端扫码跳转接口
|
||||
*/
|
||||
public AppletPileDetailVO getPileDetailByPileSn(String param) throws Exception{
|
||||
StopWatch stopWatch = new StopWatch("前端扫码跳转接口");
|
||||
stopWatch.start("getPileDetailByPileSn: " + param);
|
||||
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);
|
||||
@@ -179,6 +180,7 @@ public class PileService {
|
||||
|
||||
// 查询站点信息
|
||||
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);
|
||||
}
|
||||
@@ -209,7 +211,6 @@ public class PileService {
|
||||
.stationInfo(stationInfo)
|
||||
.billingPriceList(billingPriceVOS)
|
||||
.build();
|
||||
stopWatch.stop();
|
||||
return vo;
|
||||
}
|
||||
|
||||
@@ -222,8 +223,9 @@ public class PileService {
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public AppletPileDetailVO getConnectorDetail(String pileConnectorCode) throws Exception {
|
||||
log.info("查询充电枪口详情, pileConnectorCode:{}", pileConnectorCode);
|
||||
PileConnectorDetailVO pileConnectorDetailVO = queryPileConnectorDetail(pileConnectorCode);
|
||||
log.info("查询枪口信息, pileConnectorCode:{}, pileConnectorDetailVO:{}", pileConnectorCode, JSON.toJSONString(pileConnectorDetailVO));
|
||||
log.info("查询充电枪口详情, pileConnectorDetailVO:{}", JSON.toJSONString(pileConnectorDetailVO));
|
||||
if (pileConnectorDetailVO == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -236,7 +238,7 @@ public class PileService {
|
||||
}
|
||||
String pileSn = pileConnectorDetailVO.getPileSn();
|
||||
AppletPileDetailVO resultVO = getPileDetailByPileSn(pileSn);
|
||||
log.info("getConnectorDetail, pileSn:{}, pileConnectorDetailVO:{}, resultVO:{}", pileSn, JSON.toJSONString(pileConnectorDetailVO), JSON.toJSONString(resultVO));
|
||||
log.info("查询充电枪口详情getConnectorDetail, pileSn:{}, pileConnectorDetailVO:{}, resultVO:{}", pileSn, JSON.toJSONString(pileConnectorDetailVO), JSON.toJSONString(resultVO));
|
||||
List<ConnectorInfoVO> connectorInfoList = resultVO.getConnectorInfoList();
|
||||
if (connectorInfoList.size() > 1 && !StringUtils.equals(pileConnectorDetailVO.getChargePortType(), "3")) {
|
||||
List<ConnectorInfoVO> list = Lists.newArrayList();
|
||||
|
||||
Reference in New Issue
Block a user