ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TChargingPileController.java
@@ -270,7 +270,8 @@ TChargingGun tChargingGun = chargingGunService.getOne(new LambdaQueryWrapper<TChargingGun>().eq(TChargingGun::getFullNumber, (pile_code + gun_code)).eq(TChargingGun::getDelFlag, 0)); if(null != tChargingGun){ redisTemplate.opsForHash().put("charging_gun_online", tChargingGun.getFullNumber(), System.currentTimeMillis()); //上传成都监管 chengDuJianGuanClient.notificationStationStatus(tChargingGun.getId()); TChargingPile chargingPile = chargingPileService.getById(tChargingGun.getChargingPileId()); //枪处于离线或者故障,返回状态为正常,则修改其状态 if(0 == status && tChargingGun.getStatus() != 2){ @@ -428,7 +429,6 @@ if(200 != r.getCode()){ log.error(r.getMsg()); } chengDuJianGuanClient.notificationStationStatus(chargingGun.getId()); } } ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/SiteServiceImpl.java
@@ -210,7 +210,8 @@ } site.setMark(0); this.save(site); //推送成都监管 chengDuJianGuanClient.notificationStationInfo(site.getId()); if(StringUtils.isNotEmpty(site.getSerAreaCode())){ ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(1, 1, 0L, TimeUnit.SECONDS, new LinkedBlockingDeque<>()); threadPoolExecutor.execute(()->{ @@ -233,9 +234,6 @@ if(200 != r.getCode()){ System.out.println(r.getMsg()); } //推送成都监管 chengDuJianGuanClient.notificationStationInfo(site.getId()); }); } return AjaxResult.success(); @@ -423,6 +421,8 @@ this.updateById(site); tcecClient.superviseNotificationStationInfo(site.getId()); //推送成都监管 chengDuJianGuanClient.notificationStationInfo(site.getId()); if(StringUtils.isNotEmpty(site.getSerAreaCode())){ ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(1, 1, 0L, TimeUnit.SECONDS, new LinkedBlockingDeque<>()); threadPoolExecutor.execute(()->{ @@ -445,8 +445,6 @@ if(200 != r.getCode()){ System.out.println(r.getMsg()); } //推送成都监管 chengDuJianGuanClient.notificationStationInfo(site.getId()); }); } return AjaxResult.success(); ruoyi-service/ruoyi-jianguan/src/main/java/com/ruoyi/jianguan/chengdujianguan/ChengDuJianGuanController.java
@@ -190,7 +190,12 @@ for (TChargingPile tChargingPile : tChargingPiles) { CDEquipmentInfo cdEquipmentInfo = new CDEquipmentInfo(); cdEquipmentInfo.setEquipmentID(tChargingPile.getCode()); cdEquipmentInfo.setManufacturerID(tChargingPile.getManufacturerCode()); if(StringUtils.isNotEmpty(tChargingPile.getManufacturerCode())){ String substring = tChargingPile.getManufacturerCode().substring(8, 17); cdEquipmentInfo.setManufacturerID(substring); }else{ cdEquipmentInfo.setManufacturerID(""); } cdEquipmentInfo.setManufacturerName(tChargingPile.getManufacturer()); cdEquipmentInfo.setEquipmentModel(tChargingPile.getEquipmentType()); cdEquipmentInfo.setEquipmentProductCode(tChargingPile.getEquipmentProductCode()); @@ -236,8 +241,16 @@ cdEquipmentInfo.setEquipmentPurpose(tChargingPile.getEquipmentPurpose()); cdEquipmentInfo.setEquipmentPower(tChargingPile.getRatedPower()); cdEquipmentInfo.setNewNationalStandard(tChargingPile.getNewNationalStandard()); cdEquipmentInfo.setEquipmentLng(new BigDecimal(tChargingPile.getEquipmentLng()).setScale(6, RoundingMode.HALF_EVEN)); cdEquipmentInfo.setEquipmentLat(new BigDecimal(tChargingPile.getEquipmentLat()).setScale(6, RoundingMode.HALF_EVEN)); if(null != tChargingPile.getEquipmentLng()){ cdEquipmentInfo.setEquipmentLng(new BigDecimal(tChargingPile.getEquipmentLng()).setScale(6, RoundingMode.HALF_EVEN)); }else{ cdEquipmentInfo.setEquipmentLng(BigDecimal.ZERO.setScale(6, RoundingMode.HALF_EVEN)); } if(null != tChargingPile.getEquipmentLat()){ cdEquipmentInfo.setEquipmentLat(new BigDecimal(tChargingPile.getEquipmentLat()).setScale(6, RoundingMode.HALF_EVEN)); }else{ cdEquipmentInfo.setEquipmentLat(BigDecimal.ZERO.setScale(6, RoundingMode.HALF_EVEN)); } cdEquipmentInfo.setVinFlag(tChargingPile.getVinFlag()); cdEquipmentInfo.setConnectorInfos(buildConnectorInfo(tChargingPile.getId(), chargingGunList)); equipmentInfos.add(cdEquipmentInfo); @@ -277,7 +290,7 @@ connectorInfo.setVoltageLowerLimits(chargingGun.getLowerLimitOfRatedVoltage()); connectorInfo.setCurrent(chargingGun.getRatedCurrent().intValue()); connectorInfo.setPower(chargingGun.getRatedPower()); connectorInfo.setNationalStandard(Integer.valueOf(chargingGun.getNationalStandard())); connectorInfo.setNationalStandard(null != chargingGun.getNationalStandard() ? Integer.valueOf(chargingGun.getNationalStandard()) : 2); connectorInfo.setAuxPower(chargingGun.getAuxPower()); connectorInfo.setOpreateStatus(chargingGun.getParkingStatus()); connectorInfo.setParkNo(""); ruoyi-service/ruoyi-jianguan/src/main/java/com/ruoyi/jianguan/chengdujianguan/ChengDuJianGuanUtil.java
@@ -276,7 +276,6 @@ log.info("【成都监管-获取token】响应参数明文:" + dataStr); JSONObject jsonObject = JSON.parseObject(dataStr); Map<String, String> resultMap = (Map<String, String>) JSON.parse(dataStr); String accessToken = jsonObject.getString("AccessToken"); Long tokenAvailableTime = jsonObject.getLong("TokenAvailableTime"); redisTemplate.opsForValue().set("LLTOKEN", accessToken, Long.valueOf(tokenAvailableTime), TimeUnit.SECONDS); @@ -319,6 +318,11 @@ String response = HttpRequestUtil.httpPost(requestUrl + "/notification_stationInfo", notifyStartResult, "Bearer " + getToken(redisTemplate)); log.info("【成都监管-充电站信息变化推送】响应参数密文:" + response); EDIMessagePack result = JacksonUtils.toObj(response, EDIMessagePack.class); if(4002 == result.getRet()){ redisTemplate.delete("LLTOKEN"); notificationStationInfo(redisTemplate, stationInfo); return; } if(0 != result.getRet()){ log.info("【成都监管-充电站信息变化推送】失败:", result.getMsg()); return; @@ -365,6 +369,11 @@ String response = HttpRequestUtil.httpPost(requestUrl + "/notification_stationFee", notifyStartResult, "Bearer " + getToken(redisTemplate)); log.info("【成都监管-站点费率变化推送】响应参数密文:" + response); EDIMessagePack result = JacksonUtils.toObj(response, EDIMessagePack.class); if(4002 == result.getRet()){ redisTemplate.delete("LLTOKEN"); notificationStationFee(redisTemplate, notificationStationFee); return; } if(0 != result.getRet()){ log.info("【成都监管-站点费率变化推送】失败:", result.getMsg()); return; @@ -410,6 +419,11 @@ String response = HttpRequestUtil.httpPost(requestUrl + "/notification_stationStatus", notifyStartResult, "Bearer " + getToken(redisTemplate)); log.info("【成都监管-设备状态变化推送】响应参数密文:" + response); EDIMessagePack result = JacksonUtils.toObj(response, EDIMessagePack.class); if(4002 == result.getRet()){ redisTemplate.delete("LLTOKEN"); notificationStationStatus(redisTemplate, connectorStatusInfo); return; } if(0 != result.getRet()){ log.info("【成都监管-站点费率变化推送】失败:", result.getMsg()); return; @@ -455,6 +469,11 @@ String response = HttpRequestUtil.httpPost(requestUrl + "/notification_connector_charge_status", notifyStartResult, "Bearer " + getToken(redisTemplate)); log.info("【成都监管-设备充电中状态变化推送】响应参数密文:" + response); EDIMessagePack result = JacksonUtils.toObj(response, EDIMessagePack.class); if(4002 == result.getRet()){ redisTemplate.delete("LLTOKEN"); notificationConnectorChargeStatus(redisTemplate, connectorChargeStatusInfo); return; } if(0 != result.getRet()){ log.info("【成都监管-站点费率变化推送】失败:", result.getMsg()); return; @@ -500,6 +519,11 @@ String response = HttpRequestUtil.httpPost(requestUrl + "/notification_orderInfo", notifyStartResult, "Bearer " + getToken(redisTemplate)); log.info("【成都监管-订单信息推送】响应参数密文:" + response); EDIMessagePack result = JacksonUtils.toObj(response, EDIMessagePack.class); if(4002 == result.getRet()){ redisTemplate.delete("LLTOKEN"); notificationOrderInfo(redisTemplate, orderInfo); return; } if(0 != result.getRet()){ log.info("【成都监管-站点费率变化推送】失败:", result.getMsg()); return; ruoyi-service/ruoyi-jianguan/src/main/java/com/ruoyi/jianguan/chengdujianguan/util/Cryptos.java
@@ -2,8 +2,6 @@ */ package com.ruoyi.jianguan.chengdujianguan.util; import com.ruoyi.integration.chengdujianguan.util.Encodes; import com.ruoyi.integration.chengdujianguan.util.Exceptions; import javax.crypto.Cipher; import javax.crypto.KeyGenerator; ruoyi-service/ruoyi-jianguan/src/main/java/com/ruoyi/jianguan/chengdujianguan/util/Digests.java
@@ -2,7 +2,6 @@ */ package com.ruoyi.jianguan.chengdujianguan.util; import com.ruoyi.integration.chengdujianguan.util.Exceptions; import org.apache.commons.lang3.Validate; import java.io.IOException; ruoyi-service/ruoyi-jianguan/src/main/java/com/ruoyi/jianguan/chengdujianguan/util/GBSignUtils.java
@@ -1,6 +1,5 @@ package com.ruoyi.jianguan.chengdujianguan.util; import com.ruoyi.integration.chengdujianguan.util.Encodes; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; ruoyi-service/ruoyi-jianguan/src/main/resources/bootstrap.yml
@@ -2,7 +2,7 @@ port: 9900 tomcat: basedir: /data/tomcat # Spring spring: application: # 应用名称