and 1=2
and rescue_info.elevator_id in (select elevator_id from ele_info_usage where estate_company_id = #{ccId})
and rescue_info.elevator_id in (select elevator_id from ele_info_mainten where mainten_company_id = #{ccId})
and rescue_info.elevator_id in (select elevator_id from fault_insure_elevator where insure_id in (select insure_id from fault_insure where insure_company_id = #{ccId}))
and rescue_info.elevator_id in (select elevator_id from ele_info_basic where quality_company_id = #{ccId})
and rescue_info.elevator_id in (select elevator_id from ele_info_basic where inspect_company_id = #{ccId})
and rescue_info.elevator_id in (select elevator_id from pf_user_elevator where user_id = #{limitUser})
select
rescue_info.*,
ele_info_basic.registration_code,ele_info_basic.elevator_name,ele_info_usage.estate_id,
pf_auth_user.real_name rescueUserName,pf_auth_user.phone rescueUserPhone,
ele_company.company_name rescueCompanyName
from `rescue_info`
left join ele_info_basic on rescue_info.elevator_id = ele_info_basic.elevator_id
left join pf_auth_user on rescue_info.rescue_user = pf_auth_user.user_id
left join ele_info_usage on rescue_info.elevator_id = ele_info_usage.elevator_id
left join ele_company on rescue_info.rescue_company = ele_company.company_id
and (ele_info_basic.elevator_name like concat('%',#{querySearch,jdbcType=VARCHAR},'%')
or rescue_info.elevator_id like concat('%',#{querySearch,jdbcType=VARCHAR},'%')
or rescue_info.rescue_id like concat('%',#{querySearch,jdbcType=VARCHAR},'%') )
and rescue_info.elevator_id = #{elevatorId,jdbcType=VARCHAR}
and ele_info_usage.city_id like concat(#{cityId,jdbcType=VARCHAR},'%')
and ele_info_usage.estate_id = #{estateId,jdbcType=VARCHAR}
and rescue_info.elevator_id = #{elevatorId}
and ele_info_usage.estate_id in
#{estateId}
and rescue_source = #{rescueSource,jdbcType=VARCHAR}
and event_status = #{eventStatus,jdbcType=INTEGER}
and date(send_time) >= #{sendTimeStart,jdbcType=VARCHAR}
and date(send_time) <= #{sendTimeEnd,jdbcType=VARCHAR}
and date(catch_time) >= #{catchTimeStart,jdbcType=VARCHAR}
and date(catch_time) <= #{catchTimeEnd,jdbcType=VARCHAR}
and date(arrival_time) >= #{arrivalTimeStart,jdbcType=VARCHAR}
and date(arrival_time) <= #{arrivalTimeEnd,jdbcType=VARCHAR}
and date(getout_time) >= #{getoutTimeStart,jdbcType=VARCHAR}
and date(getout_time) <= #{getoutTimeEnd,jdbcType=VARCHAR}
and date(event_time) >= #{eventTimeStart,jdbcType=VARCHAR}
and date(event_time) <= #{eventTimeEnd,jdbcType=VARCHAR}
and date(event_end_time) >= #{eventEndTimeStart,jdbcType=VARCHAR}
and date(event_end_time) <= #{eventEndTimeEnd,jdbcType=VARCHAR}
and event_status in
#{status}
and (
(arrival_time is null and TIMESTAMPDIFF(MINUTE,event_time,sysdate()) >= #{arrivalTimeOut})
or (arrival_time is not null and TIMESTAMPDIFF(MINUTE,event_time,arrival_time) >= #{arrivalTimeOut})
or
(getout_time is null and TIMESTAMPDIFF(MINUTE,event_time,sysdate()) >= #{outOfTrapTimeOut})
or (getout_time is not null and TIMESTAMPDIFF(MINUTE,event_time,getout_time) >= #{outOfTrapTimeOut})
)
order by rescue_info.elevator_id
order by elevator_name
order by rerun_time
order by event_time
order by arrival_time
order by getout_time
order by rescue_info.elevator_id desc
order by elevator_name desc
order by rerun_time desc
order by event_time desc
order by arrival_time desc
order by getout_time desc
order by create_time desc
select rescue_id from `rescue_info`
where rescue_id like concat(#{rescueId,jdbcType=VARCHAR},'%') order by LENGTH(rescue_id) desc,rescue_id desc limit 1
SELECT IFNULL(SUM(personal_num),0) FROM rescue_info
and elevator_id = #{elevatorId,jdbcType=VARCHAR}
select count(0) from `rescue_info`
and elevator_id = #{querySearch,jdbcType=VARCHAR}
and event_status = #{eventStatus,jdbcType=INTEGER}
and ((arrival_time is null and TIMESTAMPDIFF(MINUTE,event_time,sysdate()) >= #{arrivalTimeOut})
or (arrival_time is not null and TIMESTAMPDIFF(MINUTE,event_time,arrival_time) >= #{arrivalTimeOut}))
and ((getout_time is null and TIMESTAMPDIFF(MINUTE,event_time,sysdate()) >= #{outOfTrapTimeOut})
or (getout_time is not null and TIMESTAMPDIFF(MINUTE,event_time,getout_time) >= #{outOfTrapTimeOut}))
and date(event_time) = #{eventTimeStart,jdbcType=VARCHAR}
select * from `rescue_info`
elevator_id = #{elevatorId,jdbcType=VARCHAR} and getout_time is not null and getout_time < now() and video_path is null and getout_time > timestampadd(day, -1, now())
and event_time > timestampadd(day, -1, now())
order by getout_time
update `rescue_info`
`video_path` = #{videoPath,jdbcType=VARCHAR},
`img_path` = #{imgPath,jdbcType=VARCHAR}
rescue_id = #{rescueId,jdbcType=VARCHAR}
update `rescue_info`
`trap_video_path` = #{trapVideoPath,jdbcType=VARCHAR},
`img_path` = #{imgPath,jdbcType=VARCHAR}
rescue_id = #{rescueId,jdbcType=VARCHAR}
update `rescue_info`
`fault_id` = #{faultId,jdbcType=VARCHAR}
rescue_id = #{rescueId,jdbcType=VARCHAR}
select IFNULL(event_status, 0) from `rescue_info`
`elevator_id` = #{elevatorId,jdbcType=VARCHAR} and `create_time` >= timestampadd(day, -1, now())
order by create_time desc limit 1
select * from `rescue_info`
rescue_id = #{rescueId,jdbcType=VARCHAR}