puzhibing
2024-10-24 e04c38cdd62af6e17d7ae45b7374ef4ec46a90f1
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TChargingGunServiceImpl.java
@@ -109,8 +109,11 @@
            tChargingGunVO.setAuthUpdate(roleType == 1 ? true : partnerService.authMenu(objectId, siteId, SiteMenu.CHARGING_GUN_UPDATE));
            tChargingGunVO.setAuthViewRates(roleType == 1 ? true : partnerService.authMenu(objectId, siteId, SiteMenu.CHARGING_GUN_VIEW_RATES));
            if(null == tChargingGunVO.getAccountingStrategyId()){
                Site site = siteClient.getSiteByIds(Arrays.asList(tChargingGunVO.getSiteId())).getData().get(0);
                tChargingGunVO.setAccountingStrategyId(site.getAccountingStrategyId());
                List<Site> data = siteClient.getSiteByIds(Arrays.asList(tChargingGunVO.getSiteId())).getData();
                if(data.size() > 0){
                    Site site = data.get(0);
                    tChargingGunVO.setAccountingStrategyId(site.getAccountingStrategyId());
                }
            }
        }
        pageInfo.setRecords(list);
@@ -133,8 +136,9 @@
        if(count > 0){
            return AjaxResult.error("接口编码已存在");
        }
        this.save(dto);
        TChargingPile chargingPile = chargingPileService.getById(dto.getChargingPileId());
        dto.setFullNumber(chargingPile.getCode() + dto.getCode());
        this.save(dto);
    
        //下发硬件充电二维码
        String code_prefix = "https://mxcd.zhinenganguan.com?No=";
@@ -169,8 +173,9 @@
        if(null != one && !dto.getId().equals(one.getId())){
            return AjaxResult.error("接口编码已存在");
        }
        this.updateById(dto);
        TChargingPile chargingPile = chargingPileService.getById(dto.getChargingPileId());
        dto.setFullNumber(chargingPile.getCode() + dto.getCode());
        this.updateById(dto);
    
        //下发硬件充电二维码
        String code_prefix = "https://mxcd.zhinenganguan.com?No=";