Exemplo n.º 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>");
      }
    }
  }
Exemplo n.º 2
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";
 }