dengzedong
6 天以前 a6e46fe2b5729e7468b6f3c4e079232801c22520
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/controller/admin/DaPointController.java
@@ -13,6 +13,7 @@
import com.iailab.module.data.influxdb.service.InfluxDBService;
import com.iailab.module.data.point.common.PointTypeEnum;
import com.iailab.module.data.point.dto.DaPointDTO;
import com.iailab.module.data.point.dto.DaPointSimpleDTO;
import com.iailab.module.data.point.service.DaPointService;
import com.iailab.module.data.point.vo.*;
import io.swagger.v3.oas.annotations.Operation;
@@ -67,6 +68,14 @@
    public CommonResult<List<DaPointDTO>> list(@Valid @RequestParam Map<String, Object> params) {
        List<DaPointDTO> list = daPointService.list(params);
        return success(list);
    }
    @PreAuthorize("@ss.hasPermission('data:point:query')")
    @GetMapping("/simple-list")
    @Operation(summary = "列表")
    public CommonResult<List<DaPointSimpleDTO>> simpleList(@Valid @RequestParam Map<String, Object> params) {
        List<DaPointDTO> list = daPointService.list(params);
        return success(ConvertUtils.sourceToTarget(list, DaPointSimpleDTO.class));
    }
    @PreAuthorize("@ss.hasPermission('data:point:query')")
@@ -129,16 +138,15 @@
    @ApiAccessLog(operateType = EXPORT)
    public void exportPointList(@Validated DaPointPageReqVO exportReqVO,
                                HttpServletResponse response) throws IOException {
        exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
        List<DaPointExcelVO> dataList = new ArrayList<>();
        List<DaPointDTO> measurePointList = daPointService.getMeasurePoint(exportReqVO);
        List<DaPointExcelVO> dataList = ConvertUtils.sourceToTarget(daPointService.getList(exportReqVO), DaPointExcelVO.class);
        /*List<DaPointDTO> measurePointList = daPointService.getMeasurePoint(exportReqVO);
        dataList.addAll(ConvertUtils.sourceToTarget(measurePointList, DaPointExcelVO.class));
        List<DaPointDTO> mathPointList = daPointService.getMathPoint(exportReqVO);
        dataList.addAll(ConvertUtils.sourceToTarget(mathPointList, DaPointExcelVO.class));
        List<DaPointDTO> constantPointList = daPointService.getConstantPoint(exportReqVO);
        dataList.addAll(ConvertUtils.sourceToTarget(constantPointList, DaPointExcelVO.class));
        List<DaPointDTO> cumulatePointList = daPointService.getCumulatePoint(exportReqVO);
        dataList.addAll(ConvertUtils.sourceToTarget(cumulatePointList, DaPointExcelVO.class));
        dataList.addAll(ConvertUtils.sourceToTarget(cumulatePointList, DaPointExcelVO.class));*/
        ExcelUtils.write(response, "测点列表.xls", "测点列表", DaPointExcelVO.class, dataList);
    }