Quellcode durchsuchen

新增 性诱测报获取设备详情信息接口

zhaiyifei vor 11 Monaten
Ursprung
Commit
ee8489620f

+ 22 - 0
src/main/java/com/yunfeiyun/agmp/iotm/device/xycb/controller/IotXycbController.java

@@ -234,6 +234,28 @@ public class IotXycbController extends BaseController
         return getDataTable(list);
     }
 
+    /**
+     * 获取设备信息详细信息
+     */
+    @GetMapping(value = "/info/{devBid}")
+    public AjaxResult getInfo(@PathVariable("devBid") String devBid)
+    {
+        IotDeviceListReqVo reqVo = new IotDeviceListReqVo();
+        reqVo.setDevBid(devBid);
+
+        List<IotDeviceListResVo> dataList = iIotDeviceService.selectIotDeviceListByType(reqVo);
+        if(dataList.isEmpty()){
+            throw new IotBizException(IotErrorCode.INVALID_DEVICE_ID.getCode(), "设备不存在");
+        }
+        IotDeviceListResVo devInfo = dataList.get(0);
+        IotXyinfoDto iotXyinfoDto = iIotXyinfoService.selectIotXyinfoByDevBid(devBid);
+        if(iotXyinfoDto == null){
+            iotXyinfoDto = new IotXyinfoDto();
+        }
+        devInfo.setIotXyinfoDto(iotXyinfoDto);
+        return success(devInfo);
+    }
+
 
     /**
      * 数据列表