| | |
| | | c3mChargingChargeService.initCharge((c3mCharging1.getC3Id()).intValue()); |
| | | } |
| | | } |
| | | /** |
| | | * 添加绑定关系开始 |
| | | */ |
| | | Pole pole = poleService.getOne(Wrappers.lambdaQuery(Pole.class).eq(Pole::getDeviceCode, deviceName)); |
| | | if (pole == null) { |
| | | Pole pole1 = new Pole(); |
| | | pole1.setDeviceCode(deviceName); |
| | | pole1.setPoleName(deviceName); |
| | | pole1.setPoleCode(poleService.generatePoleCode()); |
| | | poleService.save(pole1); |
| | | } |
| | | |
| | | Long poleId = poleService.getOne(Wrappers.lambdaQuery(Pole.class).eq(Pole::getDeviceCode, deviceName)).getId(); |
| | | PoleBindingParam poleBindingParam = new PoleBindingParam(); |
| | | poleBindingParam.setDeviceType(2); |
| | | poleBindingParam.setDeviceCode(mcuUdid); |
| | | bindingService.bindPole(poleId, poleBindingParam); |
| | | // /** |
| | | // * 添加绑定关系开始 |
| | | // */ |
| | | // Pole pole = poleService.getOne(Wrappers.lambdaQuery(Pole.class).eq(Pole::getDeviceCode, deviceName)); |
| | | // if (pole == null) { |
| | | // Pole pole1 = new Pole(); |
| | | // pole1.setDeviceCode(deviceName); |
| | | // pole1.setPoleName(deviceName); |
| | | // pole1.setPoleCode(poleService.generatePoleCode()); |
| | | // poleService.save(pole1); |
| | | // } |
| | | // |
| | | // Long poleId = poleService.getOne(Wrappers.lambdaQuery(Pole.class).eq(Pole::getDeviceCode, deviceName)).getId(); |
| | | // PoleBindingParam poleBindingParam = new PoleBindingParam(); |
| | | // poleBindingParam.setDeviceType(2); |
| | | // poleBindingParam.setDeviceCode(mcuUdid); |
| | | // bindingService.bindPole(poleId, poleBindingParam); |
| | | |
| | | /** |
| | | * 添加绑定关系结束 |