Пример #1
0
 // 企业治安级别统计查询
 public String querylist() throws Exception {
   try {
     Qyzajbtj setQyzajbtj = new Qyzajbtj();
     setQyzajbtj = (Qyzajbtj) this.setClass(setQyzajbtj, null);
     Map map = new HashMap();
     map.put("dsjgbz", setQyzajbtj.getDsjgbz());
     map.put("fxjbz", setQyzajbtj.getFxjbz());
     map.put("gxdwbz", setQyzajbtj.getGxdwbz());
     map.put("csbz", setQyzajbtj.getCsbz());
     map.put("dsjgdm", setQyzajbtj.getDsjgdm());
     map.put("fxjdm", setQyzajbtj.getFxjdm());
     map.put("gxdwdm", setQyzajbtj.getGxdwdm());
     map.put("qybm", setQyzajbtj.getCsbm());
     map.put("qssj", setQyzajbtj.getQssj());
     map.put("jzsj", setQyzajbtj.getJzsj());
     map.put("hylbdm", setQyzajbtj.getHylbdm());
     ActionContext ctx = ActionContext.getContext();
     HttpServletRequest request = (HttpServletRequest) ctx.get(ServletActionContext.HTTP_REQUEST);
     HttpSession session = request.getSession();
     User user = (User) session.getAttribute(Constants.userKey);
     String departTemp = user.getDepartment().getDepartcode();
     String sjName = ""; // 市局名称(直辖市)
     String cityFlag = "1";
     if (departTemp.substring(0, 2).equals("11")) {
       sjName = "北京市公安局";
       map.put("cityFlag", "1");
     } else if (departTemp.substring(0, 2).equals("12")) {
       sjName = "天津市公安局";
       map.put("cityFlag", "1");
     } else if (departTemp.substring(0, 2).equals("31")) {
       sjName = "上海市公安局";
       map.put("cityFlag", "1");
     } else if (departTemp.substring(0, 2).equals("50")) {
       sjName = "重庆市公安局";
       map.put("cityFlag", "1");
     } else {
       cityFlag = "2";
     }
     Page page = qyzajbtjService.getQyzajbtjList(map, pagesize, pagerow, sort, dir);
     totalpage = page.getTotalPages();
     totalrows = page.getTotalRows();
     lQyzajbtj = page.getData();
     zuQyzajbtj(lQyzajbtj, setQyzajbtj, cityFlag);
     this.result = "success";
   } catch (Exception e) {
     this.result = "查询列表失败";
     e.printStackTrace();
   }
   return "success";
 }
Пример #2
0
 public String querylistQyzabg() throws Exception {
   try {
     Qyzajbtj setQyzajbtj = new Qyzajbtj();
     setQyzajbtj = (Qyzajbtj) this.setClass(setQyzajbtj, null);
     Map map = new HashMap();
     map.put("qybm", setQyzajbtj.getQybm());
     map.put("gxdwdm", setQyzajbtj.getGxdwdm());
     map.put("hylbdm", setQyzajbtj.getHylbdm());
     map.put("qssj", setQyzajbtj.getQssj());
     map.put("jzsj", setQyzajbtj.getJzsj());
     map.put("relation", setQyzajbtj.getRelation());
     Page page = qyzajbtjService.getQyzabgListForPage(map, pagesize, pagerow, sort, dir);
     totalpage = page.getTotalPages();
     totalrows = page.getTotalRows();
     lQyzajbtj = page.getData();
     setTabledataQyzabg(lQyzajbtj);
     this.result = "success";
   } catch (Exception e) {
     this.result = "查询列表失败";
     e.printStackTrace();
   }
   return "success";
 }