| | |
| | | DISTINCT attach.id, |
| | | attach.link, |
| | | attach.name, |
| | | ifNull( attach.nick_name,SUBSTRING_INDEX( SUBSTRING_INDEX( attach.NAME, '/', - 1 ), '.', 1 )) AS nick_name, |
| | | COALESCE( attach.nick_name,SUBSTRING_INDEX( SUBSTRING_INDEX( attach.NAME, '/', - 1 ), '.', 1 )) AS nick_name, |
| | | attach.original_name, |
| | | attach.extension, |
| | | attach.device_sn, |
| | |
| | | attach.link, |
| | | attach.name, |
| | | attach.attach_size, |
| | | ifNull( attach.nick_name,SUBSTRING_INDEX( SUBSTRING_INDEX( attach.NAME, '/', - 1 ), '.', 1 )) nick_name, |
| | | COALESCE( attach.nick_name,SUBSTRING_INDEX( SUBSTRING_INDEX( attach.NAME, '/', - 1 ), '.', 1 )) nick_name, |
| | | attach.original_name, |
| | | attach.extension, |
| | | attach.device_sn, |
| | |
| | | #{attach.startTime} and #{attach.endTime} or rela.create_time between #{attach.startTime} and #{attach.endTime} ) |
| | | </if> |
| | | <if test="attach.name!=null and attach.name!=''"> |
| | | and ifNull(attach.nick_name, SUBSTRING_INDEX(SUBSTRING_INDEX(attach.NAME, '/', -1), '.', 1)) |
| | | and COALESCE(attach.nick_name, SUBSTRING_INDEX(SUBSTRING_INDEX(attach.NAME, '/', -1), '.', 1)) |
| | | like concat('%',#{attach.name},'%') |
| | | </if> |
| | | <if test="attach.jobName!=null and attach.jobName!=''"> |
| | |
| | | attach.create_time, |
| | | attach.link, |
| | | rela.event_name, |
| | | ifnull(attach.result_type,2) "result_type" |
| | | COALESCE(attach.result_type,2) "result_type" |
| | | FROM blade_attach attach |
| | | LEFT JOIN drone_job_event_rela rela ON attach.id = rela.attach_id::VARCHAR |
| | | WHERE |
| | |
| | | select attach.create_time, |
| | | attach.id, |
| | | attach.name, |
| | | ifNull(attach.nick_name, SUBSTRING_INDEX(SUBSTRING_INDEX(attach.NAME, '/', - 1), '.', 1)) nick_name, |
| | | COALESCE(attach.nick_name, SUBSTRING_INDEX(SUBSTRING_INDEX(attach.NAME, '/', - 1), '.', 1)) nick_name, |
| | | attach.link, |
| | | attach.device_sn, |
| | | attach.metadata, |
| | |
| | | select attach.create_time, |
| | | attach.id, |
| | | attach.name, |
| | | ifNull(attach.nick_name, SUBSTRING_INDEX(SUBSTRING_INDEX(attach.NAME, '/', - 1), '.', 1)) nick_name, |
| | | COALESCE(attach.nick_name, SUBSTRING_INDEX(SUBSTRING_INDEX(attach.NAME, '/', - 1), '.', 1)) nick_name, |
| | | attach.link, |
| | | attach.device_sn, |
| | | attach.metadata, |
| | |
| | | wayline_job j ON a.wayline_job_id = j.job_id::VARCHAR |
| | | WHERE |
| | | ( |
| | | FIND_IN_SET(#{lotInfoId}, j.lot_info_id) > 0 |
| | | #{lotInfoId} = ANY(string_to_array(j.lot_info_id, ',')::bigint[]) |
| | | OR j.lot_info_id = #{lotInfoId} |
| | | ) |
| | | AND a.result_type = 0 -- 根据您的需求,只查询成果类型为 0 (图片) 的数据 |