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