Pu Zhibing
2025-02-20 fc3cef7bd2c71ff99767f463531c671a34b7ad21
增加部分上传监管平台接口和新增退款手续费数据存储
2个文件已添加
19个文件已修改
666 ■■■■■ 已修改文件
ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/factory/SiteFallbackFactory.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/feignClient/SiteClient.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/model/TChargingOrderRefund.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/model/TShoppingOrderRefund.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/model/TVipOrderRefund.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/factory/WxPaymentFallbackFactory.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/feignClient/WxPaymentClient.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TChargingPileServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-integration/pom.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/TCECController.java 301 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/model/QueryStationsInfo.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/model/StationInfo.java 178 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/model/SuperviseQueryOperatorInfo.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/model/SuperviseQueryOperatorInfoResult.java 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/model/enu/ConstructionEnum.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/model/enu/StationTypeEnum.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TShoppingOrderController.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TShoppingOrderServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/controller/WxPayController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/factory/SiteFallbackFactory.java
@@ -61,7 +61,7 @@
            }
            @Override
            public PageInfo<Site> getSiteListPaging(Integer PageNo, Integer PageSize) {
            public PageInfo<Site> getSiteListPaging(Integer PageNo, Integer PageSize, List<String> ids) {
                return null;
            }
        };
ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/feignClient/SiteClient.java
@@ -52,5 +52,7 @@
     * @return
     */
    @PostMapping("/site/getSiteListPaging")
    PageInfo<Site> getSiteListPaging(@RequestParam("PageNo") Integer PageNo, @RequestParam("PageSize") Integer PageSize);
    PageInfo<Site> getSiteListPaging(@RequestParam("PageNo") Integer PageNo,
                                     @RequestParam("PageSize") Integer PageSize,
                                     @RequestParam("ids") List<String> ids);
}
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/model/TChargingOrderRefund.java
@@ -89,6 +89,10 @@
    @ApiModelProperty(value = "累计退款金额")
    @TableField("pay_amount")
    private BigDecimal payAmount;
    @ApiModelProperty(value = "手续费")
    @TableField("refund_fee")
    private BigDecimal refundFee;
    @TableField(exist = false)
    private Integer type;
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/model/TShoppingOrderRefund.java
@@ -96,6 +96,10 @@
    @ApiModelProperty(value = "累计退款金额")
    @TableField("refund_total_amount")
    private BigDecimal refundTotalAmount;
    @ApiModelProperty(value = "手续费")
    @TableField("refund_fee")
    private BigDecimal refundFee;
}
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/model/TVipOrderRefund.java
@@ -89,6 +89,10 @@
    @ApiModelProperty(value = "累计退款金额")
    @TableField("refund_total_amount")
    private BigDecimal refundTotalAmount;
    @ApiModelProperty(value = "手续费")
    @TableField("refund_fee")
    private BigDecimal refundFee;
}
ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/factory/WxPaymentFallbackFactory.java
@@ -45,7 +45,7 @@
            }
            @Override
            public R<String> refundOrderR(WxPaymentRefundModel model) {
            public R<Map<String, Object>> refundOrderR(WxPaymentRefundModel model) {
                return R.fail("微信退款失败:" + throwable.getMessage());
            }
        };
ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/feignClient/WxPaymentClient.java
@@ -51,5 +51,5 @@
    @ApiOperation("订单退款")
    @PostMapping(value = "/wx/refundOrderR")
    public R<String> refundOrderR(@RequestBody WxPaymentRefundModel model);
    R<Map<String, Object>> refundOrderR(@RequestBody WxPaymentRefundModel model);
}
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java
@@ -619,9 +619,9 @@
     * @return
     */
    @PostMapping("/getSiteListPaging")
    public PageInfo<Site> getSiteListPaging(@RequestParam("PageNo") Integer PageNo, @RequestParam("PageSize") Integer PageSize){
    public PageInfo<Site> getSiteListPaging(@RequestParam("PageNo") Integer PageNo, @RequestParam("PageSize") Integer PageSize, @RequestParam("ids") List<String> ids){
        PageInfo<Site> pageInfo = new PageInfo<>(PageNo, PageSize);
        PageInfo<Site> page = siteService.lambdaQuery().eq(Site::getStatus, 1).page(pageInfo);
        PageInfo<Site> page = siteService.lambdaQuery().eq(Site::getStatus, 1).in(ids.size() > 0, Site::getId, ids).page(pageInfo);
        return page;
    }
}
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TChargingPileServiceImpl.java
@@ -740,7 +740,6 @@
                        siteName = siteName.substring(0,10);
                    }
                    chargingPileNotificationService.saveData(4,faultMessage.getSiteId(),faultMessage.getChargingPileId(),site.getPhone(),"检测到"+siteName+"..."+chargingPile.getNumber()+"号桩设备离线,请及时查看处理!");
                }
            }
        }
ruoyi-service/ruoyi-integration/pom.xml
@@ -152,12 +152,12 @@
        <dependency>
            <groupId>com.huaweicloud.sdk</groupId>
            <artifactId>huaweicloud-sdk-core</artifactId>
            <version>[3.0.40-rc,3.2.0)</version>
            <version>[3.0.40-rc,3.1.135)</version>
        </dependency>
        <dependency>
            <groupId>com.huaweicloud.sdk</groupId>
            <artifactId>huaweicloud-sdk-iotda</artifactId>
            <version>[3.0.40-rc,3.2.0)</version>
            <version>[3.0.40-rc,3.1.135)</version>
        </dependency>
        <dependency>
            <groupId>com.huaweicloud.sdk</groupId>
ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/TCECController.java
@@ -244,7 +244,7 @@
        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);
@@ -1633,4 +1633,303 @@
        queryChargeOrderInfoResult.setOrderInfos(orderInfos);
        return queryChargeOrderInfoResult;
    }
    /*********************数据监管平台接口*********************/
    /**
     * 查询运营商信息
     * @param baseRequest
     * @param request
     * @return
     */
    @PostMapping("/supervise_query_operator_info")
    public BaseResult superviseQueryOperatorInfo(@RequestBody BaseRequest baseRequest, HttpServletRequest request){
        log.info("监管平台查询充电站信息请求参数:" + JacksonUtils.toJson(baseRequest));
        //校验token和签名
        BaseResult baseResult = requestCheck(true, baseRequest, request);
        if(0 != baseResult.getRet()){
            log.info("监管平台查询充电站信息响应Data:");
            baseResult.setData("");
            baseResult.setSig(TCECUtil.ourBuildSign(baseResult));
            log.info("监管平台查询充电站信息响应参数:" + JacksonUtils.toJson(baseResult));
            return baseResult;
        }
        Operator operator = baseResult.getOperator();
        //解密参数
        String decrypt = AESUtil.decrypt(baseRequest.getData(), operator.getOurDataSecret(), operator.getOurDataSecretIv());
        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();
        SuperviseQueryOperatorInfoResult superviseQueryOperatorInfoResult = new SuperviseQueryOperatorInfoResult();
        superviseQueryOperatorInfoResult.setOperatorID("906171535");
        superviseQueryOperatorInfoResult.setOperatorUSCID("91510903906171535D");
        superviseQueryOperatorInfoResult.setOperatorName("四川明星新能源科技有限公司");
        superviseQueryOperatorInfoResult.setOperatorTel1(operatorTel);
        //参数加密
        String jsonString = JacksonUtils.toJson(superviseQueryOperatorInfoResult);
        log.info("监管平台查询充电站信息响应Data:" + jsonString);
        String encrypt = AESUtil.encrypt(jsonString, operator.getOurDataSecret(), operator.getOurDataSecretIv());
        baseResult.setData(encrypt);
        baseResult.setSig(TCECUtil.ourBuildSign(baseResult));
        log.info("监管平台查询充电站信息响应参数:" + JacksonUtils.toJson(baseResult));
        return baseResult;
    }
//    /**
//     * 查询充电站信息
//     * @param baseRequest
//     * @param request
//     * @return
//     */
//    @PostMapping("/supervise_query_stations_info")
//    public BaseResult superviseQueryStationsInfo(@RequestBody BaseRequest baseRequest, HttpServletRequest request){
//        log.info("监管平台查询充电站信息请求参数:" + JacksonUtils.toJson(baseRequest));
//        //校验token和签名
//        BaseResult baseResult = requestCheck(true, baseRequest, request);
//        if(0 != baseResult.getRet()){
//            log.info("监管平台查询充电站信息响应Data:");
//            baseResult.setData("");
//            baseResult.setSig(TCECUtil.ourBuildSign(baseResult));
//            log.info("监管平台查询充电站信息响应参数:" + JacksonUtils.toJson(baseResult));
//            return baseResult;
//        }
//        Operator operator = baseResult.getOperator();
//        //解密参数
//        String decrypt = AESUtil.decrypt(baseRequest.getData(), operator.getOurDataSecret(), operator.getOurDataSecretIv());
//        log.info("监管平台查询充电站信息请求Data:" + 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(superviseBuildSite(parkingLots, siteListPaging.getRecords()));
//        //参数加密
//        String jsonString = JacksonUtils.toJson(queryStationsInfoResult);
//        log.info("监管平台查询充电站信息响应Data:" + jsonString);
//        String encrypt = AESUtil.encrypt(jsonString, operator.getOurDataSecret(), operator.getOurDataSecretIv());
//        baseResult.setData(encrypt);
//        baseResult.setSig(TCECUtil.ourBuildSign(baseResult));
//        log.info("监管平台查询充电站信息响应参数:" + JacksonUtils.toJson(baseResult));
//        return baseResult;
//    }
//
//
//    /**
//     * 构建站点数据
//     * @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;
//    }
}
ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/model/QueryStationsInfo.java
@@ -4,6 +4,7 @@
import lombok.Data;
import javax.validation.constraints.Null;
import java.util.List;
/**
 * @author zhibing.pu
@@ -32,4 +33,17 @@
    @Null
    @JsonProperty("PageSize")
    private Integer pageSize;
    /**
     * 运营商ID
     */
    @Null
    @JsonProperty("OperatorID")
    private String OperatorID;
    /**
     * 充电站ID列表
     */
    @Null
    @JsonProperty("StationIDs")
    private List<String> StationIDs;
}
ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/model/StationInfo.java
@@ -22,6 +22,12 @@
    @JsonProperty("StationID")
    private String stationID;
    /**
     * 充电站唯一编码
     */
    @NotNull
    @JsonProperty("StationUniqueNumber")
    private String stationUniqueNumber;
    /**
     * 运营商ID
     */
    @NotNull
@@ -53,6 +59,12 @@
    @JsonProperty("AreaCode")
    private String areaCode;
    /**
     * 充电站所在县以下行政区划代码
     */
    @NotNull
    @JsonProperty("AreaCodeCountryside")
    private String areaCodeCountryside;
    /**
     * 详细地址
     */
    @NotNull
@@ -70,6 +82,18 @@
    @NotNull
    @JsonProperty("ServiceTel")
    private String serviceTel;
    /**
     * 站点分类(1:充电站,2:换电站,3:充换电一体站)
     */
    @NotNull
    @JsonProperty("StationClassification")
    private Integer stationClassification;
    /**
     * 通用类型(1:通用,2:非通用)
     */
    @NotNull
    @JsonProperty("GeneralApplicationType")
    private Integer generalApplicationType;
    /**
     * 站点类型
     */
@@ -126,6 +150,12 @@
    @JsonProperty("MatchCars")
    private String matchCars;
    /**
     * 服务车型描述
     */
    @Null
    @JsonProperty("SwapMatchCars")
    private List<String> swapMatchCars;
    /**
     * 车位楼层及数量描述
     */
    @Null
@@ -137,6 +167,25 @@
    @Null
    @JsonProperty("BusineHours")
    private String busineHours;
    /**
     * 7*24小时营业
     * 0:否
     * 1:是
     */
    @Null
    @JsonProperty("RoundTheClock")
    private Integer roundTheClock;
    /**
     * 停车费类型
     * 0:免费
     * 1:不免费
     * 2:限时免费停车
     * 3:充电限时减免
     * 255:参考场地实际收费标准
     */
    @Null
    @JsonProperty("ParkType")
    private Integer parkType;
    /**
     * 充电电费率描述
     */
@@ -174,6 +223,103 @@
    @JsonProperty("Remark")
    private String remark;
    /**
     * 电费类型
     * 1:商业用电
     * 2:普通工业用电
     * 3:大工业用电
     * 4:其他用电
     */
    @JsonProperty("ElectricityType")
    private Integer electricityType;
    /**
     * 报装类型,是否独立报装
     * 0:否
     * 1:是
     */
    @JsonProperty("BusinessExpandType")
    private Integer businessExpandType;
    /**
     * 报装电源容量
     */
    @JsonProperty("Capacity")
    private Double capacity;
    /**
     * 站点额定总功率
     */
    @JsonProperty("RatedPower")
    private Double ratedPower;
    /**
     * 峰谷分时
     * 0:否
     * 1:是
     */
    @JsonProperty("PeriodFee")
    private Integer periodFee;
    /**
     * 正式投运时间 yyyy-MM-dd
     */
    @JsonProperty("OfficialRunTime")
    private String officialRunTime;
    /**
     * 充换电站方位
     * 1:地面-停车场
     * 2:地面-路侧
     * 3:地下停车场
     * 4:立体式停车楼
     */
    @JsonProperty("StationOrientation")
    private Integer stationOrientation;
    /**
     * 充换电站建设面积
     */
    @JsonProperty("StationArea")
    private Double stationArea;
    /**
     * 充换电站人工值守
     * 0:无
     * 1:有
     */
    @JsonProperty("HavePerson")
    private Integer havePerson;
    /**
     * 视频监控配套情况
     * 0:无
     * 1:有
     */
    @JsonProperty("VideoMonitor")
    private Integer videoMonitor;
    /**
     * 周边配套设施
     * 1:卫生间
     * 2:便利店
     * 3:餐厅
     * 4:休息室
     * 5:雨棚
     */
    @JsonProperty("SupportingFacilities")
    private List<Integer> supportingFacilities;
    /**
     * 是否有小票机
     * 0:无
     * 1:有
     */
    @JsonProperty("PrinterFlag")
    private Integer printerFlag;
    /**
     * 是否有道闸
     * 0:无
     * 1:有
     */
    @JsonProperty("BarrierFlag")
    private Integer barrierFlag;
    /**
     * 是否有地锁
     * 0:无
     * 1:有
     */
    @JsonProperty("ParkingLockFlag")
    private Integer parkingLockFlag;
    /**
     * 充电设备信息列表
     */
    @NotNull
@@ -191,4 +337,36 @@
    @Null
    @JsonProperty("PlaceHolder")
    private PlaceHolder placeHolder;
    /**
     * 设备所属方名称
     */
    @JsonProperty("EquipmentOwnerName")
    private String equipmentOwnerName;
    /**
     * 供电局用户编号
     */
    @JsonProperty("ResidentNo")
    private String residentNo;
    /**
     * 供电类型
     * 1:直供电
     * 2:转供电
     */
    @JsonProperty("SupplyType")
    private Integer supplyType;
    /**
     * 表号
     */
    @JsonProperty("WattHourMeterNo")
    private String wattHourMeterNo;
    /**
     * 外电功率
     */
    @JsonProperty("ForwardPower")
    private String forwardPower;
    /**
     * 充电站全省唯一备案号
     */
    @JsonProperty("RecordUniqueNo")
    private String recordUniqueNo;
}
ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/model/SuperviseQueryOperatorInfo.java
New file
@@ -0,0 +1,22 @@
package com.ruoyi.integration.drainage.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
/**
 * @author zhibing.pu
 * @Date 2025/2/19 9:36
 */
@Data
public class SuperviseQueryOperatorInfo {
    /**
     * 查询页码
     */
    @JsonProperty("PageNo")
    private Integer pageNo;
    /**
     * 每页数量
     */
    @JsonProperty("PageSize")
    private Integer pageSize;
}
ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/model/SuperviseQueryOperatorInfoResult.java
New file
@@ -0,0 +1,57 @@
package com.ruoyi.integration.drainage.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
/**
 * @author zhibing.pu
 * @Date 2025/2/19 9:39
 */
@Data
public class SuperviseQueryOperatorInfoResult {
    /**
     * 运营商ID
     */
    @NotNull
    @JsonProperty("OperatorID")
    private String operatorID;
    /**
     * 运营商统一社会信用代码
     */
    @NotNull
    @JsonProperty("OperatorUSCID")
    private String operatorUSCID;
    /**
     * 运营商名称
     */
    @NotNull
    @JsonProperty("OperatorName")
    private String operatorName;
    /**
     * 运营商电话1
     */
    @NotNull
    @JsonProperty("OperatorTel1")
    private String operatorTel1;
    /**
     * 运营商电话2
     */
    @Null
    @JsonProperty("OperatorTel2")
    private String operatorTel2;
    /**
     * 运营商注册地址
     */
    @Null
    @JsonProperty("OperatorRegAddress")
    private String operatorRegAddress;
    /**
     * 备注信息
     */
    @Null
    @JsonProperty("OperatorNote")
    private String operatorNote;
}
ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/model/enu/ConstructionEnum.java
@@ -17,6 +17,10 @@
    ANCILLARY_PARKING_LOT(9, "大型建筑配建停车场"),
    OFF_STREET_PARKING_SPACE(10, "路边停车位"),
    HIGH_SPEED_SERVICE_AREA(11, "城际高速服务区"),
    SCENIC_SPOT(12, "风景区"),
    BUS_YARD(13, "公交场站"),
    REFUELING_STATION(14, "加油加气站"),
    TAXI(15, "出租车"),
    OTHER(255, "其他");
    
    private Integer type;
ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/model/enu/StationTypeEnum.java
@@ -12,6 +12,10 @@
    SANITATION_SPECIFIC(101, "环卫(专用)"),
    LOGISTICS_SPECIFIC(102, "物流(专用)"),
    TEXT_SPECIFIC(103, "出租车(专用)"),
    PERIODIC_LEASE(104, "分时租赁(专用)"),
    CELL_SHARING(105, "小区共享(专用)"),
    DEPARTMENT(106, "单位(专用)"),
    PRIVATE_SHARED_PILE(107, "私人共享桩(专用)"),
    OTHER(255, "其他")
    ;
    
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TShoppingOrderController.java
@@ -234,9 +234,14 @@
                refundAmount.setCurrency("CNY");
                refundAmount.setRefund(i);
                wxPaymentRefundModel.setAmount(refundAmount);
                R<String> stringR = wxPaymentClient.refundOrderR(wxPaymentRefundModel);
                R<Map<String, Object>> stringR = wxPaymentClient.refundOrderR(wxPaymentRefundModel);
                if(200 == stringR.getCode()){
                    shoppingOrderRefundService.save(tShoppingOrderRefund);
                    //手续费
                    Map<String, Object> amount1 = (Map<String, Object>) stringR.getData().get("amount");
                    BigDecimal refund_fee = new BigDecimal(amount1.get("refund_fee").toString()).divide(new BigDecimal(100));
                    tShoppingOrderRefund.setRefundFee(refund_fee);
                    shoppingOrderRefundService.updateById(tShoppingOrderRefund);
                }
                break;
            case 2:
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java
@@ -915,9 +915,14 @@
                amount.setTotal(rechargeAmount.multiply(new BigDecimal(100)).intValue());
                amount.setCurrency("CNY");
                model.setAmount(amount);
                R<String> orderR = wxPaymentClient.refundOrderR(model);
                R<Map<String, Object>> orderR = wxPaymentClient.refundOrderR(model);
                if(200 == orderR.getCode()){
                    chargingOrderRefundService.save(chargingOrderRefund);
                    //手续费
                    Map<String, Object> amount1 = (Map<String, Object>) orderR.getData().get("amount");
                    BigDecimal refund_fee = new BigDecimal(amount1.get("refund_fee").toString()).divide(new BigDecimal(100));
                    chargingOrderRefund.setRefundFee(refund_fee);
                    chargingOrderRefundService.updateById(chargingOrderRefund);
                }
            }
            if(2 == rechargePaymentType){
@@ -2433,9 +2438,14 @@
                    amount.setTotal(rechargeAmount.multiply(new BigDecimal(100)).intValue());
                    amount.setCurrency("CNY");
                    model.setAmount(amount);
                    R<String> orderR = wxPaymentClient.refundOrderR(model);
                    if(200 == orderR.getCode()){
                    R<Map<String, Object>> result = wxPaymentClient.refundOrderR(model);
                    if(200 == result.getCode()){
                        chargingOrderRefundService.save(chargingOrderRefund);
                        //手续费
                        Map<String, Object> amount1 = (Map<String, Object>) result.getData().get("amount");
                        BigDecimal refund_fee = new BigDecimal(amount1.get("refund_fee").toString()).divide(new BigDecimal(100));
                        chargingOrderRefund.setRefundFee(refund_fee);
                        chargingOrderRefundService.updateById(chargingOrderRefund);
                    }
                }
                if(2 == rechargePaymentType){
@@ -2591,12 +2601,17 @@
                    amount.setTotal(tChargingOrder.getRechargeAmount().multiply(new BigDecimal(100)).intValue());
                    amount.setCurrency("CNY");
                    model.setAmount(amount);
                    R<String> orderR = wxPaymentClient.refundOrderR(model);
                    R<Map<String, Object>> orderR = wxPaymentClient.refundOrderR(model);
                    if(200 == orderR.getCode()){
                        tChargingOrder.setRefundStatus(2);
                        tChargingOrder.setRefundAmount((tChargingOrder.getRefundAmount()==null? BigDecimal.valueOf(0) :tChargingOrder.getRefundAmount()).add(payOrderQueryDto.getRefundAmount()));
                        this.baseMapper.updateById(tChargingOrder);
                        chargingOrderRefundService.save(chargingOrderRefund);
                        //手续费
                        Map<String, Object> amount1 = (Map<String, Object>) orderR.getData().get("amount");
                        BigDecimal refund_fee = new BigDecimal(amount1.get("refund_fee").toString()).divide(new BigDecimal(100));
                        chargingOrderRefund.setRefundFee(refund_fee);
                        chargingOrderRefundService.updateById(chargingOrderRefund);
                    }
                }
@@ -2653,12 +2668,17 @@
                    amount.setTotal(tChargingOrder.getPaymentAmount().multiply(new BigDecimal(100)).intValue());
                    amount.setCurrency("CNY");
                    model.setAmount(amount);
                    R<String> orderR = wxPaymentClient.refundOrderR(model);
                    R<Map<String, Object>> orderR = wxPaymentClient.refundOrderR(model);
                    if(200 == orderR.getCode()){
                        tChargingOrder.setRefundStatus(2);
                        tChargingOrder.setRefundAmount((tChargingOrder.getRefundAmount()==null? BigDecimal.valueOf(0) :tChargingOrder.getRefundAmount()).add(payOrderQueryDto.getRefundAmount()));
                        shoppingOrderService.updateById(tChargingOrder);
                        shoppingOrderRefundService.save(chargingOrderRefund);
                        //手续费
                        Map<String, Object> amount1 = (Map<String, Object>) orderR.getData().get("amount");
                        BigDecimal refund_fee = new BigDecimal(amount1.get("refund_fee").toString()).divide(new BigDecimal(100));
                        chargingOrderRefund.setRefundFee(refund_fee);
                        shoppingOrderRefundService.updateById(chargingOrderRefund);
                    }
                }
@@ -2712,12 +2732,17 @@
                amount.setTotal(tChargingOrder.getPaymentAmount().multiply(new BigDecimal(100)).intValue());
                amount.setCurrency("CNY");
                model.setAmount(amount);
                R<String> orderR = wxPaymentClient.refundOrderR(model);
                R<Map<String, Object>> orderR = wxPaymentClient.refundOrderR(model);
                if(200 == orderR.getCode()){
                    tChargingOrder.setRefundStatus(2);
                    tChargingOrder.setRefundAmount((tChargingOrder.getRefundAmount()==null? BigDecimal.valueOf(0) :tChargingOrder.getRefundAmount()).add(payOrderQueryDto.getRefundAmount()));
                    vipOrderService.updateById(tChargingOrder);
                    vipOrderRefundService.save(chargingOrderRefund);
                    //手续费
                    Map<String, Object> amount1 = (Map<String, Object>) orderR.getData().get("amount");
                    BigDecimal refund_fee = new BigDecimal(amount1.get("refund_fee").toString()).divide(new BigDecimal(100));
                    chargingOrderRefund.setRefundFee(refund_fee);
                    vipOrderRefundService.updateById(chargingOrderRefund);
                }
            }
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TShoppingOrderServiceImpl.java
@@ -451,10 +451,15 @@
            amount.setTotal(shoppingOrder.getPaymentAmount().multiply(new BigDecimal(100)).intValue());
            amount.setCurrency("CNY");
            model.setAmount(amount);
            R<String> orderR = wxPaymentClient.refundOrderR(model);
            R<Map<String, Object>> orderR = wxPaymentClient.refundOrderR(model);
            if(200 == orderR.getCode()){
                this.updateById(shoppingOrder);
                shoppingOrderRefundService.save(shoppingOrderRefund);
                //手续费
                Map<String, Object> amount1 = (Map<String, Object>) orderR.getData().get("amount");
                BigDecimal refund_fee = new BigDecimal(amount1.get("refund_fee").toString()).divide(new BigDecimal(100));
                shoppingOrderRefund.setRefundFee(refund_fee);
                shoppingOrderRefundService.updateById(shoppingOrderRefund);
            }
        }
        if(2 == paymentType){
ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/controller/WxPayController.java
@@ -101,7 +101,7 @@
     */
    @ApiOperation("订单退款")
    @PostMapping(value = "refundOrderR")
    public R<String> refundOrderR(@RequestBody WxPaymentRefundModel model) {
    public R<Map<String, Object>> refundOrderR(@RequestBody WxPaymentRefundModel model) {
        Map<String, Object> result = wxV3Pay.refund(model);
        log.info("退款结果:{}", result);
        // 微信支付退款单号
@@ -116,7 +116,7 @@
        String success_time = Objects.nonNull(result.get("success_time")) ? result.get("success_time").toString() : null;
        // 退款状态 RefundEnum
        String status = result.get("status").toString();
        return R.ok(status);
        return R.ok(result);
    }
    /**
     * 支付回调