Exemple #1
0
  private void zuQyzajbbgtj(List lQyzajbtj, Qyzajbtj qyzajbtj, String cityFlag) {
    String zagxjgdm = "";
    String qybm = "";
    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();

    if (lQyzajbtj != null && lQyzajbtj.size() > 0) {
      for (int i = 0; i < lQyzajbtj.size(); i++) {
        Qyzajbtj getQyzajbtj = (Qyzajbtj) lQyzajbtj.get(i);
        if (getQyzajbtj.getQybm() != null) {
          qybm = getQyzajbtj.getQybm();
        }
        if (getQyzajbtj.getGxdwdm() != null) {
          zagxjgdm = getQyzajbtj.getGxdwdm();
        } else if (getQyzajbtj.getFxjdm() != null) {
          zagxjgdm = getQyzajbtj.getFxjdm();
        } else if (getQyzajbtj.getDsjgdm() != null) {
          zagxjgdm = getQyzajbtj.getDsjgdm();
        } else {
          zagxjgdm = departTemp;
        }
        if ("1".equals(qyzajbtj.getGxdwbz())) {
          zagxjgdm = zagxjgdm.substring(0, 8);
        } else if ("1".equals(qyzajbtj.getFxjbz())) {
          zagxjgdm = zagxjgdm.substring(0, 6);
        } else if ("1".equals(qyzajbtj.getDsjgbz()) && "2".equals(cityFlag)) {
          zagxjgdm = zagxjgdm.substring(0, 4);
        } else {
          zagxjgdm = zagxjgdm.substring(0, 2);
        }
        getQyzajbtj.setYgdd(
            "<a href='#' class='hyperlink' onClick=queryzajbbg_qyjbxxlist('1','"
                + getQyzajbtj.getHylbdm()
                + "','"
                + zagxjgdm
                + "','"
                + qybm
                + "');>"
                + getQyzajbtj.getYgdd()
                + "</a>");
        getQyzajbtj.setYddg(
            "<a href='#' class='hyperlink' onClick=queryzajbbg_qyjbxxlist('2','"
                + getQyzajbtj.getHylbdm()
                + "','"
                + zagxjgdm
                + "','"
                + qybm
                + "');>"
                + getQyzajbtj.getYddg()
                + "</a>");
      }
    }
  }
 // 查看是否有账号
 public String getUser(String useraccount) {
   User user = new User();
   user.setUseraccount(useraccount);
   user = userDao.getUser(user);
   if (user != null && user.getUseraccount() != null) {
     return "1";
   } else {
     return "0";
   }
 }
Exemple #3
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";
 }
Exemple #4
0
  public String querylist() throws Exception {
    Gzdx setGzdx = new Gzdx();
    gzdx = (Gzdx) this.setClass(setGzdx, null);
    Map map = new HashMap();
    map.put("xm", gzdx.getXm());
    map.put("xb", gzdx.getXb());
    map.put("zjhm", gzdx.getZjhm());
    map.put("csrq", gzdx.getCsrq());
    map.put("csrq2", gzdx.getCsrq2());
    map.put("mzdm", gzdx.getMzdm());
    map.put("hjdxzqhdm", gzdx.getHjdxzqhdm());
    map.put("hylbdm", gzdx.getHylbdm());
    User user = (User) this.getRequest().getSession().getAttribute(Constants.userKey);
    if (user != null) {
      String dqdwbm = user.getDepartment().getDepartcode();
      int level = user.getDepartment().getDepartlevel().intValue();
      if (level >= 3) map.put("tbdabm", StringUtil.trimEven0(dqdwbm) + "%");
      map.put("dqdwbm", dqdwbm);
    }

    // 如果查询菜单是注销管理,则应该要加一个默认条件为未注销
    if ("cancel".equals(gzdx.getFlag())) {
      map.put("zxbz", "0");
    }
    // 如果选择了姓名拼音的同音查询,则需要得到姓名的拼音
    if ("1".equals(gzdx.getTyCheck())) {
      map.put("xmpy", PinYinUtil.getHanyuPingYin(gzdx.getXm()));
      map.put("xm", "");
    }
    Page page = gzdxService.getListForPage(map, pagesize, pagerow, sort, dir);
    totalpage = page.getTotalPages();
    totalrows = page.getTotalRows();
    lGzdx = page.getData();
    setTabledata(lGzdx);
    this.result = "success";
    return "success";
  }
Exemple #5
0
 public String querylist() throws Exception {
   Qyyyrztj setQyyyrztj = new Qyyyrztj();
   setQyyyrztj = (Qyyyrztj) this.setClass(setQyyyrztj, null);
   Map map = new HashMap();
   map.put("dsjgdm", setQyyyrztj.getDsjgdm());
   map.put("fxjdm", setQyyyrztj.getFxjdm());
   map.put("gxdwdm", setQyyyrztj.getGxdwdm());
   map.put("dsjgbz", setQyyyrztj.getDsjgbz());
   map.put("fxjbz", setQyyyrztj.getFxjbz());
   map.put("gxdwbz", setQyyyrztj.getGxdwbz());
   map.put("hylbdm", setQyyyrztj.getHylbdm());
   map.put("qsrq", setQyyyrztj.getQsrq());
   map.put("jzrq", setQyyyrztj.getJzrq());
   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 DeptCode = departTemp;
   if (!setQyyyrztj.getDsjgdm().equals("")) DeptCode = setQyyyrztj.getDsjgdm();
   if (!setQyyyrztj.getFxjdm().equals("")) DeptCode = setQyyyrztj.getFxjdm();
   if (!setQyyyrztj.getGxdwdm().equals("")) DeptCode = setQyyyrztj.getGxdwdm();
   map.put("deptcode", StringUtil.trimEven0(DeptCode));
   if (DepartmentUtil.departIsZxs(departTemp)) map.put("iszxs", "1");
   Integer deptlevel = 2;
   if (!DepartmentUtil.departIsZxs(departTemp)) {
     if ("1".equals(setQyyyrztj.getGxdwbz())) {
       deptlevel = 5;
     } else if ("1".equals(setQyyyrztj.getFxjbz())) {
       deptlevel = 4;
     } else if ("1".equals(setQyyyrztj.getDsjgbz())) {
       deptlevel = 3;
     }
   } else {
     if ("1".equals(setQyyyrztj.getGxdwbz())) {
       deptlevel = 4;
     } else if ("1".equals(setQyyyrztj.getFxjbz())) {
       deptlevel = 3;
     } else if ("1".equals(setQyyyrztj.getDsjgbz())) {
       deptlevel = 2;
     }
   }
   map.put("deptlevel", deptlevel);
   Page page = qyyyrztjService.getListForPagetj(map, pagesize, pagerow, sort, dir);
   totalpage = page.getTotalPages();
   totalrows = page.getTotalRows();
   lQyyyrztj = page.getData();
   int qyzs = 0;
   int sccss = 0;
   int wsccss = 0;
   int cyrys = 0;
   int sbrs = 0;
   int xzrys = 0;
   int lzrys = 0;
   Qyyyrztj sumQyyyrztj = new Qyyyrztj();
   for (java.util.Iterator iter = lQyyyrztj.iterator(); iter.hasNext(); ) {
     Qyyyrztj oneQyyyrztj = (Qyyyrztj) iter.next();
     qyzs += oneQyyyrztj.getQyzs().intValue();
     sccss += oneQyyyrztj.getSccss().intValue();
     wsccss += oneQyyyrztj.getWsccss().intValue();
     cyrys += oneQyyyrztj.getCyrys().intValue();
     sbrs += oneQyyyrztj.getSbrs().intValue();
     xzrys += oneQyyyrztj.getXzrys().intValue();
     lzrys += oneQyyyrztj.getLzrys().intValue();
     if (oneQyyyrztj.getGxdwdm() != null && !oneQyyyrztj.getGxdwdm().equals("")) {
       oneQyyyrztj.setMxlj(
           "<a href='#' class='fontbutton' title='详细' onclick=setXxQuery('"
               + oneQyyyrztj.getGxdwdm()
               + "')>详细</a>");
     } else if (oneQyyyrztj.getFxjdm() != null && !oneQyyyrztj.getFxjdm().equals("")) {
       oneQyyyrztj.setMxlj(
           "<a href='#' class='fontbutton' title='详细' onclick=setXxQuery('"
               + oneQyyyrztj.getFxjdm()
               + "')>详细</a>");
     } else if (oneQyyyrztj.getDsjgdm() != null && !oneQyyyrztj.getDsjgdm().equals("")) {
       oneQyyyrztj.setMxlj(
           "<a href='#' class='fontbutton' title='详细' onclick=setXxQuery('"
               + oneQyyyrztj.getDsjgdm()
               + "')>详细</a>");
     }
   }
   sumQyyyrztj.setQyzs(qyzs);
   sumQyyyrztj.setSccss(sccss);
   sumQyyyrztj.setWsccss(wsccss);
   sumQyyyrztj.setCyrys(cyrys);
   sumQyyyrztj.setSbrs(sbrs);
   sumQyyyrztj.setXzrys(xzrys);
   sumQyyyrztj.setLzrys(lzrys);
   // sumQyyyrztj.setMxlj("");
   sumQyyyrztj.setDsjgmc("总计");
   if ("1".equals(setQyyyrztj.getDsjgbz())) {
     lQyyyrztj.add(sumQyyyrztj);
   }
   this.result = "success";
   return "success";
 }
Exemple #6
0
  public String queryForExport() {
    ActionContext ctx = ActionContext.getContext();
    HttpServletRequest request = (HttpServletRequest) ctx.get(ServletActionContext.HTTP_REQUEST);
    HttpSession session = request.getSession();
    session.removeAttribute("gzdxExportResult");
    // User user= (User)session.getAttribute(Constants.userKey);
    Globalpar glo = this.getCacheGlobalpar("exportmaxrows");
    String maxRows = glo.getGlobalparvalue();
    try {
      Gzdx setGzdx = new Gzdx();
      gzdx = (Gzdx) this.setClass(setGzdx, null);
      Map map = new HashMap();
      //			map.put("xm", gzdx.getXm());
      //			map.put("xb", gzdx.getXb());
      //			map.put("zjhm", gzdx.getZjhm());
      //			map.put("csrq", gzdx.getCsrq());
      //			map.put("csrq2", gzdx.getCsrq2());
      //			map.put("mzdm", gzdx.getMzdm());
      //			map.put("hjdxzqhdm", gzdx.getHjdxzqhdm());
      //			//如果选择了姓名拼音的同音查询,则需要得到姓名的拼音
      //			if("1".equals(gzdx.getTyCheck())){
      //				map.put("xmpy", PinYinUtil.getHanyuPingYin(gzdx.getXm()));
      //				map.put("xm", "");
      //			}
      map.put("xm", gzdx.getXm());
      map.put("xb", gzdx.getXb());
      map.put("zjhm", gzdx.getZjhm());
      map.put("csrq", gzdx.getCsrq());
      map.put("csrq2", gzdx.getCsrq2());
      map.put("mzdm", gzdx.getMzdm());
      map.put("hjdxzqhdm", gzdx.getHjdxzqhdm());
      map.put("hylbdm", gzdx.getHylbdm());
      User user = (User) this.getRequest().getSession().getAttribute(Constants.userKey);
      if (user != null) {
        String dqdwbm = user.getDepartment().getDepartcode();
        int level = user.getDepartment().getDepartlevel().intValue();
        if (level >= 3) map.put("tbdabm", StringUtil.trimEven0(dqdwbm) + "%");
        map.put("dqdwbm", dqdwbm);
      }

      // 如果查询菜单是注销管理,则应该要加一个默认条件为未注销
      if ("cancel".equals(gzdx.getFlag())) {
        map.put("zxbz", "0");
      }
      // 如果选择了姓名拼音的同音查询,则需要得到姓名的拼音
      if ("1".equals(gzdx.getTyCheck())) {
        map.put("xmpy", PinYinUtil.getHanyuPingYin(gzdx.getXm()));
        map.put("xm", "");
      }
      map.put("endRow", maxRows);
      // Excel输出
      lGzdx = gzdxService.getListExportGzdx(map, sort, dir);
      // ///cache 替换
      List lPro = new ArrayList();
      lPro.add("xm");
      lPro.add("zjhm");
      lPro.add("xb");
      lPro.add("csrq");
      lPro.add("minzu");
      lPro.add("whcd");
      lPro.add("hjdxzqh");
      lPro.add("hjdxz");
      List lcache = new ArrayList();
      /*List lcache_mz = this.getDictItemCacheList("minzu", "dm_mz", "0"); //民族替换  "0"为不加列  "1"替换列
      lcache.add(lcache_mz);
      List lcache_xb = this.getDictItemCacheList("xingbie", "dm_xb", "0"); // 性别  "0"为不加列  "1"替换列
      lcache.add(lcache_xb);*/
      Gzdx getGzdx = new Gzdx();
      lGzdx = this.getResultCache(getGzdx.getClass().getName(), lPro, lGzdx, lcache);
      session.setAttribute("gzdxExportResult", lGzdx);
      this.result = "success";
    } catch (IOException e) {
      e.printStackTrace();
      this.result = e.getMessage();
    } catch (Exception e) {
      e.printStackTrace();
      this.result = e.getMessage();
    }
    return "success";
  }