From 7a4f9541331bef779a506b38a27ed5c3373c0bec Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期四, 15 五月 2025 13:53:22 +0800 Subject: [PATCH] 开发二级等保功能及心跳消息队列修改 --- ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/util/TCECCJianGuanontroller.java | 61 +++++++++++++++++++----------- 1 files changed, 39 insertions(+), 22 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 e2425a7..1894f2a 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((Integer.parseInt(datum.getCityCode())+1)+""); 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,7 +341,6 @@ 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); @@ -1796,7 +1798,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 +1816,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 +1853,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 +2118,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 +2162,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 +2192,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()); -- Gitblit v1.7.1