@SuppressWarnings("rawtypes") public Object updateAll(Map p) throws SQLException { if(p.get("nXh")==null||"".equals(p.get("nXh"))){ return userDao.saveInfo(p); } return userDao.updateAllInfo(p); }
@SuppressWarnings({ "unchecked", "rawtypes" }) public List chooseZb() throws SQLException { Map p=new HashMap(); p.put("cBxh", "DEP"); List<Map> list=dmDao.queryAllInfo(p); for (int i = 0; i < list.size(); i++) { Map tp=list.get(i); tp.put("text", tp.get("cMc")); Map ctp=new HashMap(); ctp.put("cYhz", tp.get("cDm")); List<Map> clist=userDao.queryAllInfo(ctp); for (int j = 0; j < clist.size(); j++) { Map cp=clist.get(j); if("2".equals(cp.get("cJb"))){ cp.put("text", cp.get("cXm")+"(带班)"); }else{ cp.put("text", cp.get("cXm")); } cp.put("value", cp.get("userId")); cp.put("id", cp.get("userId")); cp.put("tel", cp.get("cDhhm")); } tp.put("children", clist); } return list; }
@SuppressWarnings({ "unchecked", "rawtypes" }) public List chooseOnlyUser() throws SQLException { Map ctp=new HashMap(); List<Map> clist=userDao.queryAllInfo(ctp); for (int j = 0; j < clist.size(); j++) { Map cp=clist.get(j); cp.put("text", cp.get("cXm")); cp.put("value", cp.get("userId")); cp.put("id", cp.get("userId")); } return clist; }
@SuppressWarnings({ "unchecked", "rawtypes" }) public String getSr() throws SQLException { String returnValue=""; List<Map> list=userDao.getSr(); for (int i = 0; i < list.size(); i++) { returnValue=returnValue+list.get(i).get("cXm")+","; } if(returnValue.length()>0){ returnValue=returnValue.substring(0, returnValue.length()-1); } return returnValue; }
@SuppressWarnings({ "rawtypes", "unchecked" }) public List<Map> chooseWithDep() throws SQLException { List<Map> rlist=new ArrayList(); Map p=new HashMap(); p.put("cBxh", "DEP"); List<Map> list=dmDao.queryAllInfo(p); for (int i = 0; i < list.size(); i++) { Map tp=list.get(i); Map ctp=new HashMap(); ctp.put("cYhz", tp.get("cDm")); List<Map> clist=userDao.queryAllInfo(ctp); for (int j = 0; j < clist.size(); j++) { Map cp=clist.get(j); cp.put("text", tp.get("cMc")+"----"+cp.get("cXm")); cp.put("value", cp.get("userId")); cp.put("id", cp.get("userId")); rlist.add(cp); } } return rlist; }
@SuppressWarnings("rawtypes") public Object getSupJb(Map p) throws SQLException { return userDao.getSupJb(p); }
@SuppressWarnings("rawtypes") public List queryAll(Map p) throws SQLException { return userDao.queryAllInfo(p); }
@SuppressWarnings("rawtypes") public Object remove(Map p) throws SQLException { return userDao.removeInfo(p); }
@SuppressWarnings("rawtypes") public Object saveAll(Map p) throws SQLException { return userDao.saveAllInfo(p); }
@SuppressWarnings("rawtypes") public Object save(Map p) throws SQLException { Object userId =userDao.saveInfo(p); return userId; }
@SuppressWarnings("rawtypes") public Map queryByPage(Map p, Map page) throws SQLException { return userDao.queryByPageInfo(p, page); }