积水点列表添加液位深度字段
This commit is contained in:
parent
5e3db658b0
commit
c9768455d2
|
@ -57,4 +57,6 @@ public class WaterPointDto {
|
||||||
|
|
||||||
private String pointLevel;//积水点等级1:重度;2:中度;3:轻度;4:无积水
|
private String pointLevel;//积水点等级1:重度;2:中度;3:轻度;4:无积水
|
||||||
|
|
||||||
|
private String waterPointDepth;//积水点深度
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,6 @@ import java.util.List;
|
||||||
@Repository
|
@Repository
|
||||||
public interface WaterPointMapper extends BaseMapper<WaterPoint> {
|
public interface WaterPointMapper extends BaseMapper<WaterPoint> {
|
||||||
|
|
||||||
@Select("select * 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)")
|
|
||||||
List<WaterPointDto> selectWaterPoint();
|
List<WaterPointDto> selectWaterPoint();
|
||||||
|
|
||||||
@Select("select * from water_point wp LEFT JOIN water_point_report wpr ON wp.water_point_id = wpr.water_point_id where audit_flag = '2' and disp_flag in (0,1) and report_origin = #{reportOrigin}")
|
@Select("select * from water_point wp LEFT JOIN water_point_report wpr ON wp.water_point_id = wpr.water_point_id where audit_flag = '2' and disp_flag in (0,1) and report_origin = #{reportOrigin}")
|
||||||
|
|
|
@ -1,5 +1,24 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.hisense.monitormanage.mapper.WaterPointMapper">
|
<mapper namespace="com.hisense.monitormanage.mapper.WaterPointMapper">
|
||||||
|
<select id="selectWaterPoint" resultType="com.hisense.monitormanage.dto.WaterPointDto">
|
||||||
|
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
|
||||||
|
ORDER BY waterPointDepth DESC
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue