From 195224382f16831de2dbb386d3a60f4369b6e3a0 Mon Sep 17 00:00:00 2001 From: "autumn.g@foxmail.com" Date: Sun, 25 Jun 2023 11:20:17 +0800 Subject: [PATCH] update --- .../src/main/java/com/jsowell/service/PileService.java | 2 -- .../jsowell/pile/service/impl/PileBasicInfoServiceImpl.java | 2 +- .../pile/service/impl/PileConnectorInfoServiceImpl.java | 4 +++- .../jsowell/thirdparty/amap/service/impl/AMapServiceImpl.java | 3 +-- 4 files changed, 5 insertions(+), 6 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 87d9611f4..580c6a864 100644 --- a/jsowell-admin/src/main/java/com/jsowell/service/PileService.java +++ b/jsowell-admin/src/main/java/com/jsowell/service/PileService.java @@ -207,8 +207,6 @@ public class PileService { throw new BusinessException(ReturnCodeEnum.CODE_STATION_IS_NOT_OPEN); } - // CompletableFuture pileStationVOFuture = CompletableFuture.supplyAsync(() -> pileStationInfoService.getStationInfo(pileInfoVO.getStationId())); - // 查询充电桩下枪口信息 CompletableFuture> connectorInfoListFuture = CompletableFuture.supplyAsync(() -> pileConnectorInfoService.selectConnectorInfoList(pileSn)); diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBasicInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBasicInfoServiceImpl.java index 9e58f1cc7..f65a9b9ec 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBasicInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBasicInfoServiceImpl.java @@ -119,7 +119,7 @@ public class PileBasicInfoServiceImpl implements IPileBasicInfoService { // 查数据库 pileBasicInfo = pileBasicInfoMapper.selectPileBasicInfoBySn(pileSn); if (pileBasicInfo != null) { - redisCache.setCacheObject(redisKey, pileBasicInfo, 5, TimeUnit.MINUTES); + redisCache.setCacheObject(redisKey, pileBasicInfo, 15, TimeUnit.MINUTES); } } return pileBasicInfo; diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileConnectorInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileConnectorInfoServiceImpl.java index fd1bf9038..50a9e2922 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileConnectorInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileConnectorInfoServiceImpl.java @@ -411,7 +411,9 @@ public class PileConnectorInfoServiceImpl implements IPileConnectorInfoService { @Override public List selectConnectorInfoList(String pileSn) { // 查询充电桩型号信息 - PileModelInfoVO pileModelInfoVO = pileModelInfoService.getPileModelInfoByPileSn(pileSn); + // PileModelInfoVO pileModelInfoVO = pileModelInfoService.getPileModelInfoByPileSn(pileSn); + PileBasicInfo pileBasicInfo = pileBasicInfoService.selectPileBasicInfoBySN(pileSn); + PileModelInfoVO pileModelInfoVO = pileModelInfoService.getPileModelInfoByModelId(pileBasicInfo.getModelId()); List connectorList = selectPileConnectorInfoList(pileSn); List connectorInfoList = Lists.newArrayList(); diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/service/impl/AMapServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/service/impl/AMapServiceImpl.java index 3845e08ef..7aa61e4fc 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/service/impl/AMapServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/service/impl/AMapServiceImpl.java @@ -311,7 +311,6 @@ public class AMapServiceImpl implements AMapService { info.setEquipmentID(pileBasicInfo.getSn()); info.setManufacturerName("举视"); // 查询型号 - // PileModelInfoVO modelInfo = pileModelInfoService.getPileModelInfoByPileSn(pileBasicInfo.getSn()); PileModelInfoVO modelInfo = pileModelInfoService.getPileModelInfoByModelId(pileBasicInfo.getModelId()); info.setEquipmentType(Integer.parseInt(modelInfo.getSpeedType())); @@ -351,7 +350,7 @@ public class AMapServiceImpl implements AMapService { aMapConnectorInfo.setVoltageLowerLimits(0); aMapConnectorInfo.setVoltageUpperLimits(Integer.parseInt(connectorInfoVO.getRatedVoltage())); aMapConnectorInfo.setCurrent(Integer.parseInt(connectorInfoVO.getRatedCurrent())); - aMapConnectorInfo.setPower(new BigDecimal(connectorInfoVO.getRatedPower()).setScale(1, BigDecimal.ROUND_HALF_UP)); + aMapConnectorInfo.setPower(new BigDecimal(connectorInfoVO.getRatedPower()).setScale(1, RoundingMode.HALF_UP)); aMapConnectorInfo.setNationalStandard(2); aMapConnectorInfo.setBrandDesc("举视");