From 11246b0496c18a76951cf757a82a55a368ef73be Mon Sep 17 00:00:00 2001 From: Lemon Date: Thu, 14 Sep 2023 08:40:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=AB=E6=8F=8F=E6=9E=AA=E5=8F=A3=E4=BA=8C?= =?UTF-8?q?=E7=BB=B4=E7=A0=81=E5=88=A4=E6=96=AD=E6=9E=AA=E5=8F=A3=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=98=AF=E5=90=A6=E6=8F=92=E6=9E=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/jsowell/service/PileService.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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();