diff --git a/src/main/java/com/hisense/monitormanage/controller/WaterPointController.java b/src/main/java/com/hisense/monitormanage/controller/WaterPointController.java index 5448e2e..997b8be 100644 --- a/src/main/java/com/hisense/monitormanage/controller/WaterPointController.java +++ b/src/main/java/com/hisense/monitormanage/controller/WaterPointController.java @@ -6,6 +6,9 @@ import com.hisense.monitormanage.dto.WaterPointDtos; import com.hisense.monitormanage.entity.Result; import com.hisense.monitormanage.entity.WaterPoint; import com.hisense.monitormanage.mapper.WaterPointMapper; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -15,46 +18,81 @@ import java.util.List; @RestController @RequestMapping("api/project/water") +@Api(tags = "积水点") public class WaterPointController { @Autowired private WaterPointMapper waterPointMapper; + /** + * 查询积水点列表 + * @return + */ @GetMapping("selectWaterPoint") + @ApiOperation("查询积水点列表") public Result selectWaterPoint(){ List waterPoints = waterPointMapper.selectWaterPoint(); Result success = Result.success(waterPoints); return success; } + /** + * 查询积水点等级 + * @param reportOrigin + * @return + */ @GetMapping("selectReportOrigin") + @ApiOperation("查询积水点等级") + @ApiImplicitParam(name = "reportOrigin",value = "等级标识",required = true,dataType = "String") public Result selectReportOrigin(String reportOrigin){ List waterPoints = waterPointMapper.selectReportOrigin(reportOrigin); Result success = Result.success(waterPoints); return success; } + /** + * 根据名称查询积水点详细信息 + * @param waterPointName + * @return + */ @GetMapping("selectCameraByName") + @ApiOperation("根据名称查询积水点详细信息") + @ApiImplicitParam(name = "waterPointName",value = "积水点名称",required = true,dataType = "String") public Result selectCameraByName(String waterPointName){ List waterCameras = waterPointMapper.selectCameraByName(waterPointName); Result success = Result.success(waterCameras); return success; } + /** + * 统计分析积水点市区分布 + * @return + */ @GetMapping("selectCountWater") + @ApiOperation("统计分析积水点市区分布") public Result selectCountWater(){ List waterCameras = waterPointMapper.selectCountWater(); Result success = Result.success(waterCameras); return success; } + /** + * 统计分析积水点来源 + * @return + */ @GetMapping("selectCountWaters") + @ApiOperation("统计分析积水点来源") public Result selectCountWaters(){ List waterCameras = waterPointMapper.selectCountWaters(); Result success = Result.success(waterCameras); return success; } + /** + * 统计分析积水点等级 + * @return + */ @GetMapping("selectCountLevel") + @ApiOperation("统计分析积水点等级") public Result selectCountLevel(){ List waterCameras = waterPointMapper.selectCountLevel(); Result success = Result.success(waterCameras); diff --git a/src/main/java/com/hisense/monitormanage/dto/WaterCameraDto.java b/src/main/java/com/hisense/monitormanage/dto/WaterCameraDto.java index f9248b4..ff224b5 100644 --- a/src/main/java/com/hisense/monitormanage/dto/WaterCameraDto.java +++ b/src/main/java/com/hisense/monitormanage/dto/WaterCameraDto.java @@ -11,4 +11,5 @@ public class WaterCameraDto { private String videoCapture; private String channelName; private String channelCode; + private Integer count; }