| | |
| | | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| | | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| | | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| | | import cn.iocoder.yudao.module.mes.controller.admin.dv.telemetry.vo.MesDvTelemetryCheckSummaryRespVO; |
| | | import cn.iocoder.yudao.module.mes.controller.admin.dv.telemetry.vo.MesDvTelemetryDeviceRespVO; |
| | | import cn.iocoder.yudao.module.mes.controller.admin.dv.telemetry.vo.MesDvTelemetryLatestReqVO; |
| | | import cn.iocoder.yudao.module.mes.controller.admin.dv.telemetry.vo.MesDvTelemetryPageReqVO; |
| | |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import jakarta.annotation.Resource; |
| | | import jakarta.validation.Valid; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | |
| | | @GetMapping("/pull") |
| | | @Operation(summary = "拉取数采数据并入库(近 5 分钟设备数据)") |
| | | @PreAuthorize("@ss.hasPermission('mes:dv-telemetry:query')") |
| | | public CommonResult<MesDvTelemetryPullRespVO> pullTelemetry() { |
| | | return success(telemetryService.pullTelemetry()); |
| | | } |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "分页查询数采遥测数据") |
| | | @PreAuthorize("@ss.hasPermission('mes:dv-telemetry:query')") |
| | | public CommonResult<PageResult<MesDvTelemetryRespVO>> getTelemetryPage(@Valid MesDvTelemetryPageReqVO pageReqVO) { |
| | | PageResult<MesDvTelemetryDO> pageResult = telemetryService.getTelemetryPage(pageReqVO); |
| | | return success(BeanUtils.toBean(pageResult, MesDvTelemetryRespVO.class)); |
| | |
| | | |
| | | @GetMapping("/latest") |
| | | @Operation(summary = "查询各设备最新遥测数据(实时监控)") |
| | | @PreAuthorize("@ss.hasPermission('mes:dv-telemetry:query')") |
| | | public CommonResult<List<MesDvTelemetryRespVO>> getLatestTelemetry(MesDvTelemetryLatestReqVO reqVO) { |
| | | List<MesDvTelemetryDO> list = telemetryService.getLatestTelemetry(reqVO); |
| | | return success(BeanUtils.toBean(list, MesDvTelemetryRespVO.class)); |
| | |
| | | |
| | | @GetMapping("/device-list") |
| | | @Operation(summary = "查询数采设备下拉列表") |
| | | @PreAuthorize("@ss.hasPermission('mes:dv-telemetry:query')") |
| | | public CommonResult<List<MesDvTelemetryDeviceRespVO>> getDeviceList() { |
| | | return success(telemetryService.getDeviceList()); |
| | | } |
| | | |
| | | @GetMapping("/check") |
| | | @Operation(summary = "供电参数比对校验明细(各设备最新参数 vs 标准值)") |
| | | public CommonResult<List<MesDvTelemetryRespVO>> getCheckList(MesDvTelemetryLatestReqVO reqVO) { |
| | | List<MesDvTelemetryDO> list = telemetryService.getLatestTelemetry(reqVO); |
| | | return success(BeanUtils.toBean(list, MesDvTelemetryRespVO.class)); |
| | | } |
| | | |
| | | @GetMapping("/check-summary") |
| | | @Operation(summary = "供电参数比对校验统计(按设备聚合异常率)") |
| | | public CommonResult<List<MesDvTelemetryCheckSummaryRespVO>> getCheckSummary(MesDvTelemetryLatestReqVO reqVO) { |
| | | return success(telemetryService.getCheckSummary(reqVO)); |
| | | } |
| | | |
| | | } |