| | |
| | | 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, |
| | |
| | | SELECT |
| | | odm.base_path basePath, |
| | | wj.dkbh, |
| | | IFNULL(odm.ort_tb_path,odm.orthoimage_path) path, |
| | | COALESCE(odm.ort_tb_path,odm.orthoimage_path) path, |
| | | FROM_UNIXTIME( wj.completed_time/ 1000) as createTime, |
| | | md.nickname as airportName |
| | | FROM |
| | |
| | | <!--根据类型获取数据成果数量--> |
| | | <select id="getMediaFileCountByResultType" resultType="org.sxkj.resource.vo.MediaFileCountVO"> |
| | | SELECT |
| | | IFNULL( sum( CASE WHEN result_type = 0 THEN 1 ELSE 0 END ), 0 ) AS "phoneNum", |
| | | IFNULL( sum( CASE WHEN result_type = 1 THEN 1 ELSE 0 END ), 0 ) AS "videoNum", |
| | | IFNULL( sum( CASE WHEN result_type = 2 THEN 1 ELSE 0 END ), 0 ) AS "aiNum", |
| | | IFNULL( sum( CASE WHEN result_type = 3 THEN 1 ELSE 0 END ), 0 ) AS "gisNum", |
| | | IFNULL( sum( CASE WHEN result_type = 4 THEN 1 ELSE 0 END ), 0 ) AS "tifNum", |
| | | IFNULL( sum( CASE WHEN result_type = 5 THEN 1 ELSE 0 END ), 0 ) AS "fullNum" |
| | | COALESCE( sum( CASE WHEN result_type = 0 THEN 1 ELSE 0 END ), 0 ) AS "phoneNum", |
| | | COALESCE( sum( CASE WHEN result_type = 1 THEN 1 ELSE 0 END ), 0 ) AS "videoNum", |
| | | COALESCE( sum( CASE WHEN result_type = 2 THEN 1 ELSE 0 END ), 0 ) AS "aiNum", |
| | | COALESCE( sum( CASE WHEN result_type = 3 THEN 1 ELSE 0 END ), 0 ) AS "gisNum", |
| | | COALESCE( sum( CASE WHEN result_type = 4 THEN 1 ELSE 0 END ), 0 ) AS "tifNum", |
| | | COALESCE( sum( CASE WHEN result_type = 5 THEN 1 ELSE 0 END ), 0 ) AS "fullNum" |
| | | FROM |
| | | blade_attach a |
| | | LEFT JOIN wayline_job wj ON a.wayline_job_id = wj.job_id::VARCHAR |
| | |
| | | #{item.createTime}, |
| | | #{item.updateUser}, |
| | | #{item.updateTime}, |
| | | IFNULL(#{item.status}, '0'), |
| | | IFNULL(#{item.isDeleted}, 0) |
| | | COALESCE(#{item.status}, '0'), |
| | | COALESCE(#{item.isDeleted}, 0) |
| | | ) |
| | | </foreach> |
| | | </insert> |
| | |
| | | #{createTime}, |
| | | #{updateUser}, |
| | | #{updateTime}, |
| | | IFNULL(#{status}, '0'), |
| | | IFNULL(#{isDeleted}, 0) |
| | | COALESCE(#{status}, '0'), |
| | | COALESCE(#{isDeleted}, 0) |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | else length(ds.area_divide_ids) - length(replace(ds.area_divide_ids, ',', '')) + 1 |
| | | end as area_count, |
| | | ( |
| | | select ifnull(sum( |
| | | select COALESCE(sum(`` |
| | | case |
| | | when ad.device_ids is null or ad.device_ids = '' then 0 |
| | | else length(ad.device_ids) - length(replace(ad.device_ids, ',', '')) + 1 |
| | |
| | | #{createTime}, |
| | | #{updateUser}, |
| | | #{updateTime}, |
| | | IFNULL(#{status}, '0'), |
| | | IFNULL(#{isDeleted}, 0) |
| | | COALESCE(#{status}, '0'), |
| | | COALESCE(#{isDeleted}, 0) |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | |
| | | <select id="selectGdClueEventList" resultMap="gdClueEventVoResultMap"> |
| | | select ce.*, |
| | | ifnull(bu.real_name, bu.name) as dispose_user_name, |
| | | COALESCE(bu.real_name, bu.name) as dispose_user_name, |
| | | bd.dept_name as dispose_dept_name |
| | | from (select * from ja_gd_clue_event ${ew.customSqlSegment}) ce |
| | | left join blade_user bu on bu.id = ce.dispose_user::VARCHAR and bu.is_deleted = 0 |
| | |
| | | |
| | | <select id="selectGdClueEventDetailById" resultMap="gdClueEventVoResultMap"> |
| | | select ce.*, |
| | | ifnull(bu.real_name, bu.name) as dispose_user_name, |
| | | COALESCE(bu.real_name, bu.name) as dispose_user_name, |
| | | bd.dept_name as dispose_dept_name, |
| | | ifnull(cu.real_name, cu.name) as distribute_user_name, |
| | | COALESCE(cu.real_name, cu.name) as distribute_user_name, |
| | | cd.dept_name as distribute_dept_name, |
| | | ce.create_time as distribute_time, |
| | | concat(ce.longitude, ',', ce.latitude) as event_location, |
| | |
| | | |
| | | <select id="selectGdClueEventCount" resultMap="gdClueEventCountVoResultMap"> |
| | | select count(1) as total_count, |
| | | ifnull(sum(case when ce.dispose_user = #{userId} then 1 else 0 end), 0) as my_count |
| | | COALESCE(sum(case when ce.dispose_user = #{userId} then 1 else 0 end), 0) as my_count |
| | | from ja_gd_clue_event ce |
| | | <include refid="gdClueEventDeptWhere"/> |
| | | and ce.event_status in (1, 3) |
| | |
| | | left join manage_device_per_share ddps on ddps.loan_to_dept_id = bd.id::VARCHAR |
| | | where bd.is_deleted = 0 |
| | | and bd.id != #{deptId} |
| | | and ifnull(device_sn,'') != #{deviceSn} |
| | | and COALESCE(device_sn,'') != #{deviceSn} |
| | | and bd.id not in ( |
| | | -- 排除当前部门的所有上级部门 |
| | | select parent_dept.id |
| | |
| | | oti.vox_grid_tiles_path, |
| | | oti.device_sn, |
| | | wj.dkbh, |
| | | IFNULL( ST_AsText ( oti.geom ), ifnull( tli.sdfw, tli.dkfw )) AS geom |
| | | COALESCE( ST_AsText ( oti.geom ), COALESCE( tli.sdfw, tli.dkfw )) AS geom |
| | | FROM odm_task_info oti |
| | | left join wayline_job wj on wj.job_id = oti.wayline_job_id::VARCHAR |
| | | left join tb_lot_info tli on tli.dkbh = wj.dkbh::VARCHAR |
| | |
| | | oti.vox_grid_tiles_path, |
| | | oti.device_sn, |
| | | tli.dkbh, |
| | | IFNULL( ST_AsText ( oti.geom ), ifnull( tli.sdfw, tli.dkfw )) AS geom |
| | | COALESCE( ST_AsText ( oti.geom ), COALESCE( tli.sdfw, tli.dkfw )) AS geom |
| | | FROM |
| | | odm_task_info oti |
| | | LEFT JOIN wayline_job wj ON wj.job_id = oti.wayline_job_id::VARCHAR AND wj.is_deleted = 0 |