예제 #1
0
  public void revokeStop(Connection con, String reason) throws Exception {
    PreparedStatement pstmt = null;
    String qry = "";
    int updateCount = 0;
    qry = "update t_ym_book set group_stop_status = 1 where group_status = 2 and group_id = ? ";
    pstmt = con.prepareStatement(qry);
    pstmt.setString(1, this.getGroup_id());
    updateCount = pstmt.executeUpdate();
    pstmt.close();

    if (updateCount != 1) throw new Exception("审批中的记录不是一条," + this.getGroup_name());
    AppInfo.revoke(con, this.getGroup_id(), "ym_group_book", "撤回  原因:" + reason);
  }
예제 #2
0
  /**
   * 撤回
   *
   * @param con
   * @param con_id
   * @throws Exception
   */
  public void revoke(Connection con, String reason) throws Exception {
    PreparedStatement pstmt = null;
    String qry = "";
    int updateCount = 0;
    qry = "update t_ym_process_approval set status = 1 where status = 2 and approval_id = ? ";
    pstmt = con.prepareStatement(qry);
    pstmt.setString(1, this.getApproval_id());
    updateCount = pstmt.executeUpdate();
    pstmt.close();

    YmContract contract = YmContract.getYmContractByConId(con, this.getCon_id());
    if (updateCount != 1) throw new Exception("审批中的记录不是一条," + this.getApproval_id());
    AppInfo.revoke(con, this.getApproval_id(), "ym_process", "撤回  原因:" + reason);

    int msgWay = JMessageEnum.SYSTEM_MESSAGE;
    String toUserIds[] = new String[] {this.getApprover()};

    String subject =
        contract.getCstm_name() + "的" + this.getApproval_type_name() + "的审批被顾问撤回,撤回原因:" + reason;
    String url = "/ym/processControl.jsp?cmd=update&con_id=" + contract.getCon_id();
    JMessageAdapter.sendMessage(msgWay, toUserIds, subject, subject, "-1", url);
  }