private void executeAudit(List beanList, int isGoonAudit, FuncButton button) {

    GkCommentDialog commentDialog =
        new GkCommentDialog(
            DefaultKeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow(),
            ModalityType.APPLICATION_MODAL);

    if (commentDialog.cancel) {

      return;
    }

    boolean success = true;

    String errorInfo = "";

    try {

      String comment = commentDialog.getComment();

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

        ZcEbEvalReport report = (ZcEbEvalReport) beanList.get(i);

        report.setIsGoonAudit(isGoonAudit);

        report.setComment(comment);

        report.setAuditorId(WorkEnv.getInstance().getCurrUserId());
      }

      requestMeta.setFuncId(button.getFuncId());

      zcEbEvalServiceDelegate.updateZcEbEvalStatus(beanList, requestMeta);

      zcEbEvalServiceDelegate.auditFN(beanList, requestMeta);

    } catch (Exception e) {

      success = false;

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

      errorInfo += e.getMessage();
    }

    if (success) {

      refreshCurrentTabData();

      JOptionPane.showMessageDialog(this, "审核成功!", "提示", JOptionPane.INFORMATION_MESSAGE);

    } else {

      JOptionPane.showMessageDialog(this, "审核失败 !" + errorInfo, "错误", JOptionPane.ERROR_MESSAGE);
    }
  }
  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();
    }
  }
  private void doCallBack() {

    String returnInfo = "";

    boolean success = true;

    try {

      List beanList = getCheckedList();

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

        JOptionPane.showMessageDialog(this, "没有选择数据!", " 提示", JOptionPane.INFORMATION_MESSAGE);

        return;
      }

      requestMeta.setFuncId(callbackButton.getFuncId());

      zcEbEvalServiceDelegate.callbackZcEbEvalReportFN(beanList, requestMeta);

    } catch (BusinessException be) {

      returnInfo = be.getMessage();

      success = false;

    } catch (Exception ex) {

      returnInfo = ex.getMessage();

      success = false;
    }

    if (success) {

      JOptionPane.showMessageDialog(this, "收回成功!", " 提示", JOptionPane.INFORMATION_MESSAGE);

      refreshCurrentTabData();

    } else {

      JOptionPane.showMessageDialog(this, "收回失败 !\n" + returnInfo, "错误", JOptionPane.ERROR_MESSAGE);
    }
  }
  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();
    }
  }
  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();
    }
  }
Example #6
0
/**