Pu Zhibing
2025-05-15 7a4f9541331bef779a506b38a27ed5c3373c0bec
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());
@@ -2217,14 +2234,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();