| | |
| | | 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()); |
| | |
| | | }else{ |
| | | return AjaxResult.error("华为创建设备失败"); |
| | | } |
| | | }else{ |
| | | chargingPile.setIotdDeviceId(showDeviceResp.getDeviceId()); |
| | | } |
| | | this.save(chargingPile); |
| | | return AjaxResult.success(); |
| | | } |