保安员 - 保安员选择人员列表 __qmtw40pukMZGOuCte1x __qmtw40pukMZGOuCte1x published UTF-8 post /duty/task/security/member/list json = 0){ //封控圈方案 sql += " from tlk_company_selected_zone a JOIN tlk_company_zone_employee_arrange b on a.id = b.ITEM_SELECTEDPLANZONEID " + " join obpm2.tenant_employees e on b.ITEM_EMPLOYEEID = e.id "; }else{ //否则为专项行动方案 sql += " from tlk_company_action_employee_arrange a join obpm2.tenant_employees e on a.ITEM_EMPLOYEEID = e.id "; } sql += " join obpm2.tenant_organizations o on e.organization_id = o.id " + " join obpm2.tenant_users u on e.tenant_user_id = u.id " + " left join obpm2.tenant_user_credentials c on u.selected_credential_id = c.id " + " left join tlk_patrol_task_employee_relations r on e.id = r.ITEM_EMPLOYEEID and r.ITEM_TASKID = '" + taskId + "'" + " where a.ITEM_PLANID = '" + planId + "' and r.id is null "; }else{ sql += " from obpm2.tenant_employees e " + " join obpm2.tenant_organizations o on e.organization_id = o.id " + " join obpm2.tenant_users u on e.tenant_user_id = u.id " + " left join obpm2.tenant_user_credentials c on u.selected_credential_id = c.id " + " left join tlk_patrol_task_employee_relations r on e.id = r.ITEM_EMPLOYEEID and r.ITEM_TASKID = '" + taskId + "'" + " where o.supervise_depart_id in " + subGroup + " and o.institutional_code in ('0102','0104') and o.approved_information_status = '1' and e.status = '0' and r.id is null "; } if(isNotNull(name)){ sql += " and u.name like '%" + name + "%'"; } sql += " limit " + limitFrom + "," + pageSize; var data = queryByDSName("duty",sql); //result.put("sql", sql); result.put("data", data); return result; })()]]>