Pu Zhibing
2025-03-17 b76a3b11668f243463468af4c13dd3e82718f93b
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/SiteServiceImpl.java
@@ -196,6 +196,7 @@
      }
      site.setMark(0);
      this.save(site);
      // 推送充电站数据给监管平台
      return AjaxResult.success();
   }
   
@@ -267,9 +268,9 @@
//      if(StringUtils.isEmpty(site.getLon()) || StringUtils.isEmpty(site.getLat())){
//         return AjaxResult.error("地图位置不能为空");
//      }
      if(StringUtils.isEmpty(site.getPhone())){
         return AjaxResult.error("站点电话不能为空");
      }
//      if(StringUtils.isEmpty(site.getPhone())){
//         return AjaxResult.error("站点电话不能为空");
//      }
      if(StringUtils.isEmpty(site.getServicePhone())){
         return AjaxResult.error("服务电话不能为空");
      }
@@ -279,6 +280,56 @@
      if(null == site.getSort()){
         return AjaxResult.error("排序不能为空");
      }
      if(StringUtils.isEmpty(site.getAreaCodeCountryside())){
         return AjaxResult.error("充换电站所在县以下行政区划代码不能为空");
      }
      if(null == site.getStationClassification()){
         return AjaxResult.error("请选择站点分类");
      }
      if(null == site.getGeneralApplicationType()){
         return AjaxResult.error("请选择通用类型");
      }
      if(null == site.getParkType()){
         return AjaxResult.error("请选择停车费类型");
      }
      if(null == site.getRoundTheClock()){
         return AjaxResult.error("请选择是否7*24h营业");
      }
      if (site.getStationClassification()!=1&& (!org.springframework.util.StringUtils.hasLength(site.getSwapMatchCars()))){
         return AjaxResult.error("服务车型描述不能为空");
      }
      if(null == site.getElectricityType()){
         return AjaxResult.error("请选择电费类型");
      }
      if(null == site.getBusinessExpandType()){
         return AjaxResult.error("请选择报装类型");
      }
      if(null == site.getCapacity()){
         return AjaxResult.error("报装电源容量不能为空");
      }
      if(null == site.getRatedPower()){
         return AjaxResult.error("站点额定总功率不能为空");
      }
      if(StringUtils.isEmpty(site.getOfficialRunTime())){
         return AjaxResult.error("请选择正式投运时间");
      }
      if(null == site.getPeriodFee()){
         return AjaxResult.error("请选择峰谷时分");
      }
      if(null == site.getVideoMonitor()){
         return AjaxResult.error("请选择视频监控配套情况");
      }
      if(StringUtils.isEmpty(site.getEquipmentOwnerName())){
         return AjaxResult.error("设备所属方名称不能为空");
      }
      if(null == site.getSupplyType()){
         return AjaxResult.error("请选择供电类型");
      }
      if(site.getSupplyType()==1){
         if (StringUtils.isEmpty(site.getResidentNo())){
            return AjaxResult.error("供电局用户编号不能为空");
         }
      }
      return AjaxResult.success();
   }