feiyu02
2025-09-01 29383149f7040d89ae00ad48dc48bbcf46587946
src/main/kotlin/com/flightfeather/uav/lightshare/web/ElectricityController.kt
@@ -34,8 +34,27 @@
        @RequestParam(value = "perPage", required = false) perPage: Int?
    ) = electricityService.getMinuteData2(deviceCode, startTime, endTime, page, perPage)
    @ApiOperation(value = "获取企业用电量最新一条分钟均值")
    @GetMapping("/company")
    fun  getByCompany(
        @ApiParam("企业id") @RequestParam(value = "cId") cId: String,
    ) = electricityService.getByCompany(cId)
    @ApiOperation(value = "获取企业用电量整合数据")
    @GetMapping("/info")
    fun  getElectricityInfo(
        @ApiParam("企业id") @RequestParam(value = "cId") cId: String,
        @ApiParam(value = "开始时间", example = "yyyy-MM-dd HH:mm:ss") @RequestParam(value = "startTime", required = false) startTime: String?,
        @ApiParam(value = "结束时间", example = "yyyy-MM-dd HH:mm:ss") @RequestParam(value = "endTime", required = false) endTime: String?,
        @RequestParam(value = "page", required = false) page: Int?,
        @RequestParam(value = "perPage", required = false) perPage: Int?
    ) = electricityService.getElectricityInfo(cId, startTime, endTime, page, perPage)
    @ApiOperation(value = "企业用电量日分析")
    @GetMapping("/analysis/daily")
    fun dailyStatistics(
        @ApiParam("企业id") @RequestParam(value = "cId") cId: String,
        @ApiParam(value = "开始时间", example = "yyyy-MM-dd HH:mm:ss") @RequestParam(value = "startTime", required = false) startTime: String?,
        @ApiParam(value = "结束时间", example = "yyyy-MM-dd HH:mm:ss") @RequestParam(value = "endTime", required = false) endTime: String?,
    ) = electricityService.dailyAnalysis(cId, startTime, endTime)
}