|
|
|
@ -1,5 +1,6 @@
|
|
|
|
package cn.iocoder.yudao.module.iot.controller.admin.devicemodelattribute;
|
|
|
|
package cn.iocoder.yudao.module.iot.controller.admin.devicemodelattribute;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.iot.dal.dataobject.deviceattributetype.DeviceAttributeTypeDO;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
@ -81,8 +82,8 @@ public class DeviceModelAttributeController {
|
|
|
|
@Operation(summary = "获得采集设备模型-点位管理分页")
|
|
|
|
@Operation(summary = "获得采集设备模型-点位管理分页")
|
|
|
|
@PreAuthorize("@ss.hasPermission('iot:device-model-attribute:query')")
|
|
|
|
@PreAuthorize("@ss.hasPermission('iot:device-model-attribute:query')")
|
|
|
|
public CommonResult<PageResult<DeviceModelAttributeRespVO>> getDeviceModelAttributePage(@Valid DeviceModelAttributePageReqVO pageReqVO) {
|
|
|
|
public CommonResult<PageResult<DeviceModelAttributeRespVO>> getDeviceModelAttributePage(@Valid DeviceModelAttributePageReqVO pageReqVO) {
|
|
|
|
PageResult<DeviceModelAttributeDO> pageResult = deviceModelAttributeService.getDeviceModelAttributePage(pageReqVO);
|
|
|
|
PageResult<DeviceModelAttributeRespVO> pageResult = deviceModelAttributeService.getDeviceModelAttributePage(pageReqVO);
|
|
|
|
return success(BeanUtils.toBean(pageResult, DeviceModelAttributeRespVO.class));
|
|
|
|
return success(pageResult);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/export-excel")
|
|
|
|
@GetMapping("/export-excel")
|
|
|
|
@ -92,10 +93,9 @@ public class DeviceModelAttributeController {
|
|
|
|
public void exportDeviceModelAttributeExcel(@Valid DeviceModelAttributePageReqVO pageReqVO,
|
|
|
|
public void exportDeviceModelAttributeExcel(@Valid DeviceModelAttributePageReqVO pageReqVO,
|
|
|
|
HttpServletResponse response) throws IOException {
|
|
|
|
HttpServletResponse response) throws IOException {
|
|
|
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
|
|
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
|
|
|
List<DeviceModelAttributeDO> list = deviceModelAttributeService.getDeviceModelAttributePage(pageReqVO).getList();
|
|
|
|
List<DeviceModelAttributeRespVO> list = deviceModelAttributeService.getDeviceModelAttributePage(pageReqVO).getList();
|
|
|
|
// 导出 Excel
|
|
|
|
// 导出 Excel
|
|
|
|
ExcelUtils.write(response, "采集设备模型-点位管理.xls", "数据", DeviceModelAttributeRespVO.class,
|
|
|
|
ExcelUtils.write(response, "采集设备模型-点位管理.xls", "数据", DeviceModelAttributeRespVO.class,list);
|
|
|
|
BeanUtils.toBean(list, DeviceModelAttributeRespVO.class));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|