From 196bb14112448857a885e32dc4149e308e00b01a Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期四, 15 八月 2024 11:57:15 +0800 Subject: [PATCH] 2024.8.15 各项修正 --- src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt | 36 ++++++++++++++++++++++++++++++++++++ 1 files changed, 36 insertions(+), 0 deletions(-) diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt index 5f77ef5..4940711 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt @@ -1,5 +1,6 @@ package cn.flightfeather.supervision.lightshare.web +import cn.flightfeather.supervision.domain.entity.VocPurifyDevice import cn.flightfeather.supervision.lightshare.service.DeviceService import cn.flightfeather.supervision.lightshare.vo.DateVo import io.swagger.annotations.Api @@ -58,4 +59,39 @@ @ApiParam(value = "椤垫暟") @RequestParam("page") page: Int, @ApiParam(value = "姣忛〉鏁版嵁閲�") @RequestParam("per_page") perPage: Int ) = deviceService.getRealTimeData(page, perPage) + + @ApiOperation(value = "鑾峰彇闈欏畨宸ュ湴鎵皹灏忔椂鏁版嵁") + @GetMapping("/dust/jingan/value") + fun getJingAnDustHourValue( + @ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String, + @ApiParam(value = "寮�濮嬫椂闂�", example = "yyyy-MM-dd HH:mm") @RequestParam("startTime") startTime: String?, + @ApiParam(value = "缁撴潫鏃堕棿", example = "yyyy-MM-dd HH:mm") @RequestParam("endTime") endTime: String?, + ) = deviceService.getJingAnDustHourValue(userId, startTime, endTime) + + @ApiOperation(value = "鑾峰彇闈欏畨椁愰ギ鏁版嵁") + @GetMapping("/fume/jingan/value") + fun getJingAnFumeValue( + @ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String, + @ApiParam(value = "寮�濮嬫椂闂�", example = "yyyy-MM-dd HH:mm") @RequestParam("startTime") startTime: String?, + @ApiParam(value = "缁撴潫鏃堕棿", example = "yyyy-MM-dd HH:mm") @RequestParam("endTime") endTime: String?, + ) = deviceService.getJingAnFumeValue(userId, startTime, endTime) + + @ApiOperation(value = "鑾峰彇璁惧淇℃伅") + @GetMapping("/monitor/deviceInfo") + fun getDeviceInfo( + @ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String, + ) = deviceService.getDeviceInfo(userId) + + @ApiOperation(value = "涓婁紶voc澶勭悊璁惧淇℃伅") + @PostMapping("/voc/upload") + fun saveVOCPurifyDevice( + @ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String, + @ApiParam(value = "鏃堕棿") @RequestBody infoList: List<VocPurifyDevice>, + ) = deviceService.saveVOCPurifyDevice(userId, infoList) + + @ApiOperation(value = "鑾峰彇VOC鍑�鍖栬澶囦俊鎭�") + @GetMapping("/voc/purify/info") + fun getVOCPurifyDevice( + @ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String + ) = deviceService.getVOCPurifyDevice(userId) } \ No newline at end of file -- Gitblit v1.9.3