From 7d74f3fd087d4a8192ed556a6c2e3a2ea3c81cff Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期五, 28 三月 2025 17:43:48 +0800 Subject: [PATCH] 1. 新增扬尘监测数据上传功能 --- src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MonitorDataController.kt | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MonitorDataController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MonitorDataController.kt new file mode 100644 index 0000000..d247848 --- /dev/null +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MonitorDataController.kt @@ -0,0 +1,33 @@ +package cn.flightfeather.supervision.lightshare.web + +import cn.flightfeather.supervision.domain.ds1.entity.DustDataResult +import cn.flightfeather.supervision.lightshare.service.MonitorDataService +import cn.flightfeather.supervision.lightshare.vo.AreaVo +import io.swagger.annotations.Api +import io.swagger.annotations.ApiOperation +import io.swagger.annotations.ApiParam +import org.springframework.web.bind.annotation.* +import org.springframework.web.multipart.MultipartFile + +/** + * 鐩戞祴鏁版嵁锛堝寘鍚壃灏樼洃娴嬨�佹补鐑熺洃娴嬬瓑绛夋墍鏈夌洃娴嬫暟鎹級鐩稿叧API鎺ュ彛 + * @date 2025/3/19 + * @author feiyu02 + */ +@Api(tags = ["MonitorDataController"], description = "鐩戞祴鏁版嵁锛堝寘鍚壃灏樼洃娴嬨�佹补鐑熺洃娴嬬瓑绛夋墍鏈夌洃娴嬫暟鎹級鐩稿叧API鎺ュ彛") +@RestController +@RequestMapping("/monitor/data") +class MonitorDataController(private val monitorDataService: MonitorDataService) { + + @ApiOperation(value = "涓婁紶鎵皹鐩戞祴鏁版嵁鐨勬湀搴︾粺璁$粨鏋�") + @PutMapping("/result/construction/upload") + fun uploadDustDataResult( + @ApiParam("缁熻缁撴灉") @RequestBody dataList: List<DustDataResult>, + ) = resPack { monitorDataService.uploadDustDataResult(dataList) } + + @ApiOperation(value = "鏌ヨ鎵皹鐩戞祴鏁版嵁鐨勬湀搴︾粺璁$粨鏋�") + @PostMapping("/result/construction/get") + fun fetchDustDataResult( + @ApiParam("鍖哄煙鏉′欢淇℃伅") @RequestBody areaVo: AreaVo + ) = resPack { monitorDataService.fetchDustDataResult(areaVo) } +} \ No newline at end of file -- Gitblit v1.9.3