积水点添加交警上报列表
This commit is contained in:
parent
44ceeb2934
commit
decd36651a
|
@ -6,6 +6,7 @@ import com.hisense.monitormanage.dto.WaterPointDtos;
|
||||||
import com.hisense.monitormanage.entity.CameraChannel;
|
import com.hisense.monitormanage.entity.CameraChannel;
|
||||||
import com.hisense.monitormanage.entity.Result;
|
import com.hisense.monitormanage.entity.Result;
|
||||||
import com.hisense.monitormanage.entity.WaterPoint;
|
import com.hisense.monitormanage.entity.WaterPoint;
|
||||||
|
import com.hisense.monitormanage.entity.WaterPointPolice;
|
||||||
import com.hisense.monitormanage.mapper.WaterPointMapper;
|
import com.hisense.monitormanage.mapper.WaterPointMapper;
|
||||||
import com.hisense.monitormanage.utils.LongLatUtil;
|
import com.hisense.monitormanage.utils.LongLatUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
@ -123,4 +124,16 @@ public class WaterPointController {
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询交警提供积水点列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("selectWaterPoliceList")
|
||||||
|
@ApiOperation("查询交警提供积水点列表")
|
||||||
|
public Result selectWaterPoliceList(){
|
||||||
|
List<WaterPointPolice> pointPolices = waterPointMapper.selectWaterPoliceList();
|
||||||
|
Result success = Result.success(pointPolices);
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,4 +13,6 @@ public class WaterPointDtos {
|
||||||
|
|
||||||
private String pointLevel;
|
private String pointLevel;
|
||||||
|
|
||||||
|
private String waterPointDepth;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
|
@ -6,6 +6,7 @@ import com.hisense.monitormanage.dto.WaterPointDto;
|
||||||
import com.hisense.monitormanage.dto.WaterPointDtos;
|
import com.hisense.monitormanage.dto.WaterPointDtos;
|
||||||
import com.hisense.monitormanage.entity.CameraChannel;
|
import com.hisense.monitormanage.entity.CameraChannel;
|
||||||
import com.hisense.monitormanage.entity.WaterPoint;
|
import com.hisense.monitormanage.entity.WaterPoint;
|
||||||
|
import com.hisense.monitormanage.entity.WaterPointPolice;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
@ -26,7 +27,7 @@ public interface WaterPointMapper extends BaseMapper<WaterPoint> {
|
||||||
@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")
|
@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<WaterPointDtos> selectCountWater();
|
List<WaterPointDtos> 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<WaterPointDtos> selectCountWaters();
|
List<WaterPointDtos> 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")
|
@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<WaterPoint> {
|
||||||
@Param("latitude1") Double latitude1,
|
@Param("latitude1") Double latitude1,
|
||||||
@Param("latitude2") Double latitude2);
|
@Param("latitude2") Double latitude2);
|
||||||
|
|
||||||
|
@Select("select * from water_point_police")
|
||||||
|
List<WaterPointPolice> selectWaterPoliceList();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,4 +21,23 @@
|
||||||
ON a.water_point_id = b.water_point_id
|
ON a.water_point_id = b.water_point_id
|
||||||
ORDER BY waterPointDepth DESC
|
ORDER BY waterPointDepth DESC
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectCountWaters" resultType="com.hisense.monitormanage.dto.WaterPointDtos">
|
||||||
|
SELECT c.report_origin,COUNT(*) as count,MAX(waterPointDepth) AS waterPointDepth FROM (SELECT a.*,b.updated_date AS waterPointDepth
|
||||||
|
FROM
|
||||||
|
(SELECT wp.*,wpr.point_level
|
||||||
|
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)) a
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT c.*,wps.updated_date
|
||||||
|
FROM water_point_sensor wps
|
||||||
|
JOIN
|
||||||
|
(SELECT water_point_id,MAX(water_point_area) AS water_point_area
|
||||||
|
FROM water_point_sensor
|
||||||
|
GROUP BY water_point_id) c
|
||||||
|
ON wps.water_point_area = c.water_point_area
|
||||||
|
AND wps.water_point_id = c.water_point_id) b
|
||||||
|
ON a.water_point_id = b.water_point_id) c GROUP BY c.report_origin
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue