Exemple #1
0
  public void onClick$query() {
    isQuery = true;
    nameSearch = null;
    auditStateSearch = null;
    indicatorId = null;
    nameSearch = name.getValue();
    if (auditState.getSelectedItem().getValue().equals("")) {
      auditStateSearch = null;
    } else if (auditState.getSelectedItem().getValue().equals("待审核")) {
      auditStateSearch = 0;
    } else if (auditState.getSelectedItem().getValue().equals("部门通过")) {
      auditStateSearch = 1;
    } else if (auditState.getSelectedItem().getValue().equals("主部门审核中")) {
      auditStateSearch = 2;
    } else if (auditState.getSelectedItem().getValue().equals("部门不通过")) {
      auditStateSearch = 3;
    } else if (auditState.getSelectedItem().getValue().equals("业务办通过")) {
      auditStateSearch = 4;
    } else if (auditState.getSelectedItem().getValue().equals("业务办不通过")) {
      auditStateSearch = 5;
    } else if (auditState.getSelectedItem().getValue().equals("归档")) {
      auditStateSearch = 6;
    }
    if (rank.getSelectedIndex() != 0) {
      Jxkh_BusinessIndicator qkType = (Jxkh_BusinessIndicator) rank.getSelectedItem().getValue();
      indicatorId = qkType.getKbId();
    }

    zxPaging.addEventListener(
        "onPaging",
        new EventListener() {
          public void onEvent(Event arg0) throws Exception {
            meetingList =
                jxkhQklwService.findMeetingByConditionAndPages(
                    nameSearch,
                    auditStateSearch,
                    indicatorId,
                    user.getDept().getKdNumber(),
                    zxPaging.getActivePage(),
                    zxPaging.getPageSize());
            qklwListbox.setModel(new ListModelList(meetingList));
          }
        });
    int totalNum =
        jxkhQklwService.findMeetingByConditions(
            nameSearch, auditStateSearch, indicatorId, user.getDept().getKdNumber());
    zxPaging.setTotalSize(totalNum);
    meetingList =
        jxkhQklwService.findMeetingByConditionAndPages(
            nameSearch,
            auditStateSearch,
            indicatorId,
            user.getDept().getKdNumber(),
            zxPaging.getActivePage(),
            zxPaging.getPageSize());
    qklwListbox.setModel(new ListModelList(meetingList));
  }
Exemple #2
0
 public void initWindow() {
   zxPaging.addEventListener(
       "onPaging",
       new EventListener() {
         public void onEvent(Event arg0) throws Exception {
           meetingList =
               jxkhQklwService.findMeetingByKdNumberAndPages(
                   user.getDept().getKdNumber(), zxPaging.getActivePage(), zxPaging.getPageSize());
           qklwListbox.setModel(new ListModelList(meetingList));
         }
       });
   int totalNum = jxkhQklwService.findMeetingByKdNumbers(user.getDept().getKdNumber());
   zxPaging.setTotalSize(totalNum);
   meetingList =
       jxkhQklwService.findMeetingByKdNumberAndPages(
           user.getDept().getKdNumber(), zxPaging.getActivePage(), zxPaging.getPageSize());
   qklwListbox.setModel(new ListModelList(meetingList));
 }
Exemple #3
0
 // 导出
 public void onClick$exportExcel() {
   if (qklwListbox.getSelectedCount() == 0) {
     try {
       Messagebox.show("请选择要导出的数据", "提示", Messagebox.OK, Messagebox.EXCLAMATION);
     } catch (InterruptedException e) {
       e.printStackTrace();
     }
     return;
   } else {
     int i = 0;
     ArrayList<JXKH_QKLW> expertlist = new ArrayList<JXKH_QKLW>();
     @SuppressWarnings("unchecked")
     Set<Listitem> sel = qklwListbox.getSelectedItems();
     Iterator<Listitem> it = sel.iterator();
     while (it.hasNext()) {
       Listitem item = (Listitem) it.next();
       JXKH_QKLW p = (JXKH_QKLW) item.getValue();
       expertlist.add(i, p);
       i++;
     }
     Date now = new Date();
     String fileName = ConvertUtil.convertDateString(now) + "QiKanLunWenXinXi" + ".xls";
     String Title = "期刊论文";
     List<String> titlelist = new ArrayList<String>();
     titlelist.add("序号");
     titlelist.add("期刊论文名称");
     titlelist.add("全部作者");
     titlelist.add("院内部门");
     titlelist.add("合作单位");
     titlelist.add("期刊级别");
     // titlelist.add("收录类别");
     titlelist.add("论文级别");
     // titlelist.add("收录时间");
     titlelist.add("发表时间");
     titlelist.add("发表刊物名称");
     titlelist.add("发表刊物期次");
     titlelist.add("起止页");
     titlelist.add("通讯作者");
     titlelist.add("信息填写人");
     String c[][] = new String[expertlist.size()][titlelist.size()];
     // 从SQL中读数据
     for (int j = 0; j < expertlist.size(); j++) {
       JXKH_QKLW meeting = (JXKH_QKLW) expertlist.get(j);
       c[j][0] = j + 1 + "";
       c[j][1] = meeting.getLwName();
       // 全部作者
       String memberName = "";
       List<JXKH_QKLWMember> qklwMemberList = jxkhQklwService.findAwardMemberByAwardId(meeting);
       for (int t = 0; t < qklwMemberList.size(); t++) {
         JXKH_QKLWMember mem = (JXKH_QKLWMember) qklwMemberList.get(t);
         memberName += mem.getName() + "、";
       }
       if (memberName != "" && memberName != null)
         memberName = memberName.substring(0, memberName.length() - 1);
       c[j][2] = memberName;
       // 部门
       String d = "";
       List<JXKH_QKLWDept> meetDeptList = jxkhQklwService.findMeetingDeptByMeetingId(meeting);
       for (int k = 0; k < meetDeptList.size(); k++) {
         JXKH_QKLWDept dept = (JXKH_QKLWDept) meetDeptList.get(k);
         d += dept.getName() + "、";
       }
       if (d != "" && d != null) d = d.substring(0, d.length() - 1);
       c[j][3] = d;
       c[j][4] = meeting.getLwCoDep();
       if (meeting.getQkGrade() == null) {
         c[j][5] = "";
       } else {
         c[j][5] = meeting.getQkGrade().getKbName();
       }
       // if (meeting.getLwType() == null) {
       // c[j][6] = "";
       // } else {
       // c[j][6] = meeting.getLwType().getKbName();
       // }
       c[j][6] = meeting.getLwRank();
       // c[j][8] = meeting.getLwTime();
       c[j][7] = meeting.getLwDate();
       c[j][8] = meeting.getKwName();
       c[j][9] = meeting.getLwQC();
       c[j][10] = meeting.getLwPages();
       c[j][11] = meeting.getLwAuthor();
       c[j][12] = meeting.getLwWriter();
     }
     ExportExcel ee = new ExportExcel();
     try {
       ee.exportExcel(fileName, Title, titlelist, expertlist.size(), c);
     } catch (WriteException e) {
       e.printStackTrace();
     } catch (IOException e) {
       e.printStackTrace();
     }
   }
 }