コード例 #1
0
  private void doSuggestPass() {

    List ZcEbEvalReportList = getCheckedList();

    if (ZcEbEvalReportList.size() == 0) {

      JOptionPane.showMessageDialog(this, "请选择需要送审的数据!", "提示", JOptionPane.INFORMATION_MESSAGE);

      return;
    }

    boolean success = true;

    try {

      GkCommentDialog commentDialog =
          new GkCommentDialog(this.getParentWindow(), ModalityType.APPLICATION_MODAL);

      if (commentDialog.cancel) {

        return;
      }

      String comment = commentDialog.getComment();

      for (int i = 0; i < ZcEbEvalReportList.size(); i++) {

        ZcEbEvalReport zcEbEvalReport = (ZcEbEvalReport) ZcEbEvalReportList.get(i);

        zcEbEvalReport.setComment(comment);

        if (WorkEnv.getInstance().containRole(AsOptionMeta.getOptVal("OPT_ZC_CGZX_FZR_ROLE"))) {

          zcEbEvalReport.setIsGoonAudit(0);
        }
      }

      requestMeta.setFuncId(this.suggestPassButton.getFuncId());

      zcEbEvalServiceDelegate.auditFN(ZcEbEvalReportList, requestMeta);

    } catch (BaseException ex) {

      success = false;

      UIUtilities.showStaickTraceDialog(ex, this, "错误", ex.getMessage());
    }

    if (success) {

      JOptionPane.showMessageDialog(this, "处理成功!", "提示", JOptionPane.INFORMATION_MESSAGE);

      refreshCurrentTabData();
    }
  }
コード例 #2
0
  private void doDelete() {

    if (getCheckedList().size() == 0) {

      JOptionPane.showMessageDialog(this, "请选择需要删除的数据!", "提示", JOptionPane.INFORMATION_MESSAGE);

      return;
    }

    int result =
        JOptionPane.showConfirmDialog(self, "是否要删除选中的数据?", "删除确认", JOptionPane.YES_NO_OPTION);

    if (result != JOptionPane.YES_OPTION) {

      return;
    }

    boolean success = true;

    try {

      zcEbEvalServiceDelegate.deleteZcEbEvalReportFN(getCheckedList(), requestMeta);

    } catch (BaseException ex) {

      success = false;

      UIUtilities.showStaickTraceDialog(ex, this, "错误", ex.getMessage());
    }

    if (success) {

      JOptionPane.showMessageDialog(this, "处理成功!", "提示", JOptionPane.INFORMATION_MESSAGE);

      refreshCurrentTabData();
    }
  }
コード例 #3
0
  public void doUnTread() {

    List ZcEbEvalReportList = getCheckedList();

    if (ZcEbEvalReportList.size() == 0) {

      JOptionPane.showMessageDialog(this, "请选择需要退回的数据!", "提示", JOptionPane.INFORMATION_MESSAGE);

      return;
    }

    boolean success = true;

    try {

      requestMeta.setFuncId(unTreadButton.getFuncId());

      GkCommentUntreadDialog commentDialog =
          new GkCommentUntreadDialog(this.getParentWindow(), ModalityType.APPLICATION_MODAL);

      if (commentDialog.cancel) {

        return;
      }

      String comment = commentDialog.getComment();

      for (int i = 0; i < ZcEbEvalReportList.size(); i++) {

        ZcEbEvalReport zcEbEvalReport = (ZcEbEvalReport) ZcEbEvalReportList.get(i);

        zcEbEvalReport.setComment(comment);
      }

      zcEbEvalServiceDelegate.untreadFN(ZcEbEvalReportList, requestMeta);

    } catch (BaseException ex) {

      success = false;

      logger.error(ex.getStackTraceMessage(), ex);

      success = false;

      UIUtilities.showStaickTraceDialog(ex, this, "错误", ex.getMessage());

    } catch (OtherException ex) {

      success = false;

      logger.error(ex.getStackTraceMessage(), ex);

      success = false;

      UIUtilities.showStaickTraceDialog(ex, this, "错误", ex.getMessage());

    } catch (Exception ex) {

      success = false;

      logger.error(ex.getMessage(), ex);

      UIUtilities.showStaickTraceDialog(ex, this, "错误", ex.getMessage());
    }

    if (success) {

      JOptionPane.showMessageDialog(this, "处理成功!", "提示", JOptionPane.INFORMATION_MESSAGE);

      refreshCurrentTabData();
    }
  }