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>");
      }
    }
  }
Exemple #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";
 }