|
|
|
@ -274,7 +274,7 @@ |
|
|
|
</select> |
|
|
|
<select id="selectPatroByAllDev" parameterType="com.inspect.simulator.domain.result.PatrolResult" resultMap="PatrolResultResult"> |
|
|
|
select a.*,c.area_name from patrol_result a |
|
|
|
left JOIN basedata_patrolpoint b on a.device_id=b.patrolpoint_id |
|
|
|
left JOIN basedata_patrolpoint b on a.device_id=b.patrol_point_id |
|
|
|
left join basedata_device c on b.main_device_id = c.device_id |
|
|
|
left JOIN basedata_area d on c.area_id =d.area_id |
|
|
|
left JOIN basedata_devicetype e on e.device_type_id =c.device_type_id |
|
|
|
@ -331,7 +331,7 @@ |
|
|
|
<result property="presetPosName" column="preset_pos_name"/> |
|
|
|
<result property="eqpBookId" column="eqp_book_id"/> |
|
|
|
<result property="patrolDeviceCode" column="patroldevice_code"/> |
|
|
|
<result property="patrolPointId" column="patrolpoint_id"/> |
|
|
|
<result property="patrolPointId" column="patrol_point_id"/> |
|
|
|
<result property="channelId" column="channel_id"/> |
|
|
|
<result property="channelCode" column="channel_code"/> |
|
|
|
<result property="channelType" column="channel_type"/> |
|
|
|
@ -349,7 +349,7 @@ |
|
|
|
from patrol_preset_pos a |
|
|
|
left join basedata_alg_subtype b on a.alg_subtype_code = b.alg_subtype_code |
|
|
|
INNER join basedata_alg c on b.alg_id = c.alg_id |
|
|
|
where a.patrolpoint_id = #{lineId} |
|
|
|
where a.patrol_point_id = #{lineId} |
|
|
|
and a.alg_subtype_code is not null |
|
|
|
</select> |
|
|
|
<select id="selectAlgorithmType" parameterType="String" resultType="java.util.Map"> |
|
|
|
@ -357,7 +357,7 @@ |
|
|
|
from basedata_patrolpoint a |
|
|
|
left join basedata_alg_subtype b on a.alg_subtype_ids = b.alg_subtype_id |
|
|
|
left join basedata_alg c on b.alg_id = c.alg_id |
|
|
|
where a.patrolpoint_id = #{lineId} |
|
|
|
where a.patrol_point_id = #{lineId} |
|
|
|
</select> |
|
|
|
<select id="selectAlgorithmInfo" parameterType="String" resultType="java.util.Map"> |
|
|
|
select * |
|
|
|
@ -369,8 +369,8 @@ |
|
|
|
<select id="selectThresholdByPointId" parameterType="String" resultType="java.util.Map"> |
|
|
|
select a.*, b.alarm_threshold |
|
|
|
from basedata_patrolpoint a |
|
|
|
LEFT JOIN basedata_stdpatrol_point b on a.std_parol_point_id = b.std_patrolpoint_id |
|
|
|
where a.patrolpoint_id = #{lineId} |
|
|
|
LEFT JOIN basedata_stdpatrol_point b on a.std_parol_point_id = b.std_patrol_point_id |
|
|
|
where a.patrol_point_id = #{lineId} |
|
|
|
</select> |
|
|
|
<select id="selectAlgTypeDataType" parameterType="String" resultType="java.util.Map"> |
|
|
|
select * |
|
|
|
@ -459,11 +459,11 @@ |
|
|
|
left JOIN basedata_device c on b.parent_id = c.device_id |
|
|
|
LEFT JOIN basedata_area d on c.area_id = d.area_id and d.area_type = 'bayunit' |
|
|
|
LEFT JOIN basedata_area e on c.area_id = e.area_id |
|
|
|
where a.patrolpoint_id = #{lineId} |
|
|
|
where a.patrol_point_id = #{lineId} |
|
|
|
</select> |
|
|
|
|
|
|
|
<resultMap type="com.inspect.simulator.domain.result.BasePointAreaInfo" id="BasePointAreaInfo"> |
|
|
|
<result property="patrolPointId" column="patrolpoint_id"/> |
|
|
|
<result property="patrolPointId" column="patrol_point_id"/> |
|
|
|
<result property="patrolPointName" column="patrolpoint_name"/> |
|
|
|
<result property="deviceName" column="device_name"/> |
|
|
|
<result property="mainName" column="main_name"/> |
|
|
|
@ -471,14 +471,14 @@ |
|
|
|
<result property="areaName" column="area_name"/> |
|
|
|
</resultMap> |
|
|
|
<select id="selectBaseInfoByMainId" parameterType="String" resultMap="BasePointAreaInfo"> |
|
|
|
select a.patrolpoint_id, |
|
|
|
select a.patrol_point_id, |
|
|
|
a.patrolpoint_name, |
|
|
|
b.device_name, |
|
|
|
c.device_name as main_name, |
|
|
|
d.area_name as jg_name, |
|
|
|
e.area_name |
|
|
|
from patrol_result f |
|
|
|
left join basedata_patrolpoint a on f.device_id = a.patrolpoint_id |
|
|
|
left join basedata_patrolpoint a on f.device_id = a.patrol_point_id |
|
|
|
left join basedata_device b on a.device_id = b.device_id and b.power_main_equ_flag = "no" |
|
|
|
left join basedata_device c on b.parent_id = c.device_id |
|
|
|
left join basedata_area d on c.area_id = d.area_id and d.area_type = 'bayunit' |
|
|
|
@ -497,7 +497,7 @@ |
|
|
|
left JOIN basedata_device b on a.device_id = b.device_id and b.power_main_equ_flag = "no" |
|
|
|
left JOIN basedata_device c on c.device_id = b.parent_id |
|
|
|
|
|
|
|
where a.patrolpoint_id = #{lineId} |
|
|
|
where a.patrol_point_id = #{lineId} |
|
|
|
</select> |
|
|
|
|
|
|
|
<insert id="insertPatrolResult" parameterType="com.inspect.simulator.domain.result.PatrolResult" useGeneratedKeys="true" keyProperty="lineId"> |
|
|
|
@ -638,7 +638,7 @@ |
|
|
|
<select id="selectOilResultValue" parameterType="com.inspect.simulator.domain.result.PatrolResult" resultMap="ResultValue"> |
|
|
|
|
|
|
|
SELECT |
|
|
|
a.patrolpoint_id, |
|
|
|
a.patrol_point_id, |
|
|
|
d.area_name, |
|
|
|
d.patroldevice_name, |
|
|
|
f.patrolpoint_name, |
|
|
|
@ -651,7 +651,7 @@ |
|
|
|
a.channel_code |
|
|
|
FROM |
|
|
|
patrol_preset_pos a |
|
|
|
LEFT JOIN patrol_result e ON a.patrolpoint_id = e.device_id |
|
|
|
LEFT JOIN patrol_result e ON a.patrol_point_id = e.device_id |
|
|
|
RIGHT JOIN ( |
|
|
|
SELECT |
|
|
|
MAX( h.line_id ) line_id |
|
|
|
@ -666,9 +666,9 @@ |
|
|
|
h.device_id |
|
|
|
) i ON e.line_id = i.line_id |
|
|
|
RIGHT JOIN ( SELECT g.dict_value, g.dict_label FROM sys_dict_data g WHERE g.dict_type = 'oil_api' ) h ON |
|
|
|
h.dict_label = a.patrolpoint_id |
|
|
|
h.dict_label = a.patrol_point_id |
|
|
|
LEFT JOIN basedata_eqpbook d ON a.eqp_book_id = d.eqp_book_id |
|
|
|
LEFT JOIN basedata_patrolpoint f ON a.patrolpoint_id = f.patrolpoint_id |
|
|
|
LEFT JOIN basedata_patrolpoint f ON a.patrol_point_id = f.patrol_point_id |
|
|
|
ORDER BY |
|
|
|
d.area_name, |
|
|
|
d.patroldevice_name |
|
|
|
@ -677,7 +677,7 @@ |
|
|
|
<select id="select6FsResultValue" parameterType="com.inspect.simulator.domain.result.PatrolResult" resultMap="ResultValue"> |
|
|
|
|
|
|
|
SELECT |
|
|
|
a.patrolpoint_id, |
|
|
|
a.patrol_point_id, |
|
|
|
d.area_name, |
|
|
|
d.patroldevice_name, |
|
|
|
f.patrolpoint_name, |
|
|
|
@ -690,7 +690,7 @@ |
|
|
|
a.channel_code |
|
|
|
FROM |
|
|
|
patrol_preset_pos a |
|
|
|
LEFT JOIN patrol_result e ON a.patrolpoint_id = e.device_id |
|
|
|
LEFT JOIN patrol_result e ON a.patrol_point_id = e.device_id |
|
|
|
RIGHT JOIN ( |
|
|
|
SELECT |
|
|
|
MAX( h.line_id ) line_id |
|
|
|
@ -705,9 +705,9 @@ |
|
|
|
h.device_id |
|
|
|
) i ON e.line_id = i.line_id |
|
|
|
RIGHT JOIN ( SELECT g.dict_value, g.dict_label FROM sys_dict_data g WHERE g.dict_type = 'sf6_api' ) h ON |
|
|
|
h.dict_label = a.patrolpoint_id |
|
|
|
h.dict_label = a.patrol_point_id |
|
|
|
LEFT JOIN basedata_eqpbook d ON a.eqp_book_id = d.eqp_book_id |
|
|
|
LEFT JOIN basedata_patrolpoint f ON a.patrolpoint_id = f.patrolpoint_id |
|
|
|
LEFT JOIN basedata_patrolpoint f ON a.patrol_point_id = f.patrol_point_id |
|
|
|
ORDER BY |
|
|
|
d.area_name, |
|
|
|
d.patroldevice_name |
|
|
|
@ -778,7 +778,7 @@ |
|
|
|
ra.result_type resultType, |
|
|
|
ra.filter filter |
|
|
|
from patrol_result f |
|
|
|
left join basedata_patrolpoint a on f.device_id = a.patrolpoint_id |
|
|
|
left join basedata_patrolpoint a on f.device_id = a.patrol_point_id |
|
|
|
left join basedata_area e on a.area_id = e.area_id |
|
|
|
left join result_analysis ra on f.line_id = ra.business_id and f.device_id = ra.objectId and |
|
|
|
f.task_patrolled_id = ra.task_patrol_id |
|
|
|
|