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