From ffcb73c24088b93282905ddcc436fc89a9c41186 Mon Sep 17 00:00:00 2001 From: Lemon Date: Wed, 22 Nov 2023 19:19:02 +0800 Subject: [PATCH] update --- .../java/com/jsowell/service/PileService.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/jsowell-admin/src/main/java/com/jsowell/service/PileService.java b/jsowell-admin/src/main/java/com/jsowell/service/PileService.java index 6f1035888..3da853897 100644 --- a/jsowell-admin/src/main/java/com/jsowell/service/PileService.java +++ b/jsowell-admin/src/main/java/com/jsowell/service/PileService.java @@ -191,11 +191,11 @@ public class PileService { } // 判断桩是否在线 - // boolean onLineStatus = pileConnectorInfoService.checkPileOffLine(pileInfoVO.getPileSn()); - // if (onLineStatus) { - // // true为离线 - // throw new BusinessException(ReturnCodeEnum.CODE_PILE_CONNECTOR_STATUS_ERROR); - // } + boolean onLineStatus = pileConnectorInfoService.checkPileOffLine(pileInfoVO.getPileSn()); + if (onLineStatus) { + // true为离线 + throw new BusinessException(ReturnCodeEnum.CODE_PILE_CONNECTOR_STATUS_ERROR); + } // 查询站点信息 PileStationVO stationInfo = pileStationInfoService.getStationInfo(pileInfoVO.getStationId()); @@ -246,9 +246,9 @@ public class PileService { return null; } // 枪口状态不为2:占用(未充电) - // if (!StringUtils.equals("2", pileConnectorDetailVO.getConnectorStatus())) { - // throw new BusinessException(ReturnCodeEnum.CODE_PILE_CONNECTOR_STATUS_ERROR); - // } + if (!StringUtils.equals("2", pileConnectorDetailVO.getConnectorStatus())) { + throw new BusinessException(ReturnCodeEnum.CODE_PILE_CONNECTOR_STATUS_ERROR); + } String pileSn = pileConnectorDetailVO.getPileSn(); PileConnectorVO resultVO = getPileDetailByPileSn(pileSn); List connectorInfoList = resultVO.getConnectorInfoList();