From 6c7e9af96282e0cf398a899e3ab12e9a9708a960 Mon Sep 17 00:00:00 2001 From: wuweida <2918581207@qq.com> Date: Wed, 6 Jul 2022 13:42:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9F=A5=E8=AF=A2=E7=A7=AF?= =?UTF-8?q?=E6=B0=B4=E7=82=B9=E4=BF=A1=E6=81=AF=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=A7=AF=E6=B0=B4=E7=82=B9=E6=91=84=E5=83=8F?= =?UTF-8?q?=E5=A4=B4=E5=AF=B9=E5=BA=94=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/WaterPointController.java | 38 +++++++++++++++++++ .../monitormanage/entity/WaterCamera.java | 21 ++++++++++ .../monitormanage/entity/WaterPoint.java | 33 ++++++++++++++++ .../mapper/WaterCameraMapper.java | 15 ++++++++ .../mapper/WaterPointMapper.java | 14 +++++++ .../resources/mapper/WaterCameraMapper.xml | 5 +++ .../resources/mapper/WaterPointMapper.xml | 5 +++ 7 files changed, 131 insertions(+) create mode 100644 src/main/java/com/hisense/monitormanage/controller/WaterPointController.java create mode 100644 src/main/java/com/hisense/monitormanage/entity/WaterCamera.java create mode 100644 src/main/java/com/hisense/monitormanage/entity/WaterPoint.java create mode 100644 src/main/java/com/hisense/monitormanage/mapper/WaterCameraMapper.java create mode 100644 src/main/java/com/hisense/monitormanage/mapper/WaterPointMapper.java create mode 100644 src/main/resources/mapper/WaterCameraMapper.xml create mode 100644 src/main/resources/mapper/WaterPointMapper.xml diff --git a/src/main/java/com/hisense/monitormanage/controller/WaterPointController.java b/src/main/java/com/hisense/monitormanage/controller/WaterPointController.java new file mode 100644 index 0000000..a6b9bb2 --- /dev/null +++ b/src/main/java/com/hisense/monitormanage/controller/WaterPointController.java @@ -0,0 +1,38 @@ +package com.hisense.monitormanage.controller; + +import com.hisense.monitormanage.entity.Result; +import com.hisense.monitormanage.entity.WaterCamera; +import com.hisense.monitormanage.entity.WaterPoint; +import com.hisense.monitormanage.mapper.WaterCameraMapper; +import com.hisense.monitormanage.mapper.WaterPointMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@RestController +@RequestMapping("api/project/water") +public class WaterPointController { + @Autowired + private WaterPointMapper waterPointMapper; + + @Autowired + private WaterCameraMapper waterCameraMapper; + + @GetMapping("selectWaterPoint") + public Result selectWaterPoint(){ + List waterPoints = waterPointMapper.selectWaterPoint(); + Result success = Result.success(waterPoints); + return success; + } + + @GetMapping("selectWaterCamera") + public Result selectWaterCamera(){ + List waterCameras = waterCameraMapper.selectWaterCamera(); + Result success = Result.success(waterCameras); + return success; + } + +} diff --git a/src/main/java/com/hisense/monitormanage/entity/WaterCamera.java b/src/main/java/com/hisense/monitormanage/entity/WaterCamera.java new file mode 100644 index 0000000..2bc6a06 --- /dev/null +++ b/src/main/java/com/hisense/monitormanage/entity/WaterCamera.java @@ -0,0 +1,21 @@ +package com.hisense.monitormanage.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +@Data +@TableName("water_camera") +public class WaterCamera { + private String waterPointName; + private String ssqy; + private String longitude; + private String latitude; + private String channelName; + private String channelCode; + private String gpsX; + private String gpsy; + private String illustrate; + private String videoSurveillance; + private String videoCapture; + +} diff --git a/src/main/java/com/hisense/monitormanage/entity/WaterPoint.java b/src/main/java/com/hisense/monitormanage/entity/WaterPoint.java new file mode 100644 index 0000000..8355631 --- /dev/null +++ b/src/main/java/com/hisense/monitormanage/entity/WaterPoint.java @@ -0,0 +1,33 @@ +package com.hisense.monitormanage.entity; + +import com.baomidou.mybatisplus.annotations.TableName; +import lombok.Data; + +import java.math.BigDecimal; + +@Data +@TableName("water_point") +public class WaterPoint { + private Integer waterPointId; + private String waterPointName;//积水点名称 + private String districtId;//所属区域ID + private String address;//地址 + private String pointType;//积水点类型1:路段;2:桥下;3:洞内;4:小区 + private String uuid;//地址坐标ID + private BigDecimal longitude;//经度 + private BigDecimal latitude;//纬度 + private String charge;//负责人 + private String chargeTel;//负责人电话 + private String remark;//备注 + private String delFlag;//删除状态 + private String createdDate;//创建时间 + private String createdBy;//创建人ID + private String updatedDate;//更新时间 + private String updatedBy;//更新人ID + private String reportOrigin;//上报来源:auditorReport--水务集团上报;commonReport--群众上报;case--城管案例;video--视频感知 + private String isEasyPoint;//是否易积水点;0是 1否 + private String dispFlag;//0未处置 1处置中 2处置完成 + private String auditFlag;//审核状态;0未审核; 1审核不通过;2审核通过 + private String upNum;//点赞数量 + private String underNum;//点踩数量 +} diff --git a/src/main/java/com/hisense/monitormanage/mapper/WaterCameraMapper.java b/src/main/java/com/hisense/monitormanage/mapper/WaterCameraMapper.java new file mode 100644 index 0000000..2080301 --- /dev/null +++ b/src/main/java/com/hisense/monitormanage/mapper/WaterCameraMapper.java @@ -0,0 +1,15 @@ +package com.hisense.monitormanage.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hisense.monitormanage.entity.WaterCamera; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface WaterCameraMapper extends BaseMapper { + + @Select("select * from water_camera") + List selectWaterCamera(); +} diff --git a/src/main/java/com/hisense/monitormanage/mapper/WaterPointMapper.java b/src/main/java/com/hisense/monitormanage/mapper/WaterPointMapper.java new file mode 100644 index 0000000..94321b3 --- /dev/null +++ b/src/main/java/com/hisense/monitormanage/mapper/WaterPointMapper.java @@ -0,0 +1,14 @@ +package com.hisense.monitormanage.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hisense.monitormanage.entity.WaterPoint; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface WaterPointMapper extends BaseMapper { + @Select("select * from water_point where audit_flag = '2' and disp_flag in (0,1)") + List selectWaterPoint(); +} diff --git a/src/main/resources/mapper/WaterCameraMapper.xml b/src/main/resources/mapper/WaterCameraMapper.xml new file mode 100644 index 0000000..4afd1c1 --- /dev/null +++ b/src/main/resources/mapper/WaterCameraMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/WaterPointMapper.xml b/src/main/resources/mapper/WaterPointMapper.xml new file mode 100644 index 0000000..2746267 --- /dev/null +++ b/src/main/resources/mapper/WaterPointMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file