|
@@ -172,6 +172,19 @@ public class IotDeviceController {
|
|
|
return success(IotDeviceConvert.INSTANCE.convertList1(devices, deptMap));
|
|
|
}
|
|
|
|
|
|
+ @GetMapping("/deviceAssociateBomListPage")
|
|
|
+ @Operation(summary = "获得设备-bom关联关系列表")
|
|
|
+ @PreAuthorize("@ss.hasPermission('rq:iot-device:query')")
|
|
|
+ public CommonResult<PageResult<IotDeviceRespVO>> deviceAssociateBomListPage(IotDevicePageReqVO pageReqVO) {
|
|
|
+ PageResult<IotDeviceRespVO> devices = iotDeviceService.deviceAssociateBomListPage(pageReqVO);
|
|
|
+ if (CollUtil.isEmpty(devices.getList())) {
|
|
|
+ return success(new PageResult<>(devices.getTotal()));
|
|
|
+ }
|
|
|
+ Map<Long, DeptDO> deptMap = deptService.getDeptMap(
|
|
|
+ convertList(devices.getList(), IotDeviceRespVO::getDeptId));
|
|
|
+ return success(new PageResult<>(IotDeviceConvert.INSTANCE.convertList1(devices.getList(), deptMap), devices.getTotal()));
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 组装 设备-bom 关联关系对象
|
|
|
* @param devices
|