From 1eea5b1bdc726d4b752339b1657e229687744717 Mon Sep 17 00:00:00 2001 From: Lemon Date: Thu, 19 Dec 2024 13:52:41 +0800 Subject: [PATCH] =?UTF-8?q?update=20=20=E8=B4=B5=E5=B7=9E=E7=9C=81?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/thirdparty/GuiZhouPlatformController.java | 8 ++++---- .../pile/service/impl/PileBasicInfoServiceImpl.java | 3 +++ .../service/impl/GuiZhouPlatformServiceImpl.java | 12 ++++++++---- .../platform/util/ThirdPartyPlatformUtils.java | 1 + 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/GuiZhouPlatformController.java b/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/GuiZhouPlatformController.java index a084d3f2c..71f9a9084 100644 --- a/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/GuiZhouPlatformController.java +++ b/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/GuiZhouPlatformController.java @@ -42,7 +42,7 @@ public class GuiZhouPlatformController extends ThirdPartyBaseController { try { Map map = platformLogic.queryToken(dto); logger.info("{}-请求令牌, params:{}, result:{}", platformName, JSON.toJSONString(dto), JSON.toJSONString(map)); - return CommonResult.success(0, "请求令牌成功!", map.get("Data"), map.get("Sig")); + return CommonResult.success(Integer.parseInt(map.get("Ret")), map.get("Msg"), map.get("Data"), map.get("Sig")); } catch (Exception e) { logger.error("{}-获取token接口, 异常, params:{}", platformName, JSON.toJSONString(dto), e); return CommonResult.failed("获取token发生异常"); @@ -76,7 +76,7 @@ public class GuiZhouPlatformController extends ThirdPartyBaseController { // 执行逻辑 Map map = platformLogic.queryOperatorInfo(paramDTO); logger.info("{}-查询运营商信息 result:{}", platformName, JSON.toJSONString(map)); - return CommonResult.success(0, "操作成功!", map.get("Data"), map.get("Sig")); + return CommonResult.success(Integer.parseInt(map.get("Ret")), map.get("Msg"), map.get("Data"), map.get("Sig")); } catch (BusinessException e) { return CommonResult.failed(Integer.parseInt(e.getCode()), e.getMessage()); } catch (Exception e) { @@ -111,7 +111,7 @@ public class GuiZhouPlatformController extends ThirdPartyBaseController { // 执行逻辑 Map map = platformLogic.queryStationsInfo(queryStationInfoDTO); - return CommonResult.success(0, "查询充电站信息成功!", map.get("Data"), map.get("Sig")); + return CommonResult.success(Integer.parseInt(map.get("Ret")), map.get("Msg"), map.get("Data"), map.get("Sig")); } catch (Exception e) { logger.info("{}-查询充电站信息 error:", platformName, e); } @@ -144,7 +144,7 @@ public class GuiZhouPlatformController extends ThirdPartyBaseController { // 执行逻辑 Map map = platformLogic.queryStationStatus(queryStationInfoDTO); - return CommonResult.success(0, "查询充电站状态信息成功!", map.get("Data"), map.get("Sig")); + return CommonResult.success(Integer.parseInt(map.get("Ret")), map.get("Msg"), map.get("Data"), map.get("Sig")); } catch (Exception e) { logger.error("{}-查询充电站状态信息 error:", platformName, e); } 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 09f4abbe5..438e8f2a6 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 @@ -1240,6 +1240,9 @@ public class PileBasicInfoServiceImpl implements PileBasicInfoService { equipmentInfo.setProductionDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, pileBasicInfo.getCreateTime())); PileModelInfoVO modelInfo = pileModelInfoService.getPileModelInfoByPileSn(pileSn); + if (StringUtils.isBlank(modelInfo.getSpeedType())) { + continue; + } equipmentInfo.setEquipmentType(Integer.valueOf(modelInfo.getSpeedType())); equipmentInfo.setEquipmentModel(modelInfo.getModelName()); diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/GuiZhouPlatformServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/GuiZhouPlatformServiceImpl.java index cd32e1d25..e47250562 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/GuiZhouPlatformServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/GuiZhouPlatformServiceImpl.java @@ -159,7 +159,8 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService { vo.setFailReason(failReason); vo.setSuccStat(succStat); - Map resultMap = ThirdPartyPlatformUtils.generateResultMap(vo, thirdPartySecretInfoVO); + Map resultMap = ThirdPartyPlatformUtils.generateResultMapV2(vo, thirdPartySecretInfoVO.getOurDataSecret(), + thirdPartySecretInfoVO.getOurDataSecretIv(), thirdPartySecretInfoVO.getTheirSigSecret()); return resultMap; } @@ -204,7 +205,8 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService { map.put("ItemSize", pageInfo.getTotal()); map.put("OperatorInfos", operatorInfos); - Map resultMap = ThirdPartyPlatformUtils.generateResultMap(map, thirdPartySecretInfoVO); + Map resultMap = ThirdPartyPlatformUtils.generateResultMapV2(map, thirdPartySecretInfoVO.getOurDataSecret(), + thirdPartySecretInfoVO.getOurDataSecretIv(), thirdPartySecretInfoVO.getTheirSigSecret()); return resultMap; } @@ -297,7 +299,8 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService { map.put("PageCount", pageInfo.getPages()); map.put("ItemSize", pageInfo.getTotal()); map.put("StationInfos", resultList); - Map resultMap = ThirdPartyPlatformUtils.generateResultMap(map, thirdPartySecretInfoVO); + Map resultMap = ThirdPartyPlatformUtils.generateResultMapV2(map, thirdPartySecretInfoVO.getOurDataSecret(), + thirdPartySecretInfoVO.getOurDataSecretIv(), thirdPartySecretInfoVO.getTheirSigSecret()); return resultMap; } @@ -443,7 +446,8 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService { Map map = new LinkedHashMap<>(); map.put("StationStatusInfos", stationStatusInfos); - Map resultMap = ThirdPartyPlatformUtils.generateResultMap(map, thirdPartySecretInfoVO); + Map resultMap = ThirdPartyPlatformUtils.generateResultMapV2(map, thirdPartySecretInfoVO.getOurDataSecret(), + thirdPartySecretInfoVO.getOurDataSecretIv(), thirdPartySecretInfoVO.getTheirSigSecret()); return resultMap; } diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/util/ThirdPartyPlatformUtils.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/util/ThirdPartyPlatformUtils.java index 4058da38f..aa40616ef 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/util/ThirdPartyPlatformUtils.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/util/ThirdPartyPlatformUtils.java @@ -5,6 +5,7 @@ import com.google.common.collect.Maps; import com.jsowell.common.constant.Constants; import com.jsowell.common.util.StringUtils; import com.jsowell.pile.domain.ThirdPartyPlatformConfig; +import com.jsowell.pile.thirdparty.CommonParamsDTO; import com.jsowell.pile.vo.ThirdPartySecretInfoVO; import org.springframework.stereotype.Component;