| | |
| | | package com.ruoyi.integration.drainage; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.nacos.common.utils.JacksonUtils; |
| | | import com.ruoyi.chargingPile.api.feignClient.*; |
| | | import com.ruoyi.chargingPile.api.model.*; |
| | |
| | | import com.ruoyi.common.core.dto.ChargingPercentProvinceDto; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.integration.api.model.UploadRealTimeMonitoringData; |
| | | import com.ruoyi.integration.drainage.kuaidian.TCECKDUtil; |
| | | import com.ruoyi.integration.drainage.kuaidian.model.*; |
| | | import com.ruoyi.integration.drainage.model.*; |
| | | import com.ruoyi.integration.drainage.model.enu.*; |
| | | import com.ruoyi.integration.drainage.util.AesEncryption; |
| | | import com.ruoyi.integration.drainage.util.HMacMD5Util; |
| | | import com.ruoyi.integration.drainage.util.SequenceGenerator; |
| | | import com.ruoyi.integration.mongodb.service.UploadRealTimeMonitoringDataService; |
| | | import com.ruoyi.order.api.feignClient.ChargingOrderAccountingStrategyClient; |
| | | import com.ruoyi.order.api.feignClient.ChargingOrderClient; |
| | | import com.ruoyi.order.api.model.AddTripartitePlatformOrder; |
| | |
| | | import com.ruoyi.order.api.model.TChargingOrderAccountingStrategy; |
| | | import com.ruoyi.other.api.domain.Operator; |
| | | import com.ruoyi.other.api.feignClient.OperatorClient; |
| | | import com.ruoyi.other.api.feignClient.SystemConfigurationClient; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.concurrent.LinkedBlockingQueue; |
| | | import java.util.concurrent.ThreadPoolExecutor; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.concurrent.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | private ChargingOrderAccountingStrategyClient chargingOrderAccountingStrategyClient; |
| | | |
| | | @Resource |
| | | private UploadRealTimeMonitoringDataService uploadRealTimeMonitoringDataService; |
| | | |
| | | @Resource |
| | | private TokenUtil tokenUtil; |
| | | |
| | | @Resource |
| | |
| | | @Resource |
| | | private ParkingRecordClient parkingRecordClient; |
| | | |
| | | |
| | | @Resource |
| | | private SystemConfigurationClient systemConfigurationClient; |
| | | @Autowired |
| | | private TCECSuperviseUtil tcecSuperviseUtil; |
| | | private final static String operatorId = "906171535"; |
| | | |
| | | /** |
| | | * 请求校验 |
| | |
| | | Long mapKey = Long.valueOf(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); |
| | | baseResult.setTimeStamp(mapKey); |
| | | baseResult.setSeq("0001"); |
| | | |
| | | //校验token和签名 |
| | | String operatorID = baseRequest.getOperatorID(); |
| | | String sig = baseRequest.getSig(); |
| | | Long timeStamp = baseRequest.getTimeStamp(); |
| | | String data = baseRequest.getData(); |
| | | String seq = baseRequest.getSeq(); |
| | | |
| | | if(StringUtils.isEmpty(operatorID) || StringUtils.isEmpty(sig) || StringUtils.isEmpty(data) || StringUtils.isEmpty(seq) || null == timeStamp){ |
| | | baseResult.setRet(4003); |
| | | baseResult.setMsg("参数异常"); |
| | | return baseResult; |
| | | } |
| | | |
| | | |
| | | R<Operator> r = operatorClient.getOperator(operatorID); |
| | | |
| | | if(200 != r.getCode()){ |
| | | baseResult.setRet(500); |
| | | baseResult.setMsg("系统异常"); |
| | |
| | | if(!sign.equals(sig)){ |
| | | baseResult.setRet(4001); |
| | | baseResult.setMsg("签名校验失败"); |
| | | return baseResult; |
| | | } |
| | | return baseResult; |
| | | } |
| | | public BaseResult requestCheckJianGuan(Boolean tokenCheck, BaseRequest baseRequest, HttpServletRequest request){ |
| | | Operator operator = new Operator(); |
| | | BaseResult baseResult = new BaseResult(); |
| | | baseResult.setRet(0); |
| | | baseResult.setMsg("成功"); |
| | | baseResult.setOperatorID(baseRequest.getOperatorID()); |
| | | operator.setOperatorId(baseRequest.getOperatorID()); |
| | | Long mapKey = Long.valueOf(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); |
| | | baseResult.setTimeStamp(mapKey); |
| | | baseResult.setSeq("0001"); |
| | | //校验token和签名 |
| | | String operatorID = baseRequest.getOperatorID(); |
| | | String sig = baseRequest.getSig(); |
| | | Long timeStamp = baseRequest.getTimeStamp(); |
| | | String data = baseRequest.getData(); |
| | | String seq = baseRequest.getSeq(); |
| | | baseResult.setOperator(operator); |
| | | if(StringUtils.isEmpty(operatorID) || StringUtils.isEmpty(sig) || StringUtils.isEmpty(data) || StringUtils.isEmpty(seq) || null == timeStamp){ |
| | | baseResult.setRet(4003); |
| | | baseResult.setMsg("参数异常"); |
| | | return baseResult; |
| | | } |
| | | return baseResult; |
| | |
| | | log.info("三方平台获取token响应参数:" + JacksonUtils.toJson(baseResult)); |
| | | return baseResult; |
| | | } |
| | | /** |
| | | * 获取token |
| | | * @return |
| | | */ |
| | | @PostMapping("/query_token_jianguan") |
| | | public BaseResult queryTokenJianguan(@RequestBody BaseRequest baseRequest, HttpServletRequest request){ |
| | | log.info("三方平台获取token请求参数:" + JacksonUtils.toJson(baseRequest)); |
| | | BaseResult baseResult = requestCheckJianGuan(false, baseRequest, request); |
| | | if(0 != baseResult.getRet()){ |
| | | log.info("三方平台获取token响应Data:"); |
| | | baseResult.setData(""); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | log.info("三方平台获取token响应参数:" + JacksonUtils.toJson(baseResult)); |
| | | return baseResult; |
| | | } |
| | | QueryTokenResult queryTokenResult = new QueryTokenResult(); |
| | | //生成token |
| | | Operator operator = baseResult.getOperator(); |
| | | Map<String, Object> token = tokenUtil.createToken(operator); |
| | | String access_token = token.get("access_token").toString(); |
| | | Long expires_in = Long.valueOf(token.get("expires_in").toString()); |
| | | |
| | | queryTokenResult.setOperatorID("906171535"); |
| | | queryTokenResult.setSuccStat(0); |
| | | queryTokenResult.setFailReason(0); |
| | | queryTokenResult.setAccessToken(access_token); |
| | | queryTokenResult.setTokenAvailableTime(expires_in * 60); |
| | | //参数加密 |
| | | String jsonString = JacksonUtils.toJson(queryTokenResult); |
| | | log.info("三方平台获取token响应Data:" + jsonString); |
| | | // String encrypt = AESUtil.encrypt(jsonString, operator.getOurDataSecret(), operator.getOurDataSecretIv()); |
| | | // baseResult.setData(encrypt); |
| | | String timeStamp = System.currentTimeMillis() + ""; |
| | | SequenceGenerator generator = new SequenceGenerator(); |
| | | String nextSequence = generator.getNextSequence(); |
| | | String data = AesEncryption.encrypt(OurDataSecret, OurDataSecretIV,jsonString); |
| | | String hmacMD5 = HMacMD5Util.getHMacMD5(OperatorID,timeStamp, data,nextSequence,OurSigSecret); |
| | | baseResult.setData(data); |
| | | baseResult.setSig(hmacMD5); |
| | | log.info("三方平台获取token响应参数:" + JacksonUtils.toJson(baseResult)); |
| | | return baseResult; |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | if(null == pageSize){ |
| | | pageSize = 10; |
| | | } |
| | | PageInfo<Site> siteListPaging = siteClient.getSiteListPaging(pageNo, pageSize); |
| | | PageInfo<Site> siteListPaging = siteClient.getSiteListPaging(pageNo, pageSize, new ArrayList<>()); |
| | | List<TParkingLot> parkingLots = parkingLotClient.getAllParkingLot().getData(); |
| | | QueryStationsInfoResult queryStationsInfoResult = new QueryStationsInfoResult(); |
| | | queryStationsInfoResult.setPageNo(pageNo); |
| | |
| | | List<TChargingPile> tChargingPiles = chargingPileClient.getChargingPileBySiteIds(siteIds).getData(); |
| | | List<Integer> collect1 = tChargingPiles.stream().map(TChargingPile::getId).collect(Collectors.toList()); |
| | | List<TChargingGun> chargingGunList = chargingGunClient.getChargingGunByChargingPileIds(collect1).getData(); |
| | | |
| | | String serviceTel = systemConfigurationClient.getServerPhone().getData(); |
| | | List<StationInfo> StationInfos = new ArrayList<>(); |
| | | for (Site datum : sites) { |
| | | StationInfo stationInfo = new StationInfo(); |
| | | stationInfo.setAreaCodeCountryside(datum.getAreaCodeCountryside()); |
| | | stationInfo.setStationClassification(datum.getStationClassification()); |
| | | stationInfo.setGeneralApplicationType(datum.getGeneralApplicationType()); |
| | | if (org.springframework.util.StringUtils.hasLength(datum.getSwapMatchCars())){ |
| | | stationInfo.setSwapMatchCars(Arrays.asList(datum.getSwapMatchCars().split(","))); |
| | | } |
| | | stationInfo.setBusineHours(datum.getStartServiceTime()); |
| | | stationInfo.setRoundTheClock(datum.getRoundTheClock()); |
| | | stationInfo.setParkType(datum.getParkType()); |
| | | stationInfo.setElectricityFee("{"+datum.getElectricityFee()+"}"); |
| | | stationInfo.setServiceFee("{"+datum.getServiceFee()+"}"); |
| | | stationInfo.setParkFee("{\"rules\":"+datum.getParkFee()+","+"\"freeDuration\":"+datum.getParkFeeFree()+"}"); |
| | | stationInfo.setElectricityType(datum.getElectricityType()); |
| | | stationInfo.setBusinessExpandType(datum.getBusinessExpandType()); |
| | | stationInfo.setCapacity(datum.getCapacity()); |
| | | stationInfo.setRatedPower(datum.getRatedPower()); |
| | | stationInfo.setPeriodFee(datum.getPeriodFee()); |
| | | stationInfo.setOfficialRunTime(datum.getOfficialRunTime()); |
| | | stationInfo.setStationOrientation(datum.getStationOrientation()); |
| | | stationInfo.setStationArea(datum.getStationArea()); |
| | | stationInfo.setHavePerson(datum.getHavePerson()); |
| | | stationInfo.setVideoMonitor(datum.getVideoMonitor()); |
| | | if (StringUtils.isNotEmpty(datum.getSupportingFacilities())){ |
| | | String[] split = datum.getSupportingFacilities().split(","); |
| | | List<Integer> collect = Arrays.stream(split).map(Integer::parseInt).collect(Collectors.toList()); |
| | | stationInfo.setSupportingFacilities(collect); |
| | | } |
| | | stationInfo.setPrinterFlag(datum.getPrinterFlag()); |
| | | stationInfo.setBarrierFlag(datum.getBarrierFlag()); |
| | | stationInfo.setParkingLockFlag(datum.getParkingLockFlag()); |
| | | stationInfo.setEquipmentOwnerName(datum.getEquipmentOwnerName()); |
| | | stationInfo.setResidentNo(datum.getResidentNo()); |
| | | stationInfo.setSupplyType(datum.getSupplyType()); |
| | | stationInfo.setWattHourMeterNo(datum.getWattHourMeterNo()); |
| | | BigDecimal forwardPower = datum.getForwardPower(); |
| | | if (forwardPower!=null){ |
| | | stationInfo.setForwardPower(forwardPower.setScale(4, BigDecimal.ROUND_HALF_UP).toString()); |
| | | } |
| | | stationInfo.setRecordUniqueNo(datum.getRecordUniqueNo()); |
| | | stationInfo.setStationID(datum.getId().toString()); |
| | | stationInfo.setOperatorID("906171535"); |
| | | stationInfo.setEquipmentOwnerID("906171535"); |
| | | stationInfo.setStationName(datum.getName()); |
| | | stationInfo.setCountryCode(datum.getCountryCode()); |
| | | stationInfo.setCountryCode(StringUtils.isNotEmpty(datum.getCountryCode()) ? datum.getCountryCode() : "CN"); |
| | | stationInfo.setAreaCode(datum.getDistrictsCode()); |
| | | stationInfo.setAddress(datum.getAddress()); |
| | | stationInfo.setStationTel(datum.getPhone()); |
| | | stationInfo.setServiceTel(datum.getServicePhone()); |
| | | stationInfo.setStationTel(StringUtils.isNotEmpty(datum.getPhone()) ? datum.getPhone().split(",")[0] : ""); |
| | | stationInfo.setServiceTel(StringUtils.isNotEmpty(serviceTel) ? serviceTel.split(",")[0] : ""); |
| | | switch (datum.getSiteType()){ |
| | | case 0: |
| | | stationInfo.setStationType(StationTypeEnum.OTHER.getType()); |
| | |
| | | stationInfo.setPictures(StringUtils.isNotEmpty(datum.getImgUrl()) ? Arrays.asList(datum.getImgUrl().split(",")) : new ArrayList<>()); |
| | | stationInfo.setSiteGuide(datum.getGuide()); |
| | | stationInfo.setMatchCars(datum.getVehicleDescription()); |
| | | stationInfo.setBusineHours(datum.getStartServiceTime() + "-" + datum.getEndServiceTime()); |
| | | // stationInfo.setBusineHours(datum.getStartServiceTime() + "-" + datum.getEndServiceTime()); |
| | | stationInfo.setElectricityFee(datum.getRateDescription()); |
| | | //添加停车费信息 |
| | | Optional<TParkingLot> first = parkingLots.stream().filter(s -> s.getSiteId().equals(datum.getId())).findFirst(); |
| | |
| | | TParkingLot tParkingLot = first.get(); |
| | | buildPlaceHolder(tParkingLot, stationInfo); |
| | | } |
| | | |
| | | //构建充电设备信息数据 |
| | | stationInfo.setEquipmentInfos(buildEquipmentInfo(datum.getId(), tChargingPiles, chargingGunList)); |
| | | StationInfos.add(stationInfo); |
| | |
| | | equipmentInfo.setManufacturerID(tChargingPile.getManufacturerCode()); |
| | | equipmentInfo.setManufacturerName(tChargingPile.getManufacturer()); |
| | | equipmentInfo.setEquipmentModel(tChargingPile.getEquipmentType()); |
| | | equipmentInfo.setEquipmentUniqueNumber(tChargingPile.getEquipmentUniqueNumber()); |
| | | equipmentInfo.setEquipmentClassification(tChargingPile.getEquipmentClassification()); |
| | | if(null != tChargingPile.getProductionDate()){ |
| | | equipmentInfo.setProductionDate(tChargingPile.getProductionDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | } |
| | |
| | | case 4: |
| | | equipmentInfo.setEquipmentType(EquipmentTypeEnum.WIRELESS_DEVICE.getType()); |
| | | break; |
| | | case 5: |
| | | equipmentInfo.setEquipmentType(EquipmentTypeEnum.ORDER.getType()); |
| | | break; |
| | | case 6: |
| | | equipmentInfo.setEquipmentType(EquipmentTypeEnum.V2G.getType()); |
| | | break; |
| | | } |
| | | |
| | | //构建设备接口信息 |
| | | equipmentInfo.setConnectorInfos(buildConnectorInfos(tChargingPile.getId(), tChargingPile.getCode(), chargingGunList)); |
| | | equipmentInfo.setPower(tChargingPile.getRatedPower()); |
| | | equipmentInfos.add(equipmentInfo); |
| | | } |
| | | return equipmentInfos; |
| | |
| | | List<TChargingGun> collect = chargingGunList.stream().filter(s -> s.getChargingPileId().equals(chargingPileId)).collect(Collectors.toList()); |
| | | for (TChargingGun chargingGun : collect) { |
| | | ConnectorInfo connectorInfo = new ConnectorInfo(); |
| | | connectorInfo.setConnectorID(chargingGun.getId().toString()); |
| | | connectorInfo.setConnectorID(chargingGun.getFullNumber()); |
| | | connectorInfo.setConnectorName(chargingGun.getName()); |
| | | connectorInfo.setEquipmentClassification(chargingGun.getEquipmentClassification()); |
| | | connectorInfo.setConstantVoltageLowerLimits(chargingGun.getConstantVoltageLowerLimits()); |
| | | connectorInfo.setConstantVoltageUpperLimits(chargingGun.getConstantVoltageUpperLimits()); |
| | | connectorInfo.setConstantCurrentLowerLimits(chargingGun.getConstantCurrentLowerLimits()); |
| | | connectorInfo.setConstantCurrentUpperLimits(chargingGun.getConstantCurrentUpperLimits()); |
| | | connectorInfo.setAuxPower(chargingGun.getAuxPower()); |
| | | connectorInfo.setOpreateStatus(chargingGun.getOpreateStatus()); |
| | | connectorInfo.setOpreateHours(chargingGun.getOpreateHours()); |
| | | switch (chargingGun.getType()){ |
| | | case 0: |
| | | connectorInfo.setConnectorType(ConnectorTypeEnum.OTHER.getType()); |
| | |
| | | connectorInfo.setConnectorType(ConnectorTypeEnum.WIRELESS_CHARGING_STAND.getType()); |
| | | break; |
| | | } |
| | | connectorInfo.setVoltageUpperLimits(chargingGun.getUpperRatedVoltage().intValue()); |
| | | connectorInfo.setVoltageLowerLimits(chargingGun.getLowerLimitOfRatedVoltage().intValue()); |
| | | connectorInfo.setCurrent(chargingGun.getRatedCurrent().intValue()); |
| | | connectorInfo.setPower(chargingGun.getRatedPower()); |
| | | connectorInfo.setParkNo(chargingGun.getParkingNumber()); |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/pushChargingGunStatus") |
| | | public R pushChargingGunStatus(@RequestParam("id") Integer id, @RequestParam("status") Integer status){ |
| | | public R pushChargingGunStatus(@RequestParam(value = "fullNumber") String fullNumber, @RequestParam(value = "status") Integer status){ |
| | | ConnectorStatusInfo connectorStatusInfo = new ConnectorStatusInfo(); |
| | | connectorStatusInfo.setConnectorID(id.toString()); |
| | | connectorStatusInfo.setConnectorID(fullNumber); |
| | | switch (status){ |
| | | case 1: |
| | | connectorStatusInfo.setStatus(0); |
| | |
| | | connectorStatusInfo.setStatus(255); |
| | | break; |
| | | } |
| | | ConnectorStatusInfo connectorStatusInfo1 = new ConnectorStatusInfo(); |
| | | BeanUtils.copyProperties(connectorStatusInfo, connectorStatusInfo1); |
| | | connectorStatusInfo.setConnectorStatusInfo(connectorStatusInfo1); |
| | | List<Operator> operators = operatorClient.getAllOperator().getData(); |
| | | for (Operator operator : operators) { |
| | | TCECUtil.notificationStationStatus(operator, connectorStatusInfo); |
| | |
| | | List<TChargingGun> collect2 = chargingGunList.stream().filter(s -> s.getSiteId().equals(datum.getId())).collect(Collectors.toList()); |
| | | for (TChargingGun chargingGun : collect2) { |
| | | ConnectorStatusInfo info = new ConnectorStatusInfo(); |
| | | info.setConnectorID(chargingGun.getId().toString()); |
| | | info.setConnectorID(chargingGun.getFullNumber()); |
| | | switch (chargingGun.getStatus()){ |
| | | case 1: |
| | | info.setStatus(0); |
| | |
| | | List<TChargingOrder> tChargingOrders1 = collect2.get(integer1); |
| | | BigDecimal reduce2 = tChargingOrders1.stream().map(TChargingOrder::getChargingCapacity).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | |
| | | TChargingGun chargingGun = chargingGunClient.getChargingGunById(integer1).getData(); |
| | | ConnectorStatsInfo connectorStatsInfo = new ConnectorStatsInfo(); |
| | | connectorStatsInfo.setConnectorID(integer1.toString()); |
| | | connectorStatsInfo.setConnectorID(chargingGun.getFullNumber()); |
| | | connectorStatsInfo.setConnectorElectricity(reduce2); |
| | | ConnectorStatsInfos.add(connectorStatsInfo); |
| | | } |
| | |
| | | log.info("三方平台设备认证请求Data:" + decrypt); |
| | | QueryEquipAuth queryEquipAuth = JSON.parseObject(decrypt, QueryEquipAuth.class); |
| | | String connectorID = queryEquipAuth.getConnectorID(); |
| | | TChargingGun tChargingGun = chargingGunClient.getChargingGunById(Integer.valueOf(connectorID)).getData(); |
| | | TChargingGun tChargingGun = chargingGunClient.getChargingGunByFullNumber(connectorID).getData(); |
| | | if(null == tChargingGun){ |
| | | baseResult.setRet(4004); |
| | | baseResult.setMsg("connectorID 参数无效"); |
| | |
| | | queryEquipBusinessPolicyResult.setSuccStat(0); |
| | | queryEquipBusinessPolicyResult.setFailReason(0); |
| | | String connectorID = queryEquipBusinessPolicy.getConnectorID(); |
| | | TChargingGun tChargingGun = chargingGunClient.getChargingGunById(Integer.valueOf(connectorID)).getData(); |
| | | TChargingGun tChargingGun = chargingGunClient.getChargingGunByFullNumber(connectorID).getData(); |
| | | if(null == tChargingGun){ |
| | | baseResult.setRet(4004); |
| | | baseResult.setMsg("connectorID 参数无效"); |
| | |
| | | result.setStartChargeSeq(queryStartCharge.getStartChargeSeq()); |
| | | result.setConnectorID(queryStartCharge.getConnectorID()); |
| | | String connectorID = queryStartCharge.getConnectorID(); |
| | | TChargingGun tChargingGun = chargingGunClient.getChargingGunById(Integer.valueOf(connectorID)).getData(); |
| | | TChargingGun tChargingGun = chargingGunClient.getChargingGunByFullNumber(connectorID).getData(); |
| | | //设备不存在 |
| | | if(null == tChargingGun){ |
| | | baseResult.setRet(4004); |
| | |
| | | addTripartitePlatformOrder.setStartChargeSeq(queryStartCharge.getStartChargeSeq()); |
| | | addTripartitePlatformOrder.setChargingGunId(tChargingGun.getId()); |
| | | addTripartitePlatformOrder.setOperatorId(operator.getOperatorId()); |
| | | addTripartitePlatformOrder.setPaymentAmount(queryStartCharge.getChargingAmt()); |
| | | addTripartitePlatformOrder.setPaymentAmount(null == queryStartCharge.getChargingAmt() ? new BigDecimal(9999) : queryStartCharge.getChargingAmt()); |
| | | addTripartitePlatformOrder.setRechargePaymentType(0); |
| | | addTripartitePlatformOrder.setPlateNum(queryStartCharge.getPlateNum()); |
| | | R order = chargingOrderClient.addTripartitePlatformOrder(addTripartitePlatformOrder); |
| | |
| | | baseResult.setData(encrypt); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | log.info("三方平台请求开始充电响应参数:" + JacksonUtils.toJson(baseResult)); |
| | | |
| | | //定义定时任务推送订单状态 |
| | | ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); |
| | | Runnable task = new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | try { |
| | | TChargingOrder chargingOrder = chargingOrderClient.getChargingOrderByStartChargeSeq(result.getStartChargeSeq()).getData(); |
| | | if(chargingOrder.getStatus() != 3){ |
| | | scheduler.shutdown(); |
| | | return; |
| | | } |
| | | log.info("开始执行三方平台定时推送"); |
| | | notificationEquipChargeStatus(chargingOrder.getStartChargeSeq(), chargingOrder.getOperatorId()); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | }; |
| | | //一分钟执行一次 |
| | | scheduler.scheduleAtFixedRate(task, 10, 10, TimeUnit.SECONDS); |
| | | return baseResult; |
| | | } |
| | | |
| | |
| | | queryEquipChargeStatusResult.setStartChargeSeqStat(4); |
| | | break; |
| | | } |
| | | queryEquipChargeStatusResult.setConnectorID(chargingOrder.getChargingGunId().toString()); |
| | | TChargingGun chargingGun = chargingGunClient.getChargingGunById(chargingOrder.getChargingGunId()).getData(); |
| | | queryEquipChargeStatusResult.setConnectorID(chargingGun.getFullNumber()); |
| | | //1=离线,2=空闲,3=占用(未充电),4=占用(充电中),5=占用(已充满),6=占用(预约锁定),7=故障 |
| | | switch (chargingGun.getStatus()){ |
| | | case 1: |
| | |
| | | } |
| | | queryEquipChargeStatusResult.setCurrentA(chargingOrder.getCurrent()); |
| | | queryEquipChargeStatusResult.setVoltageA(chargingOrder.getVoltage()); |
| | | queryEquipChargeStatusResult.setSoc(chargingOrder.getTotalElectricity()); |
| | | UploadRealTimeMonitoringData timeMonitoringData = uploadRealTimeMonitoringDataService.getLastDataById(chargingOrder.getCode()); |
| | | queryEquipChargeStatusResult.setSoc(null == timeMonitoringData ? BigDecimal.ZERO : new BigDecimal(timeMonitoringData.getSoc())); |
| | | queryEquipChargeStatusResult.setStartTime((null == chargingOrder.getStartTime() ? chargingOrder.getCreateTime() : chargingOrder.getStartTime()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | queryEquipChargeStatusResult.setEndTime((null == chargingOrder.getStartTime() ? LocalDateTime.now() : chargingOrder.getEndTime()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | queryEquipChargeStatusResult.setEndTime((null == chargingOrder.getEndTime() ? LocalDateTime.now() : chargingOrder.getEndTime()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | queryEquipChargeStatusResult.setTotalPower(chargingOrder.getElectricity()); |
| | | queryEquipChargeStatusResult.setElecMoney(chargingOrder.getTotalElectricity()); |
| | | queryEquipChargeStatusResult.setSeviceMoney(chargingOrder.getServiceCharge()); |
| | | queryEquipChargeStatusResult.setTotalMoney(chargingOrder.getTotalElectricity().add(chargingOrder.getServiceCharge())); |
| | | |
| | | List<TChargingOrderAccountingStrategy> data = chargingOrderAccountingStrategyClient.getChargingOrderAccountingStrategyByOrderId(chargingOrder.getId()).getData(); |
| | | if(data.size() > 0){ |
| | | BigDecimal totalElectricity = data.stream().map(TChargingOrderAccountingStrategy::getPeriodElectricPrice).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | BigDecimal serviceCharge = data.stream().map(TChargingOrderAccountingStrategy::getPeriodServicePrice).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | queryEquipChargeStatusResult.setElecMoney(totalElectricity); |
| | | queryEquipChargeStatusResult.setSeviceMoney(serviceCharge); |
| | | queryEquipChargeStatusResult.setTotalMoney(chargingOrder.getPaymentAmount()); |
| | | }else{ |
| | | queryEquipChargeStatusResult.setElecMoney(chargingOrder.getRechargeAmount().subtract(chargingOrder.getResidualAmount())); |
| | | queryEquipChargeStatusResult.setSeviceMoney(BigDecimal.ZERO); |
| | | queryEquipChargeStatusResult.setTotalMoney(chargingOrder.getRechargeAmount().subtract(chargingOrder.getResidualAmount())); |
| | | } |
| | | |
| | | //构建充电明细 |
| | | List<ChargeDetail> chargeDetails = new ArrayList<>(); |
| | | List<TChargingOrderAccountingStrategy> data = chargingOrderAccountingStrategyClient.getChargingOrderAccountingStrategyByOrderId(chargingOrder.getId()).getData(); |
| | | |
| | | LocalDateTime startTime = chargingOrder.getStartTime(); |
| | | LocalDateTime endTime = chargingOrder.getEndTime(); |
| | | LocalDateTime startTime = null == chargingOrder.getStartTime() ? LocalDateTime.now() : chargingOrder.getStartTime(); |
| | | LocalDateTime endTime = null == chargingOrder.getEndTime() ? LocalDateTime.now() : chargingOrder.getEndTime(); |
| | | String s_format = startTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); |
| | | String e_format = endTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); |
| | | for (TChargingOrderAccountingStrategy datum : data) { |
| | |
| | | } |
| | | chargeDetail.setElecPrice(datum.getElectrovalence()); |
| | | chargeDetail.setSevicePrice(datum.getServiceCharge()); |
| | | chargeDetail.setDetailPower(datum.getChargingCapacity()); |
| | | chargeDetail.setDetailPower(datum.getChargingCapacity().setScale(2, BigDecimal.ROUND_HALF_UP)); |
| | | chargeDetail.setDetailElecMoney(datum.getPeriodElectricPrice()); |
| | | chargeDetail.setDetailSeviceMoney(datum.getPeriodServicePrice()); |
| | | chargeDetails.add(chargeDetail); |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/notificationEquipChargeStatus") |
| | | public R notificationEquipChargeStatus(@RequestParam("startChargeSeq") String startChargeSeq, @RequestParam("operatorId") Integer operatorId){ |
| | | public R notificationEquipChargeStatus(@RequestParam(value = "startChargeSeq") String startChargeSeq, @RequestParam(value = "operatorId") Integer operatorId){ |
| | | QueryEquipChargeStatusResult queryEquipChargeStatusResult = buildQueryEquipChargeStatusResult(startChargeSeq); |
| | | Operator operator = operatorClient.getOperatorById(operatorId).getData(); |
| | | NotificationEquipChargeStatusResult notificationEquipChargeStatusResult = TCECUtil.notificationEquipChargeStatus(operator, queryEquipChargeStatusResult); |
| | |
| | | notificationChargeOrderInfo.setStartChargeSeq(startChargeSeq); |
| | | TChargingOrder chargingOrder = chargingOrderClient.getChargingOrderByStartChargeSeq(startChargeSeq).getData(); |
| | | if(null == chargingOrder){ |
| | | log.info("三方平台流水号获取订单失败"); |
| | | return null; |
| | | } |
| | | notificationChargeOrderInfo.setConnectorID(chargingOrder.getChargingGunId().toString()); |
| | | TChargingGun chargingGun = chargingGunClient.getChargingGunById(chargingOrder.getChargingGunId()).getData(); |
| | | notificationChargeOrderInfo.setConnectorID(chargingGun.getFullNumber()); |
| | | notificationChargeOrderInfo.setStartTime((null == chargingOrder.getStartTime() ? chargingOrder.getCreateTime() : chargingOrder.getStartTime()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | notificationChargeOrderInfo.setEndTime((null == chargingOrder.getStartTime() ? LocalDateTime.now() : chargingOrder.getEndTime()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | notificationChargeOrderInfo.setEndTime((null == chargingOrder.getEndTime() ? LocalDateTime.now() : chargingOrder.getEndTime()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | notificationChargeOrderInfo.setTotalPower(chargingOrder.getElectricity()); |
| | | notificationChargeOrderInfo.setTotalElecMoney(chargingOrder.getTotalElectricity()); |
| | | notificationChargeOrderInfo.setTotalSeviceMoney(chargingOrder.getServiceCharge()); |
| | | notificationChargeOrderInfo.setTotalMoney(chargingOrder.getTotalElectricity().add(chargingOrder.getServiceCharge())); |
| | | notificationChargeOrderInfo.setTotalDelayMoney(BigDecimal.ZERO); |
| | | |
| | | List<TChargingOrderAccountingStrategy> data = chargingOrderAccountingStrategyClient.getChargingOrderAccountingStrategyByOrderId(chargingOrder.getId()).getData(); |
| | | if(data.size() > 0){ |
| | | BigDecimal totalElectricity = data.stream().map(TChargingOrderAccountingStrategy::getPeriodElectricPrice).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | BigDecimal serviceCharge = data.stream().map(TChargingOrderAccountingStrategy::getPeriodServicePrice).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | notificationChargeOrderInfo.setTotalElecMoney(totalElectricity.setScale(2, RoundingMode.HALF_EVEN)); |
| | | notificationChargeOrderInfo.setTotalSeviceMoney(serviceCharge.setScale(2, RoundingMode.HALF_EVEN)); |
| | | notificationChargeOrderInfo.setTotalMoney(chargingOrder.getPaymentAmount()); |
| | | }else{ |
| | | notificationChargeOrderInfo.setTotalElecMoney(chargingOrder.getRechargeAmount().subtract(chargingOrder.getResidualAmount())); |
| | | notificationChargeOrderInfo.setTotalSeviceMoney(BigDecimal.ZERO); |
| | | notificationChargeOrderInfo.setTotalMoney(chargingOrder.getRechargeAmount().subtract(chargingOrder.getResidualAmount())); |
| | | } |
| | | |
| | | |
| | | TParkingRecord parkingRecord = parkingRecordClient.getParkingRecordByChargingOrderId(chargingOrder.getId()).getData(); |
| | | if(null != parkingRecord && parkingRecord.getStatus() == 3){ |
| | | notificationChargeOrderInfo.setTotalDelayMoney(parkingRecord.getPayment()); |
| | |
| | | |
| | | //构建充电明细 |
| | | List<ChargeDetail> chargeDetails = new ArrayList<>(); |
| | | List<TChargingOrderAccountingStrategy> data = chargingOrderAccountingStrategyClient.getChargingOrderAccountingStrategyByOrderId(chargingOrder.getId()).getData(); |
| | | |
| | | LocalDateTime startTime = chargingOrder.getStartTime(); |
| | | LocalDateTime endTime = chargingOrder.getEndTime(); |
| | | LocalDateTime startTime = null == chargingOrder.getStartTime() ? LocalDateTime.now() : chargingOrder.getStartTime(); |
| | | LocalDateTime endTime = null == chargingOrder.getEndTime() ? LocalDateTime.now() : chargingOrder.getEndTime(); |
| | | String s_format = startTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); |
| | | String e_format = endTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); |
| | | for (TChargingOrderAccountingStrategy datum : data) { |
| | |
| | | } |
| | | chargeDetail.setElecPrice(datum.getElectrovalence()); |
| | | chargeDetail.setSevicePrice(datum.getServiceCharge()); |
| | | chargeDetail.setDetailPower(datum.getChargingCapacity()); |
| | | chargeDetail.setDetailPower(datum.getChargingCapacity().setScale(2, BigDecimal.ROUND_HALF_UP)); |
| | | chargeDetail.setDetailElecMoney(datum.getPeriodElectricPrice()); |
| | | chargeDetail.setDetailSeviceMoney(datum.getPeriodServicePrice()); |
| | | chargeDetails.add(chargeDetail); |
| | |
| | | QueryTerminalCode queryTerminalCode = JSON.parseObject(decrypt, QueryTerminalCode.class); |
| | | String qrCode = queryTerminalCode.getQRCode(); |
| | | String substring = qrCode.substring(qrCode.indexOf("=") + 1); |
| | | TChargingGun chargingGun = chargingGunClient.getChargingGunByFullNumber(substring).getData(); |
| | | QueryTerminalCodeResult queryTerminalCodeResult = new QueryTerminalCodeResult(); |
| | | queryTerminalCodeResult.setTerminalCode(substring); |
| | | if(null != chargingGun){ |
| | | queryTerminalCodeResult.setTerminalCode(chargingGun.getId().toString()); |
| | | } |
| | | |
| | | //参数加密 |
| | | String jsonString = JacksonUtils.toJson(queryTerminalCodeResult); |
| | |
| | | if(null == chargingOrder){ |
| | | return null; |
| | | } |
| | | TChargingGun chargingGun = chargingGunClient.getChargingGunById(chargingOrder.getChargingGunId()).getData(); |
| | | OrderInfo orderInfo = new OrderInfo(); |
| | | orderInfo.setStartChargeSeq(chargingOrder.getStartChargeSeq()); |
| | | orderInfo.setConnectorID(chargingOrder.getChargingGunId().toString()); |
| | | orderInfo.setConnectorID(chargingGun.getFullNumber()); |
| | | orderInfo.setStartTime((null == chargingOrder.getStartTime() ? chargingOrder.getCreateTime() : chargingOrder.getStartTime()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | orderInfo.setEndTime((null == chargingOrder.getStartTime() ? LocalDateTime.now() : chargingOrder.getEndTime()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | orderInfo.setEndTime((null == chargingOrder.getEndTime() ? LocalDateTime.now() : chargingOrder.getEndTime()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | orderInfo.setTotalPower(chargingOrder.getTotalElectricity()); |
| | | orderInfo.setTotalElecMoney(chargingOrder.getElectrovalence()); |
| | | orderInfo.setTotalSeviceMoney(chargingOrder.getServiceCharge()); |
| | |
| | | List<TChargingOrderAccountingStrategy> data = chargingOrderAccountingStrategyClient.getChargingOrderAccountingStrategyByOrderId(chargingOrder.getId()).getData(); |
| | | |
| | | LocalDateTime startTime = chargingOrder.getStartTime(); |
| | | LocalDateTime endTime = chargingOrder.getEndTime(); |
| | | LocalDateTime endTime = null == chargingOrder.getEndTime() ? LocalDateTime.now() : chargingOrder.getEndTime(); |
| | | String s_format = startTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); |
| | | String e_format = endTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); |
| | | for (TChargingOrderAccountingStrategy datum : data) { |
| | |
| | | } |
| | | chargeDetail.setElecPrice(datum.getElectrovalence()); |
| | | chargeDetail.setSevicePrice(datum.getServiceCharge()); |
| | | chargeDetail.setDetailPower(datum.getChargingCapacity()); |
| | | chargeDetail.setDetailPower(datum.getChargingCapacity().setScale(2, BigDecimal.ROUND_HALF_EVEN)); |
| | | chargeDetail.setDetailElecMoney(datum.getPeriodElectricPrice()); |
| | | chargeDetail.setDetailSeviceMoney(datum.getPeriodServicePrice()); |
| | | chargeDetails.add(chargeDetail); |
| | |
| | | queryChargeOrderInfoResult.setOrderInfos(orderInfos); |
| | | return queryChargeOrderInfoResult; |
| | | } |
| | | |
| | | |
| | | |
| | | /*********************数据监管平台接口*********************/ |
| | | /** |
| | | * 查询运营商信息 |
| | | * @param baseRequest |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @PostMapping("/supervise_query_operator_info") |
| | | public BaseResult superviseQueryOperatorInfo(@RequestBody BaseRequest baseRequest, HttpServletRequest request){ |
| | | //解密参数 |
| | | String decrypt = AESUtil.decrypt(baseRequest.getData(), OurDataSecret, OurDataSecretIV); |
| | | log.info("监管平台查询充电站信息请求Data:" + decrypt); |
| | | SuperviseQueryOperatorInfo superviseQueryOperatorInfo = JSON.parseObject(decrypt, SuperviseQueryOperatorInfo.class); |
| | | Integer pageNo = superviseQueryOperatorInfo.getPageNo(); |
| | | Integer pageSize = superviseQueryOperatorInfo.getPageSize(); |
| | | if(null == pageNo){ |
| | | pageNo = 1; |
| | | } |
| | | if(null == pageSize){ |
| | | pageSize = 50; |
| | | } |
| | | String operatorTel = systemConfigurationClient.getServerPhone().getData(); |
| | | SuperviseQueryOperatorInfoResultPage superviseQueryOperatorInfoResultPage = new SuperviseQueryOperatorInfoResultPage(); |
| | | superviseQueryOperatorInfoResultPage.setPageNo(1); |
| | | superviseQueryOperatorInfoResultPage.setPageCount(1); |
| | | superviseQueryOperatorInfoResultPage.setItemSize(1); |
| | | |
| | | SuperviseQueryOperatorInfoResult superviseQueryOperatorInfoResult = new SuperviseQueryOperatorInfoResult(); |
| | | superviseQueryOperatorInfoResult.setOperatorID("906171535"); |
| | | superviseQueryOperatorInfoResult.setOperatorUSCID("91510903906171535D"); |
| | | superviseQueryOperatorInfoResult.setOperatorName("四川明星新能源科技有限公司"); |
| | | superviseQueryOperatorInfoResult.setOperatorTel1(operatorTel); |
| | | List<SuperviseQueryOperatorInfoResult> superviseQueryOperatorInfoResults = new ArrayList<>(); |
| | | superviseQueryOperatorInfoResults.add(superviseQueryOperatorInfoResult); |
| | | // 将superviseQueryOperatorInfoResults转化为json数组 |
| | | superviseQueryOperatorInfoResultPage.setOperatorInfos(superviseQueryOperatorInfoResults); |
| | | String jsonString = JacksonUtils.toJson(superviseQueryOperatorInfoResultPage); |
| | | String timeStamp = System.currentTimeMillis() + ""; |
| | | SequenceGenerator generator = new SequenceGenerator(); |
| | | String nextSequence = generator.getNextSequence(); |
| | | String data = AesEncryption.encrypt(OurDataSecret, OurDataSecretIV,JSONObject.toJSONString(superviseQueryOperatorInfoResultPage)); |
| | | String hmacMD5 = HMacMD5Util.getHMacMD5(OperatorID,timeStamp, data,nextSequence,OurSigSecret); |
| | | BaseResult baseResult = new BaseResult(); |
| | | baseResult.setData(data); |
| | | baseResult.setSig(hmacMD5); |
| | | baseResult.setRet(0); |
| | | baseResult.setMsg("OK"); |
| | | baseResult.setOperatorID(OperatorID); |
| | | return baseResult; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询充电站信息 |
| | | * @param baseRequest |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @PostMapping("/supervise_query_stations_info") |
| | | public BaseResult superviseQueryStationsInfo(@RequestBody BaseRequest baseRequest, HttpServletRequest request){ |
| | | String decrypt = AESUtil.decrypt(baseRequest.getData(), OurDataSecret, OurDataSecretIV); |
| | | log.info("监管平台supervise_query_stations_infoData:" + decrypt); |
| | | //解密参数 |
| | | QueryStationsInfo queryStationsInfo = JSON.parseObject(decrypt, QueryStationsInfo.class); |
| | | Integer pageNo = queryStationsInfo.getPageNo(); |
| | | Integer pageSize = queryStationsInfo.getPageSize(); |
| | | List<String> stationIDs = queryStationsInfo.getStationIDs(); |
| | | if(null == pageNo){ |
| | | pageNo = 1; |
| | | } |
| | | if(null == pageSize){ |
| | | pageSize = 50; |
| | | } |
| | | PageInfo<Site> siteListPaging = siteClient.getSiteListPaging(pageNo, pageSize, stationIDs); |
| | | List<TParkingLot> parkingLots = parkingLotClient.getAllParkingLot().getData(); |
| | | QueryStationsInfoResult queryStationsInfoResult = new QueryStationsInfoResult(); |
| | | queryStationsInfoResult.setPageNo(pageNo); |
| | | queryStationsInfoResult.setPageCount((0 == (siteListPaging.getTotal() % pageSize) ? 0 : 1) + Double.valueOf(siteListPaging.getTotal() / pageSize).intValue()); |
| | | queryStationsInfoResult.setItemSize(Long.valueOf(siteListPaging.getTotal()).intValue()); |
| | | queryStationsInfoResult.setStationInfos(buildSite(parkingLots, siteListPaging.getRecords())); |
| | | String timeStamp = System.currentTimeMillis() + ""; |
| | | SequenceGenerator generator = new SequenceGenerator(); |
| | | String nextSequence = generator.getNextSequence(); |
| | | String data = AesEncryption.encrypt(OurDataSecret, OurDataSecretIV,JSONObject.toJSONString(queryStationsInfoResult)); |
| | | String hmacMD5 = HMacMD5Util.getHMacMD5(OurOperatorID,timeStamp, data,nextSequence,OurSigSecret); |
| | | BaseResult baseResult = new BaseResult(); |
| | | baseResult.setData(data); |
| | | baseResult.setSig(hmacMD5); |
| | | baseResult.setRet(0); |
| | | baseResult.setMsg("OK"); |
| | | baseResult.setOperatorID(OurOperatorID); |
| | | return baseResult; |
| | | } |
| | | /** |
| | | * 查询充换电站状态信息 |
| | | * @param baseRequest |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @PostMapping("/supervise_query_station_status") |
| | | public BaseResult superviseQueryStationStatus(@RequestBody BaseRequest baseRequest, HttpServletRequest request){ |
| | | log.info("监管平台查询充换电站状态信息请求参数:" + JacksonUtils.toJson(baseRequest)); |
| | | String decrypt = AESUtil.decrypt(baseRequest.getData(), OurDataSecret, OurDataSecretIV); |
| | | log.info("监管平台supervise_query_station_statusData:" + decrypt); |
| | | //解密参数 |
| | | log.info("监管平台查询充换电站状态信息请求Data:" + decrypt); |
| | | QueryStationStatus queryStationStatus = JSON.parseObject(decrypt, QueryStationStatus.class); |
| | | List<String> stationIDs = queryStationStatus.getStationIDs(); |
| | | String operatorID = queryStationStatus.getOperatorID(); |
| | | |
| | | List<Integer> stationIDList = new ArrayList<>(); |
| | | for (String stationID : stationIDs) { |
| | | stationIDList.add(Integer.valueOf(stationID)); |
| | | } |
| | | |
| | | QueryStationStatusResult queryStationStatusResult = new QueryStationStatusResult(); |
| | | List<StationStatusInfo> stationStatusInfos = new ArrayList<>(); |
| | | |
| | | // 查询站点下的桩信息状态 |
| | | List<TChargingPile> chargingPiles = chargingPileClient.getChargingPileBySiteIds(stationIDList).getData(); |
| | | if(!CollectionUtils.isEmpty(chargingPiles)){ |
| | | List<Integer> pileIds = chargingPiles.stream().map(TChargingPile::getId).collect(Collectors.toList()); |
| | | List<TChargingGun> chargingGuns = chargingGunClient.getChargingGunByChargingPileIds(pileIds).getData(); |
| | | if(!CollectionUtils.isEmpty(chargingGuns)){ |
| | | for (Integer stationID : stationIDList) { |
| | | StationStatusInfo stationStatusInfo = new StationStatusInfo(); |
| | | stationStatusInfo.setOperatorID(operatorID); |
| | | stationStatusInfo.setEquipmentOwnerID(operatorId); |
| | | stationStatusInfo.setStationID(String.valueOf(stationID)); |
| | | List<ConnectorStatusInfo> connectorStatusInfos = new ArrayList<>(); |
| | | for (TChargingGun chargingGun : chargingGuns) { |
| | | ConnectorStatusInfo connectorStatusInfo = new ConnectorStatusInfo(); |
| | | connectorStatusInfo.setOperatorID(operatorId); |
| | | connectorStatusInfo.setEquipmentOwnerID(operatorId); |
| | | connectorStatusInfo.setStationID(String.valueOf(chargingGun.getSiteId())); |
| | | connectorStatusInfo.setEquipmentID(String.valueOf(chargingGun.getChargingPileId())); |
| | | connectorStatusInfo.setConnectorID(chargingGun.getFullNumber()); |
| | | connectorStatusInfo.setEquipmentClassification(1); |
| | | switch (chargingGun.getStatus()){ |
| | | case 1: |
| | | connectorStatusInfo.setStatus(0); |
| | | break; |
| | | case 2: |
| | | connectorStatusInfo.setStatus(1); |
| | | break; |
| | | case 3: |
| | | connectorStatusInfo.setStatus(2); |
| | | break; |
| | | case 4: |
| | | connectorStatusInfo.setStatus(3); |
| | | break; |
| | | case 5: |
| | | connectorStatusInfo.setStatus(3); |
| | | break; |
| | | case 6: |
| | | connectorStatusInfo.setStatus(4); |
| | | break; |
| | | case 7: |
| | | connectorStatusInfo.setStatus(255); |
| | | break; |
| | | } |
| | | connectorStatusInfo.setUpdateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); |
| | | connectorStatusInfos.add(connectorStatusInfo); |
| | | } |
| | | stationStatusInfo.setConnectorStatusInfos(connectorStatusInfos); |
| | | stationStatusInfos.add(stationStatusInfo); |
| | | } |
| | | } |
| | | queryStationStatusResult.setStationStatusInfos(stationStatusInfos); |
| | | } |
| | | String timeStamp = System.currentTimeMillis() + ""; |
| | | SequenceGenerator generator = new SequenceGenerator(); |
| | | String nextSequence = generator.getNextSequence(); |
| | | String data = AesEncryption.encrypt(OurDataSecret, OurDataSecretIV,JSONObject.toJSONString(queryStationStatusResult)); |
| | | String hmacMD5 = HMacMD5Util.getHMacMD5(OurOperatorID,timeStamp, data,nextSequence,OurSigSecret); |
| | | BaseResult baseResult = new BaseResult(); |
| | | baseResult.setData(data); |
| | | baseResult.setSig(hmacMD5); |
| | | baseResult.setRet(0); |
| | | baseResult.setMsg("OK"); |
| | | baseResult.setOperatorID(OurOperatorID); |
| | | return baseResult; |
| | | } |
| | | |
| | | // 测试环境 |
| | | private static final String OperatorID = "MA01H3BQ2"; |
| | | private static final String OperatorSecret = "f1331ef0b37c2d1b"; |
| | | private static final String SigSecret = "a6fedf0e1b27d6f7"; |
| | | private static final String DataSecret = "50a61b93919c9604"; |
| | | private static final String DataSecretIV = "7c8ac6861661d584"; |
| | | |
| | | private static final String OurDataSecret = "50a61b93919c9605"; |
| | | private static final String OurDataSecretIV = "7c8ac6861661d585"; |
| | | private static final String OurSigSecret = "a6fedf0e1b27d6f6"; |
| | | private static final String OurOperatorID = "MA01H3BQ3"; |
| | | private static final String OurOperatorSecret = "f1331ef0b37c2d1a"; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 推送充电设备接口状态信息 |
| | | * @param chargingGun |
| | | * @return |
| | | */ |
| | | public R pushSuperviseNotificationStationStatus(TChargingGun chargingGun){ |
| | | ConnectorStatusInfo connectorStatusInfo = new ConnectorStatusInfo(); |
| | | connectorStatusInfo.setOperatorID(operatorId); |
| | | connectorStatusInfo.setEquipmentOwnerID(operatorId); |
| | | connectorStatusInfo.setStationID(String.valueOf(chargingGun.getSiteId())); |
| | | connectorStatusInfo.setEquipmentID(String.valueOf(chargingGun.getChargingPileId())); |
| | | connectorStatusInfo.setConnectorID(chargingGun.getFullNumber()); |
| | | connectorStatusInfo.setEquipmentClassification(1); |
| | | switch (chargingGun.getStatus()){ |
| | | case 1: |
| | | connectorStatusInfo.setStatus(0); |
| | | break; |
| | | case 2: |
| | | connectorStatusInfo.setStatus(1); |
| | | break; |
| | | case 3: |
| | | connectorStatusInfo.setStatus(2); |
| | | break; |
| | | case 4: |
| | | connectorStatusInfo.setStatus(3); |
| | | break; |
| | | case 5: |
| | | connectorStatusInfo.setStatus(3); |
| | | break; |
| | | case 6: |
| | | connectorStatusInfo.setStatus(4); |
| | | break; |
| | | case 7: |
| | | connectorStatusInfo.setStatus(255); |
| | | break; |
| | | } |
| | | connectorStatusInfo.setUpdateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); |
| | | List<Operator> operators = operatorClient.getAllOperator().getData(); |
| | | for (Operator operator : operators) { |
| | | tcecSuperviseUtil.notificationStationStatus(operator, connectorStatusInfo); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | /** |
| | | * 推送充电状态信息 |
| | | * @param chargingOrder |
| | | * @return |
| | | */ |
| | | public R pushSuperviseNotificationEquipChargeStatus(TChargingOrder chargingOrder){ |
| | | SupEquipChargeStatus supEquipChargeStatus = new SupEquipChargeStatus(); |
| | | supEquipChargeStatus.setOperatorID(operatorId); |
| | | supEquipChargeStatus.setEquipmentOwnerID(operatorId); |
| | | supEquipChargeStatus.setStationID(String.valueOf(chargingOrder.getSiteId())); |
| | | supEquipChargeStatus.setEquipmentID(String.valueOf(chargingOrder.getChargingPileId())); |
| | | supEquipChargeStatus.setOrderNo(operatorId+chargingOrder.getCode()); |
| | | switch (chargingOrder.getStatus()){ |
| | | case 2: |
| | | supEquipChargeStatus.setConnectorStatus(1); |
| | | break; |
| | | case 3: |
| | | supEquipChargeStatus.setConnectorStatus(2); |
| | | break; |
| | | case 4: |
| | | supEquipChargeStatus.setConnectorStatus(3); |
| | | break; |
| | | case 5: |
| | | supEquipChargeStatus.setConnectorStatus(4); |
| | | break; |
| | | } |
| | | TChargingGun chargingGun = chargingGunClient.getChargingGunById(chargingOrder.getChargingGunId()).getData(); |
| | | supEquipChargeStatus.setConnectorID(chargingGun.getFullNumber()); |
| | | supEquipChargeStatus.setEquipmentClassification(1); |
| | | supEquipChargeStatus.setPushTimeStamp(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); |
| | | switch (chargingGun.getStatus()){ |
| | | case 1: |
| | | supEquipChargeStatus.setConnectorStatus(0); |
| | | break; |
| | | case 2: |
| | | supEquipChargeStatus.setConnectorStatus(1); |
| | | break; |
| | | case 3: |
| | | supEquipChargeStatus.setConnectorStatus(2); |
| | | break; |
| | | case 4: |
| | | supEquipChargeStatus.setConnectorStatus(3); |
| | | break; |
| | | case 5: |
| | | supEquipChargeStatus.setConnectorStatus(3); |
| | | break; |
| | | case 6: |
| | | supEquipChargeStatus.setConnectorStatus(4); |
| | | break; |
| | | case 7: |
| | | supEquipChargeStatus.setConnectorStatus(255); |
| | | break; |
| | | } |
| | | supEquipChargeStatus.setCurrentA(chargingOrder.getCurrent()); |
| | | supEquipChargeStatus.setSOC(new BigDecimal(chargingOrder.getEndSoc())); |
| | | supEquipChargeStatus.setStartTime(chargingOrder.getStartTime() != null ? chargingOrder.getStartTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) : ""); |
| | | supEquipChargeStatus.setEndTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); |
| | | supEquipChargeStatus.setTotalPower(chargingOrder.getElectrovalence()); |
| | | List<Operator> operators = operatorClient.getAllOperator().getData(); |
| | | for (Operator operator : operators) { |
| | | tcecSuperviseUtil.notificationSupEquipChargeStatus(operator, supEquipChargeStatus); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | /** |
| | | * 推送充电订单信息 |
| | | * @param chargingOrder |
| | | * @return |
| | | */ |
| | | public R pushSuperviseNotificationChargeOrderInfo(TChargingOrder chargingOrder){ |
| | | SupChargeOrderInfo supChargeOrderInfo = new SupChargeOrderInfo(); |
| | | supChargeOrderInfo.setOperatorID(operatorId); |
| | | supChargeOrderInfo.setEquipmentOwnerID(operatorId); |
| | | supChargeOrderInfo.setStationID(String.valueOf(chargingOrder.getSiteId())); |
| | | supChargeOrderInfo.setEquipmentID(String.valueOf(chargingOrder.getChargingPileId())); |
| | | supChargeOrderInfo.setOrderNo(operatorId+chargingOrder.getCode()); |
| | | TChargingGun chargingGun = chargingGunClient.getChargingGunById(chargingOrder.getChargingGunId()).getData(); |
| | | supChargeOrderInfo.setConnectorID(chargingGun.getFullNumber()); |
| | | supChargeOrderInfo.setEquipmentClassification(1); |
| | | supChargeOrderInfo.setPushTimeStamp(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); |
| | | supChargeOrderInfo.setStartTime(chargingOrder.getStartTime() != null ? chargingOrder.getStartTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) : ""); |
| | | supChargeOrderInfo.setEndTime(chargingOrder.getEndTime() != null ? chargingOrder.getEndTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) : ""); |
| | | supChargeOrderInfo.setTotalPower(chargingOrder.getElectrovalence()); |
| | | supChargeOrderInfo.setTotalElecMoney(chargingOrder.getElectrovalence()); |
| | | supChargeOrderInfo.setTotalServiceMoney(chargingOrder.getServiceCharge()); |
| | | supChargeOrderInfo.setTotalMoney(chargingOrder.getOrderAmount()); |
| | | switch (chargingOrder.getEndMode()){ |
| | | case 0: |
| | | supChargeOrderInfo.setStopReason(5); |
| | | supChargeOrderInfo.setStopDesc("异常终止"); |
| | | break; |
| | | case 1: |
| | | supChargeOrderInfo.setStopReason(0); |
| | | supChargeOrderInfo.setStopDesc("用户手动停止充电"); |
| | | break; |
| | | case 2: |
| | | supChargeOrderInfo.setStopReason(1); |
| | | supChargeOrderInfo.setStopDesc("客户归属地运营商平台停止充电"); |
| | | break; |
| | | case 3: |
| | | supChargeOrderInfo.setStopReason(1); |
| | | supChargeOrderInfo.setStopDesc("费用不足中止"); |
| | | break; |
| | | } |
| | | |
| | | List<Operator> operators = operatorClient.getAllOperator().getData(); |
| | | for (Operator operator : operators) { |
| | | tcecSuperviseUtil.notificationChargeOrderInfo(operator, supChargeOrderInfo); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | |
| | | // |
| | | // |
| | | // /** |
| | | // * 构建站点数据 |
| | | // * @param sites |
| | | // * @return |
| | | // */ |
| | | // public List<StationInfo> superviseBuildSite(List<TParkingLot> parkingLots, List<Site> sites){ |
| | | // List<Integer> siteIds = sites.stream().map(Site::getId).collect(Collectors.toList()); |
| | | // List<TChargingPile> tChargingPiles = chargingPileClient.getChargingPileBySiteIds(siteIds).getData(); |
| | | // List<Integer> collect1 = tChargingPiles.stream().map(TChargingPile::getId).collect(Collectors.toList()); |
| | | // List<TChargingGun> chargingGunList = chargingGunClient.getChargingGunByChargingPileIds(collect1).getData(); |
| | | // String serviceTel = systemConfigurationClient.getServerPhone().getData(); |
| | | // List<StationInfo> StationInfos = new ArrayList<>(); |
| | | // for (Site datum : sites) { |
| | | // StationInfo stationInfo = new StationInfo(); |
| | | // stationInfo.setStationID(datum.getId().toString()); |
| | | // stationInfo.setStationUniqueNumber(datum.getDistrictsCode() + "906171535" + datum.getId()); |
| | | // stationInfo.setOperatorID("906171535"); |
| | | // stationInfo.setEquipmentOwnerID("906171535"); |
| | | // stationInfo.setStationName(datum.getName()); |
| | | // stationInfo.setCountryCode(StringUtils.isNotEmpty(datum.getCountryCode()) ? datum.getCountryCode() : "CN"); |
| | | // stationInfo.setAreaCode(datum.getDistrictsCode()); |
| | | // stationInfo.setAreaCodeCountryside(); |
| | | // stationInfo.setAddress(datum.getAddress()); |
| | | // stationInfo.setStationTel(datum.getPhone()); |
| | | // stationInfo.setServiceTel(serviceTel); |
| | | // switch (datum.getSiteType()){ |
| | | // case 0: |
| | | // stationInfo.setStationType(StationTypeEnum.OTHER.getType()); |
| | | // break; |
| | | // case 1: |
| | | // stationInfo.setStationType(StationTypeEnum.PUBLIC.getType()); |
| | | // break; |
| | | // case 2: |
| | | // stationInfo.setStationType(StationTypeEnum.PERSONAGE.getType()); |
| | | // break; |
| | | // case 3: |
| | | // stationInfo.setStationType(StationTypeEnum.BUS_SPECIFIC.getType()); |
| | | // break; |
| | | // case 4: |
| | | // stationInfo.setStationType(StationTypeEnum.SANITATION_SPECIFIC.getType()); |
| | | // break; |
| | | // case 5: |
| | | // stationInfo.setStationType(StationTypeEnum.LOGISTICS_SPECIFIC.getType()); |
| | | // break; |
| | | // case 6: |
| | | // stationInfo.setStationType(StationTypeEnum.TEXT_SPECIFIC.getType()); |
| | | // break; |
| | | // } |
| | | // if(datum.getStatus() == 1){ |
| | | // stationInfo.setStationStatus(StationStatusEnum.NORMAL_USE.getStatus()); |
| | | // } |
| | | // if(datum.getStatus() == 2){ |
| | | // stationInfo.setStationStatus(StationStatusEnum.MAINTAIN.getStatus()); |
| | | // } |
| | | // if(datum.getStatus() == 3){ |
| | | // stationInfo.setStationStatus(StationStatusEnum.OFF_LINE.getStatus()); |
| | | // } |
| | | // stationInfo.setParkNums(datum.getParkingSpace()); |
| | | // stationInfo.setStationLat(new BigDecimal(datum.getLat()).setScale(6, RoundingMode.DOWN)); |
| | | // stationInfo.setStationLng(new BigDecimal(datum.getLon()).setScale(6, RoundingMode.DOWN)); |
| | | // stationInfo.setConstruction(datum.getConstructionSite() == 0 ? ConstructionEnum.OTHER.getType() : datum.getConstructionSite()); |
| | | // stationInfo.setPictures(StringUtils.isNotEmpty(datum.getImgUrl()) ? Arrays.asList(datum.getImgUrl().split(",")) : new ArrayList<>()); |
| | | // stationInfo.setSiteGuide(datum.getGuide()); |
| | | // stationInfo.setMatchCars(datum.getVehicleDescription()); |
| | | // stationInfo.setBusineHours(datum.getStartServiceTime() + "-" + datum.getEndServiceTime()); |
| | | // stationInfo.setElectricityFee(datum.getRateDescription()); |
| | | // //添加停车费信息 |
| | | // Optional<TParkingLot> first = parkingLots.stream().filter(s -> s.getSiteId().equals(datum.getId())).findFirst(); |
| | | // if(first.isPresent()){ |
| | | // TParkingLot tParkingLot = first.get(); |
| | | // superviseBuildPlaceHolder(tParkingLot, stationInfo); |
| | | // } |
| | | // |
| | | // //构建充电设备信息数据 |
| | | // stationInfo.setEquipmentInfos(superviseBuildEquipmentInfo(datum.getId(), tChargingPiles, chargingGunList)); |
| | | // StationInfos.add(stationInfo); |
| | | // |
| | | // } |
| | | // return StationInfos; |
| | | // } |
| | | // |
| | | // |
| | | // /** |
| | | // * 构建停车费信息 |
| | | // * @param tParkingLot |
| | | // * @param stationInfo |
| | | // */ |
| | | // public void superviseBuildPlaceHolder(TParkingLot tParkingLot, StationInfo stationInfo){ |
| | | // stationInfo.setOvertimeFee(tParkingLot.getName() + "停车费"); |
| | | // PlaceHolder placeHolder = new PlaceHolder(); |
| | | // placeHolder.setFreeTime(tParkingLot.getChargeFreeDuration()); |
| | | // placeHolder.setMaxFee(tParkingLot.getChargeCapping()); |
| | | // List<PlaceHolderPrice> PlaceHolderPrices = new ArrayList<>(); |
| | | // PlaceHolderPrice placeHolderPrice = new PlaceHolderPrice(); |
| | | // placeHolderPrice.setStartTime("00:00"); |
| | | // placeHolderPrice.setEndTime("23:59"); |
| | | // placeHolderPrice.setPrice(tParkingLot.getChargeRate()); |
| | | // PlaceHolderPrices.add(placeHolderPrice); |
| | | // placeHolder.setPlaceHolderPrices(PlaceHolderPrices); |
| | | // stationInfo.setPlaceHolder(placeHolder); |
| | | // } |
| | | // |
| | | // |
| | | // |
| | | // |
| | | // /** |
| | | // * 构建桩数据 |
| | | // * @param tChargingPiles |
| | | // * @return |
| | | // */ |
| | | // public List<EquipmentInfo> superviseBuildEquipmentInfo(Integer siteId, List<TChargingPile> tChargingPiles, List<TChargingGun> chargingGunList){ |
| | | // List<EquipmentInfo> equipmentInfos = new ArrayList<>(); |
| | | // List<TChargingPile> collect = tChargingPiles.stream().filter(s -> s.getSiteId().equals(siteId)).collect(Collectors.toList()); |
| | | // for (TChargingPile tChargingPile : collect) { |
| | | // EquipmentInfo equipmentInfo = new EquipmentInfo(); |
| | | // equipmentInfo.setEquipmentID(tChargingPile.getId().toString()); |
| | | // equipmentInfo.setManufacturerID(tChargingPile.getManufacturerCode()); |
| | | // equipmentInfo.setManufacturerName(tChargingPile.getManufacturer()); |
| | | // equipmentInfo.setEquipmentModel(tChargingPile.getEquipmentType()); |
| | | // if(null != tChargingPile.getProductionDate()){ |
| | | // equipmentInfo.setProductionDate(tChargingPile.getProductionDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | // } |
| | | // switch (tChargingPile.getType()){ |
| | | // case 0: |
| | | // equipmentInfo.setEquipmentType(EquipmentTypeEnum.OTHER.getType()); |
| | | // break; |
| | | // case 1: |
| | | // equipmentInfo.setEquipmentType(EquipmentTypeEnum.DIRECT_CURRENT.getType()); |
| | | // break; |
| | | // case 2: |
| | | // equipmentInfo.setEquipmentType(EquipmentTypeEnum.ALTERNATING_CURRENT.getType()); |
| | | // break; |
| | | // case 3: |
| | | // equipmentInfo.setEquipmentType(EquipmentTypeEnum.ALTERNATING_DIRECT.getType()); |
| | | // break; |
| | | // case 4: |
| | | // equipmentInfo.setEquipmentType(EquipmentTypeEnum.WIRELESS_DEVICE.getType()); |
| | | // break; |
| | | // } |
| | | // |
| | | // //构建设备接口信息 |
| | | // equipmentInfo.setConnectorInfos(superviseBuildConnectorInfos(tChargingPile.getId(), tChargingPile.getCode(), chargingGunList)); |
| | | // equipmentInfo.setPower(tChargingPile.getRatedPower()); |
| | | // equipmentInfos.add(equipmentInfo); |
| | | // } |
| | | // return equipmentInfos; |
| | | // } |
| | | // |
| | | // |
| | | // /** |
| | | // * 构建接口数据 |
| | | // * @param chargingGunList |
| | | // * @return |
| | | // */ |
| | | // public List<ConnectorInfo> superviseBuildConnectorInfos(Integer chargingPileId, String code, List<TChargingGun> chargingGunList){ |
| | | // List<ConnectorInfo> connectorInfos = new ArrayList<>(); |
| | | // List<TChargingGun> collect = chargingGunList.stream().filter(s -> s.getChargingPileId().equals(chargingPileId)).collect(Collectors.toList()); |
| | | // for (TChargingGun chargingGun : collect) { |
| | | // ConnectorInfo connectorInfo = new ConnectorInfo(); |
| | | // connectorInfo.setConnectorID(chargingGun.getFullNumber()); |
| | | // connectorInfo.setConnectorName(chargingGun.getName()); |
| | | // switch (chargingGun.getType()){ |
| | | // case 0: |
| | | // connectorInfo.setConnectorType(ConnectorTypeEnum.OTHER.getType()); |
| | | // break; |
| | | // case 1: |
| | | // connectorInfo.setConnectorType(ConnectorTypeEnum.HOUSEHOLD_SOCKET.getType()); |
| | | // break; |
| | | // case 2: |
| | | // connectorInfo.setConnectorType(ConnectorTypeEnum.AC_SOCKET.getType()); |
| | | // break; |
| | | // case 3: |
| | | // connectorInfo.setConnectorType(ConnectorTypeEnum.AC_INTERFACE_PLUG.getType()); |
| | | // break; |
| | | // case 4: |
| | | // connectorInfo.setConnectorType(ConnectorTypeEnum.DC_INTERFACE_GUN_HEAD.getType()); |
| | | // break; |
| | | // case 5: |
| | | // connectorInfo.setConnectorType(ConnectorTypeEnum.WIRELESS_CHARGING_STAND.getType()); |
| | | // break; |
| | | // } |
| | | // connectorInfo.setVoltageUpperLimits(chargingGun.getUpperRatedVoltage().intValue()); |
| | | // connectorInfo.setVoltageLowerLimits(chargingGun.getLowerLimitOfRatedVoltage().intValue()); |
| | | // connectorInfo.setCurrent(chargingGun.getRatedCurrent().intValue()); |
| | | // connectorInfo.setPower(chargingGun.getRatedPower()); |
| | | // connectorInfo.setParkNo(chargingGun.getParkingNumber()); |
| | | // connectorInfo.setNationalStandard(Integer.valueOf(chargingGun.getNationalStandard())); |
| | | // connectorInfo.setQRCode("https://mxcd.zhinenganguan.com?No=" + code + chargingGun.getCode()); |
| | | // connectorInfos.add(connectorInfo); |
| | | // } |
| | | // return connectorInfos; |
| | | // } |
| | | |
| | | } |