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 74a2e4152..96a0b4490 100644 --- a/jsowell-admin/src/main/java/com/jsowell/service/PileService.java +++ b/jsowell-admin/src/main/java/com/jsowell/service/PileService.java @@ -232,11 +232,23 @@ public class PileService { return vo; } + /** + * 获取枪口详情信息 + * 仅小程序扫码调用 + * @param pileConnectorCode + * @return + * @throws ExecutionException + * @throws InterruptedException + */ public PileConnectorVO getConnectorDetail(String pileConnectorCode) throws ExecutionException, InterruptedException { PileConnectorDetailVO pileConnectorDetailVO = queryPileConnectorDetail(pileConnectorCode); if (pileConnectorDetailVO == null) { return null; } + // 枪口状态不为2:占用(未充电) + 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();