| | |
| | | return AjaxResult.error("设备编号已存在"); |
| | | } |
| | | TChargingPile tChargingPile = this.getById(chargingPile.getId()); |
| | | //桩号不相同,需要重新绑定设备 |
| | | if(!tChargingPile.getCode().equals(chargingPile.getCode())){ |
| | | ShowDeviceResp showDeviceResp = iotInterfaceClient.showDeviceRequest(tChargingPile.getCode()).getData(); |
| | | if(null != showDeviceResp){ |
| | | DeleteDeviceResp deleteDeviceResp = iotInterfaceClient.deleteDevice(tChargingPile.getCode()).getData(); |
| | |
| | | return AjaxResult.error("删除设备异常,请查看华为设备管理"); |
| | | } |
| | | } |
| | | |
| | | |
| | | //调用华为Iot创建设备 |
| | | AddDevice addDevice = new AddDevice(); |
| | | addDevice.setProductId("66da68d21837002b28b34ec0"); |
| | |
| | | }else{ |
| | | return AjaxResult.error("华为创建设备失败"); |
| | | } |
| | | } |
| | | this.updateById(chargingPile); |
| | | |
| | | List<TChargingGun> list = chargingGunService.list(new LambdaQueryWrapper<TChargingGun>().eq(TChargingGun::getChargingPileId, chargingPile.getId()).eq(TChargingGun::getDelFlag, 0)); |