| | |
| | | <if test="null != item.status"> |
| | | and a.status = #{item.status} |
| | | </if> |
| | | order by a.execution_time desc |
| | | </select> |
| | | |
| | | |
| | |
| | | ifnull(e.num, 0) as offlineNum, |
| | | ifnull(f.num, 0) as normalNum, |
| | | ifnull(g.num, 0) as abnormalNum, |
| | | ROUND(ifnull(((ifnull(e.num, 0) + ifnull(f.num, 0) + ifnull(g.num, 0)) / ifnull(c.num, 0) * 100), 0), 2) as schedule, |
| | | if(h.num > 0, 0, 1) as authStatus |
| | | from t_task_detail a |
| | | left join t_patrol_task b on (a.patrol_task_id = b.id) |
| | |
| | | from t_task_detail_vehicles a |
| | | left join t_task_detail b on (a.task_detail_id = b.id) |
| | | left join t_patrol_task c on (a.patrol_task_id = c.id) |
| | | left join t_task_detail_vehicles_channel d on (a.id = d.task_detail_vehicles_id and d.video_channel = 1) |
| | | left join t_task_detail_vehicles_channel d on (a.id = d.task_detail_vehicles_id) |
| | | left join sys_user e on (d.artificial_user_id = e.id) |
| | | where b.del_flag = 0 |
| | | <if test="null != ids and ids.size() > 0"> |
| | |
| | | <if test="null != status"> |
| | | and b.status = #{status} |
| | | </if> |
| | | order by b.execution_time desc |
| | | </select> |
| | | </mapper> |