Pu Zhibing
2025-01-20 a0333e5234fae97ce785858e2152e390d85ca270
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TChargingPileServiceImpl.java
@@ -182,6 +182,9 @@
         return AjaxResult.error("设备编号已存在");
      }
      //调用华为Iot创建设备
      ShowDeviceResp showDeviceResp = iotInterfaceClient.showDeviceRequest(chargingPile.getCode()).getData();
      if(null == showDeviceResp){
         //调用华为Iot创建设备
      AddDevice addDevice = new AddDevice();
      addDevice.setProductId("66da68d21837002b28b34ec0");
      addDevice.setNodeId(chargingPile.getCode());
@@ -199,6 +202,9 @@
      }else{
         return AjaxResult.error("华为创建设备失败");
      }
      }else{
         chargingPile.setIotdDeviceId(showDeviceResp.getDeviceId());
      }
      this.save(chargingPile);
      return AjaxResult.success();
   }