Search in sources :

Example 1 with Dept

use of app.hongs.serv.master.Dept in project HongsCORE by ihongs.

the class AuthKit method getMoreDepts.

public static Set getMoreDepts(String uid) throws HongsException {
    Table rel = DB.getInstance("master").getTable("user_dept");
    List<Map> lst = rel.fetchCase().filter("user_id = ?", uid).select("dept_id").all();
    Set set = new HashSet();
    Dept dp = new Dept();
    for (Map row : lst) {
        set.addAll(dp.getChildIds((String) row.get("dept_id"), true));
    }
    return set;
}
Also used : Table(app.hongs.db.Table) Set(java.util.Set) HashSet(java.util.HashSet) Dept(app.hongs.serv.master.Dept) HashMap(java.util.HashMap) Map(java.util.Map) HashSet(java.util.HashSet)

Aggregations

Table (app.hongs.db.Table)1 Dept (app.hongs.serv.master.Dept)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 Map (java.util.Map)1 Set (java.util.Set)1