From decd36651ad3c72b8d4b2188d585eb255714d2f5 Mon Sep 17 00:00:00 2001 From: wuweida <2918581207@qq.com> Date: Fri, 26 Aug 2022 10:36:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=AF=E6=B0=B4=E7=82=B9=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=BA=A4=E8=AD=A6=E4=B8=8A=E6=8A=A5=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/WaterPointController.java | 13 +++++++++++++ .../monitormanage/dto/WaterPointDtos.java | 2 ++ .../entity/WaterPointPolice.java | 17 +++++++++++++++++ .../mapper/WaterPointMapper.java | 6 +++++- .../resources/mapper/WaterPointMapper.xml | 19 +++++++++++++++++++ 5 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/hisense/monitormanage/entity/WaterPointPolice.java diff --git a/src/main/java/com/hisense/monitormanage/controller/WaterPointController.java b/src/main/java/com/hisense/monitormanage/controller/WaterPointController.java index 1c8df92..39e886c 100644 --- a/src/main/java/com/hisense/monitormanage/controller/WaterPointController.java +++ b/src/main/java/com/hisense/monitormanage/controller/WaterPointController.java @@ -6,6 +6,7 @@ import com.hisense.monitormanage.dto.WaterPointDtos; import com.hisense.monitormanage.entity.CameraChannel; import com.hisense.monitormanage.entity.Result; import com.hisense.monitormanage.entity.WaterPoint; +import com.hisense.monitormanage.entity.WaterPointPolice; import com.hisense.monitormanage.mapper.WaterPointMapper; import com.hisense.monitormanage.utils.LongLatUtil; import io.swagger.annotations.Api; @@ -123,4 +124,16 @@ public class WaterPointController { return success; } + /** + * 查询交警提供积水点列表 + * @return + */ + @GetMapping("selectWaterPoliceList") + @ApiOperation("查询交警提供积水点列表") + public Result selectWaterPoliceList(){ + List pointPolices = waterPointMapper.selectWaterPoliceList(); + Result success = Result.success(pointPolices); + return success; + } + } diff --git a/src/main/java/com/hisense/monitormanage/dto/WaterPointDtos.java b/src/main/java/com/hisense/monitormanage/dto/WaterPointDtos.java index 1fc4558..01fd1dd 100644 --- a/src/main/java/com/hisense/monitormanage/dto/WaterPointDtos.java +++ b/src/main/java/com/hisense/monitormanage/dto/WaterPointDtos.java @@ -13,4 +13,6 @@ public class WaterPointDtos { private String pointLevel; + private String waterPointDepth; + } diff --git a/src/main/java/com/hisense/monitormanage/entity/WaterPointPolice.java b/src/main/java/com/hisense/monitormanage/entity/WaterPointPolice.java new file mode 100644 index 0000000..f63051c --- /dev/null +++ b/src/main/java/com/hisense/monitormanage/entity/WaterPointPolice.java @@ -0,0 +1,17 @@ +package com.hisense.monitormanage.entity; + +import lombok.Data; + +@Data +public class WaterPointPolice { + + private String waterPointName; + + private String longitude; + + private String latitude; + + private String point; + + private String reportOrigin; +} diff --git a/src/main/java/com/hisense/monitormanage/mapper/WaterPointMapper.java b/src/main/java/com/hisense/monitormanage/mapper/WaterPointMapper.java index 2008edd..1e1409d 100644 --- a/src/main/java/com/hisense/monitormanage/mapper/WaterPointMapper.java +++ b/src/main/java/com/hisense/monitormanage/mapper/WaterPointMapper.java @@ -6,6 +6,7 @@ import com.hisense.monitormanage.dto.WaterPointDto; import com.hisense.monitormanage.dto.WaterPointDtos; import com.hisense.monitormanage.entity.CameraChannel; import com.hisense.monitormanage.entity.WaterPoint; +import com.hisense.monitormanage.entity.WaterPointPolice; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import org.springframework.stereotype.Repository; @@ -26,7 +27,7 @@ public interface WaterPointMapper extends BaseMapper { @Select("select wc.ssqy,COUNT(*) as count from water_point wp JOIN water_camera wc ON wp.water_point_name = wc.water_point_name WHERE wp.audit_flag = '2' and wp.disp_flag in (0,1) GROUP BY wc.ssqy") List selectCountWater(); - @Select("select report_origin,COUNT(*) as count from water_point where audit_flag = '2' and disp_flag in (0,1) GROUP BY report_origin") + List selectCountWaters(); @Select("select wpr.point_level,COUNT(*) as count from water_point wp LEFT JOIN water_point_report wpr ON wp.water_point_id = wpr.water_point_id WHERE wp.audit_flag = '2' and wp.disp_flag in (0,1) GROUP BY wpr.point_level") @@ -38,5 +39,8 @@ public interface WaterPointMapper extends BaseMapper { @Param("latitude1") Double latitude1, @Param("latitude2") Double latitude2); + @Select("select * from water_point_police") + List selectWaterPoliceList(); + } diff --git a/src/main/resources/mapper/WaterPointMapper.xml b/src/main/resources/mapper/WaterPointMapper.xml index 458aef3..d70c537 100644 --- a/src/main/resources/mapper/WaterPointMapper.xml +++ b/src/main/resources/mapper/WaterPointMapper.xml @@ -21,4 +21,23 @@ ON a.water_point_id = b.water_point_id ORDER BY waterPointDepth DESC + \ No newline at end of file