From 0f10e984e8143045a7a86d67c6c12732e1c40a1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?= <7507756+jiang_yuqi@user.noreply.gitee.com> Date: Tue, 5 Nov 2024 23:39:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/api/TowerCraneApiController.java | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/mkl-iot/src/main/java/com/ruoyi/iot/api/TowerCraneApiController.java b/mkl-iot/src/main/java/com/ruoyi/iot/api/TowerCraneApiController.java index a9c1e94..8b0cc1d 100644 --- a/mkl-iot/src/main/java/com/ruoyi/iot/api/TowerCraneApiController.java +++ b/mkl-iot/src/main/java/com/ruoyi/iot/api/TowerCraneApiController.java @@ -79,19 +79,15 @@ public class TowerCraneApiController { */ @GetMapping("/v99/pushIotPower") public AjaxResult pushIotPower() { - IotDeviceInfo iotDeviceInfo = new IotDeviceInfo(); - iotDeviceInfo.setDeviceId("A3gVjYga"); - iotDeviceInfo.setDeviceName("配电箱"); - iotDeviceInfo.setState(1); - iotDeviceInfo.setProjectId(229L); - iotDeviceInfo.setPoints(1L); - iotDeviceInfo.setTypeName("配电箱"); - iotDeviceInfo.setHzTenantId("2RrXaxJ8"); - iotDeviceInfo.setHzProjectId("8NgaaNgY"); - iotDeviceInfo.setFactoryName("萨达"); - iotDeviceInfo.setCompanyName("中铁一局建安公司"); - iotDeviceInfo.setProjectName("西建中国西电集团智慧产业园"); - iIotDeviceInfoService.insertIotDeviceInfo(iotDeviceInfo); + IotDeviceInfo query = new IotDeviceInfo(); + query.setDeviceName("配电箱"); + query.setProjectId(229L); + query.setFactoryName("萨达"); + List list = iIotDeviceInfoService.selectIotDeviceInfoList(query); + for(IotDeviceInfo e:list){ + e.setProjectId(203L); + iIotDeviceInfoService.updateIotDeviceInfo(e); + } return AjaxResult.success(); }