我的任务 - 巡逻状态
__qmtw40pukMZGOuCte1x
__qmtw40pukMZGOuCte1x
published
UTF-8
post
/duty/task/mine/patrol/status
json
0 then '已完成' when t.ITEM_STATUS = '2' and cnt > 0 then '巡逻中' when t.ITEM_STATUS = '2' and cnt = 0 then '待巡逻' else '' end) as status " +
" from ( " +
" select r.ITEM_STATUS," +
" (select count(DISTINCT c.id) from duty.tlk_task_employee_checkin_records c join duty.tlk_patrol_task_path_relations x on c.ITEM_TASKID = x.ITEM_TASKID join duty.tlk_patrol_path_point_relations y on x.ITEM_PATHID = y.ITEM_PATHID and c.ITEM_POINTID = y.ITEM_POINTID where c.ITEM_TASKID = r.ITEM_TASKID and c.ITEM_EMPLOYEEID = r.ITEM_EMPLOYEEID) as cnt " +
" from duty.tlk_patrol_task_employee_relations r " +
" where r.ITEM_TASKID = '" + taskId + "' and r.ITEM_EMPLOYEEID = '" + userId + "') t";
var datas = queryByDSName("duty",sql);
var result = new Packages.java.util.HashMap();
//result.put("sql", sql);
result.put("data", datas);
return result;
})()]]>