|
|
|
@ -793,6 +793,49 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectPatrolResults" resultType="com.inspect.simulator.domain.result.PatrolResult"> |
|
|
|
select f.line_id lineId, |
|
|
|
s.task_patrolled_id taskPatrolledId, |
|
|
|
s.start_time startTime, |
|
|
|
d.area_name areaName, |
|
|
|
c.device_name deviceName, |
|
|
|
c.phy_asset_id phyAssetId, |
|
|
|
a.patrol_point_name pointName, |
|
|
|
f.create_time createTime, |
|
|
|
f.file_path filePath, |
|
|
|
bas.alg_subtype_name algorithmsName, |
|
|
|
ra.alg_type algorithmsType, |
|
|
|
ra.res_img_url resImgUrl, |
|
|
|
ra.image_normal_url_path imageNormalUrlPath, |
|
|
|
ra.result_type resultType, |
|
|
|
ra.filter filter, |
|
|
|
ra.res_value resValue |
|
|
|
from patrol_task_status s |
|
|
|
left join result_analysis ra on ra.task_patrol_id = s.task_patrolled_id |
|
|
|
left join patrol_result f on ra.business_id = f.line_id and ra.objectId = f.device_id |
|
|
|
left join basedata_patrolpoint a on ra.objectId = a.patrol_point_id |
|
|
|
left join basedata_device c on a.device_id = c.device_id |
|
|
|
left join basedata_area e on a.area_id = e.area_id |
|
|
|
left join basedata_area d on d.area_id = e.parent_id |
|
|
|
left join basedata_alg_subtype bas |
|
|
|
on bas.alg_subtype_code = ra.alg_type and find_in_set(bas.alg_subtype_id, a.alg_subtype_ids) |
|
|
|
where |
|
|
|
a.patrol_point_id is not null and (ra.filter = '0' or ra.filter = '1') |
|
|
|
<if test="astId != null and astId != ''"> |
|
|
|
and c.phy_asset_id = #{astId} |
|
|
|
</if> |
|
|
|
<if test="deviceType != null and deviceType != ''"> |
|
|
|
and c.device_type_name like concat('%',#{deviceType},'%') |
|
|
|
</if> |
|
|
|
<if test="startTime != null and startTime != ''"> |
|
|
|
and s.start_time >= #{startTime} |
|
|
|
</if> |
|
|
|
<if test="endTime != null and endTime != ''"> |
|
|
|
and s.start_time <= #{endTime} |
|
|
|
</if> |
|
|
|
order by s.task_patrolled_id desc |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectPatrolResultOld" resultType="com.inspect.simulator.domain.result.PatrolResult"> |
|
|
|
select f.line_id lineId, |
|
|
|
s.task_patrolled_id taskPatrolledId, |
|
|
|
s.start_time startTime, |
|
|
|
|