From 0235d76b98f78a1ac038d98540477a82bc127a03 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期五, 20 六月 2025 10:07:47 +0800 Subject: [PATCH] 监管平台bug修改 --- ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/util/TCECCJianGuanontroller.java | 88 ++++++++++++++++++++++++++++++------------- 1 files changed, 61 insertions(+), 27 deletions(-) diff --git a/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/util/TCECCJianGuanontroller.java b/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/util/TCECCJianGuanontroller.java index cffcc2a..4a2d8f5 100644 --- a/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/util/TCECCJianGuanontroller.java +++ b/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/util/TCECCJianGuanontroller.java @@ -260,7 +260,7 @@ if(null == pageSize){ pageSize = 10; } - PageInfo<Site> siteListPaging = siteClient.getSiteListPaging(pageNo, pageSize, new ArrayList<>()); + PageInfo<Site> siteListPaging = siteClient.getSiteListPagingJianGuan(pageNo, pageSize, new ArrayList<>()); List<TParkingLot> parkingLots = parkingLotClient.getAllParkingLot().getData(); QueryStationsInfoResult queryStationsInfoResult = new QueryStationsInfoResult(); queryStationsInfoResult.setPageNo(pageNo); @@ -293,7 +293,8 @@ for (Site datum : sites) { StationInfo stationInfo = new StationInfo(); stationInfo.setStationUniqueNumber(datum.getCode()); - stationInfo.setAreaCodeCountryside(datum.getCountryCode()); + stationInfo.setAreaCodeCountryside(datum.getDistrictsCode()); + stationInfo.setAreaCode(datum.getCityCode()); stationInfo.setStationClassification(datum.getStationClassification()); stationInfo.setGeneralApplicationType(datum.getGeneralApplicationType()); if (org.springframework.util.StringUtils.hasLength(datum.getSwapMatchCars())){ @@ -303,7 +304,9 @@ stationInfo.setBusineHours(datum.getStartServiceTime()); stationInfo.setRoundTheClock(datum.getRoundTheClock()); stationInfo.setParkType(datum.getParkType()); - stationInfo.setElectricityFee("{"+datum.getElectricityFee()+"}"); + if (org.springframework.util.StringUtils.hasLength(datum.getElectricityFee())){ + stationInfo.setElectricityFee("{"+datum.getElectricityFee()+"}"); + } stationInfo.setServiceFee("{"+datum.getServiceFee()+"}"); stationInfo.setParkFee("{\"rules\":"+datum.getParkFee()+","+"\"freeDuration\":"+datum.getParkFeeFree()+"}"); stationInfo.setElectricityType(datum.getElectricityType()); @@ -338,10 +341,11 @@ stationInfo.setEquipmentOwnerID("906171535"); stationInfo.setStationName(datum.getName()); stationInfo.setCountryCode(StringUtils.isNotEmpty(datum.getCountryCode()) ? datum.getCountryCode() : "CN"); - stationInfo.setAreaCode(datum.getDistrictsCode()); stationInfo.setAddress(datum.getAddress()); - stationInfo.setStationTel(datum.getPhone()); - stationInfo.setServiceTel(serviceTel); +// stationInfo.setStationTel(datum.getPhone()); + stationInfo.setStationTel(StringUtils.isNotEmpty(datum.getPhone()) ? datum.getPhone().split(",")[0] : ""); + stationInfo.setServiceTel(StringUtils.isNotEmpty(serviceTel) ? serviceTel.split(",")[0] : ""); +// stationInfo.setServiceTel(serviceTel); switch (datum.getSiteType()){ case 0: stationInfo.setStationType(StationTypeEnum.OTHER.getType()); @@ -1796,7 +1800,7 @@ if(stationIDs==null){ stationIDs = new ArrayList<String>(); } - PageInfo<Site> siteListPaging = siteClient.getSiteListPaging(pageNo, pageSize, stationIDs); + PageInfo<Site> siteListPaging = siteClient.getSiteListPagingJianGuan(pageNo, pageSize, stationIDs); List<TParkingLot> parkingLots = parkingLotClient.getAllParkingLot().getData(); QueryStationsInfoResult queryStationsInfoResult = new QueryStationsInfoResult(); queryStationsInfoResult.setPageNo(pageNo); @@ -1814,13 +1818,17 @@ } stationInfo.setRoundTheClock(stationInfo.getRoundTheClock()==null?1:stationInfo.getRoundTheClock()); stationInfo.setParkType(stationInfo.getParkType()==null?1:stationInfo.getParkType()); - stationInfo.setElectricityFee("{\"00:00:00-00:30:00\":\"0.4901\",\"00:00:30-01:00:00\":\"0.1234\"}"); - stationInfo.setServiceFee("{"+"\"00:00:00-00:30:00\":\"0.4901\",\"00:00:30-01:00:00\":\"0.1234\""+"}"); + if (!org.springframework.util.StringUtils.hasLength(stationInfo.getElectricityFee())){ + stationInfo.setElectricityFee("{\"00:00:00-00:30:00\":\"0.4901\",\"00:00:30-01:00:00\":\"0.1234\"}"); + } + if (!org.springframework.util.StringUtils.hasLength(stationInfo.getServiceFee())){ + stationInfo.setServiceFee("{"+"\"00:00:00-00:30:00\":\"0.4901\",\"00:00:30-01:00:00\":\"0.1234\""+"}"); + } stationInfo.setElectricityType(stationInfo.getElectricityType()==null?1:stationInfo.getElectricityType()); stationInfo.setBusinessExpandType(stationInfo.getBusinessExpandType()==null?1:stationInfo.getBusinessExpandType()); stationInfo.setCapacity(stationInfo.getCapacity()==null?new BigDecimal("1.0000"):stationInfo.getCapacity()); stationInfo.setRatedPower(stationInfo.getCapacity()==null?new BigDecimal("40.0000"):stationInfo.getCapacity()); - stationInfo.setPeriodFee(1); + stationInfo.setPeriodFee(stationInfo.getPeriodFee()==null?1:stationInfo.getPeriodFee()); stationInfo.setOfficialRunTime(org.springframework.util.StringUtils.hasLength(stationInfo.getOfficialRunTime())?stationInfo.getOfficialRunTime():"2025-01-01"); stationInfo.setVideoMonitor(stationInfo.getVideoMonitor()==null?1:stationInfo.getVideoMonitor()); int i = 0; @@ -1847,14 +1855,22 @@ } stationInfo.setEquipmentOwnerName("明星新能源"); - stationInfo.setResidentNo("A1234"); + if (org.springframework.util.StringUtils.hasLength(stationInfo.getResidentNo())){ + stationInfo.setResidentNo(stationInfo.getResidentNo()); + }else{ + stationInfo.setResidentNo("A1234"); + + } stationInfo.setSupplyType(stationInfo.getSupplyType()==null?1:stationInfo.getSupplyType()); stationInfo.setWattHourMeterNo(org.springframework.util.StringUtils.hasLength(stationInfo.getWattHourMeterNo())?stationInfo.getWattHourMeterNo():UUID.randomUUID().toString().replaceAll("-", "")); stationInfo.setForwardPower(stationInfo.getForwardPower()==null?"1.3654":stationInfo.getForwardPower()); String uuid = UUID.randomUUID().toString(); String randomString = uuid.replaceAll("-", ""); // 去除'-' - stationInfo.setRecordUniqueNo(randomString); - + if (org.springframework.util.StringUtils.hasLength(stationInfo.getRecordUniqueNo())){ + stationInfo.setRecordUniqueNo(stationInfo.getRecordUniqueNo()); + }else{ + stationInfo.setRecordUniqueNo(randomString); + } } String timeStamp = System.currentTimeMillis() + ""; SequenceGenerator generator = new SequenceGenerator(); @@ -2104,10 +2120,8 @@ 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); - } + + tcecSuperviseUtil.notificationSupEquipChargeStatus(new Operator(), supEquipChargeStatus); return R.ok(); } /** @@ -2150,11 +2164,7 @@ supChargeOrderInfo.setStopDesc("费用不足中止"); break; } - - List<Operator> operators = operatorClient.getAllOperator().getData(); - for (Operator operator : operators) { - tcecSuperviseUtil.notificationChargeOrderInfo(operator, supChargeOrderInfo); - } + tcecSuperviseUtil.notificationChargeOrderInfo(new Operator(), supChargeOrderInfo); return R.ok(); } @@ -2184,9 +2194,18 @@ stationInfo.setConstruction(255); } stationInfo.setRoundTheClock(stationInfo.getRoundTheClock()==null?1:stationInfo.getRoundTheClock()); + stationInfo.setRoundTheClock(0); stationInfo.setParkType(stationInfo.getParkType()==null?1:stationInfo.getParkType()); - stationInfo.setElectricityFee("{\"00:00:00-00:30:00\":\"0.4901\",\"00:00:30-01:00:00\":\"0.1234\"}"); - stationInfo.setServiceFee("{"+"\"00:00:00-00:30:00\":\"0.4901\",\"00:00:30-01:00:00\":\"0.1234\""+"}"); + if (org.springframework.util.StringUtils.hasLength(site.getElectricityFee())){ + stationInfo.setElectricityFee("{"+site.getElectricityFee()+"}"); + }else{ + stationInfo.setElectricityFee("{\"00:00:00-00:30:00\":\"0.4901\",\"00:00:30-01:00:00\":\"0.1234\"}"); + } + if (org.springframework.util.StringUtils.hasLength(site.getServiceFee())){ + stationInfo.setServiceFee("{"+site.getServiceFee()+"}"); + }else{ + stationInfo.setServiceFee("{"+"\"00:00:00-00:30:00\":\"0.4901\",\"00:00:30-01:00:00\":\"0.1234\""+"}"); + } stationInfo.setElectricityType(stationInfo.getElectricityType()==null?1:stationInfo.getElectricityType()); stationInfo.setBusinessExpandType(stationInfo.getBusinessExpandType()==null?1:stationInfo.getBusinessExpandType()); stationInfo.setCapacity(stationInfo.getCapacity()==null?new BigDecimal("1.0000"):stationInfo.getCapacity()); @@ -2217,14 +2236,29 @@ equipmentInfo.setEquipmentClassification(equipmentInfo.getEquipmentClassification()==null?1:equipmentInfo.getEquipmentClassification()); } - stationInfo.setEquipmentOwnerName("明星新能源"); - stationInfo.setResidentNo("A1234"); + if (org.springframework.util.StringUtils.hasLength(site.getEquipmentOwnerName())){ + stationInfo.setEquipmentOwnerName(site.getEquipmentOwnerName()); + }else{ + stationInfo.setEquipmentOwnerName("明星新能源"); + + } + if (org.springframework.util.StringUtils.hasLength(site.getResidentNo())){ + stationInfo.setResidentNo(site.getResidentNo()); + }else{ + stationInfo.setResidentNo("A1234"); + + } stationInfo.setSupplyType(stationInfo.getSupplyType()==null?1:stationInfo.getSupplyType()); stationInfo.setWattHourMeterNo(org.springframework.util.StringUtils.hasLength(stationInfo.getWattHourMeterNo())?stationInfo.getWattHourMeterNo():UUID.randomUUID().toString().replaceAll("-", "")); stationInfo.setForwardPower(stationInfo.getForwardPower()==null?"1.3654":stationInfo.getForwardPower()); String uuid = UUID.randomUUID().toString(); String randomString = uuid.replaceAll("-", ""); // 去除'-' - stationInfo.setRecordUniqueNo(randomString); + if (org.springframework.util.StringUtils.hasLength(site.getRecordUniqueNo())){ + stationInfo.setRecordUniqueNo(site.getRecordUniqueNo()); + }else{ + stationInfo.setRecordUniqueNo("A123998987hjn4"); + + } } BaseResult baseResult = new BaseResult(); -- Gitblit v1.7.1