⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 senddoclogmanager.java

📁 OA典型例子
💻 JAVA
字号:
package com.sure.oa.senddoc;

import com.sure.businessmodel.Page;
import com.sure.businessmodel.UpdateException;
import com.sure.businesslogic.AlreadyExistsException;
import com.sure.businesslogic.NotFoundException;
import com.sure.dataabstraction.DBManager;
import com.sure.dataabstraction.DBPoolException;
import com.sure.oa.orgnization.*;

import java.sql.SQLException;
import java.sql.Connection;
import java.util.Vector;
import java.util.List;
import java.util.Iterator;

/**
 * <p>Title: OA</p>
 * <p>Description: 国办项目</p>
 * <p>Copyright: Copyright (c) 2004</p>
 * <p>Company: sure</p>
 * @author mengzy
 * @version 1.0
 * OrperateId编号:0:登记 1:修改 2:登记完毕 3:盖章(加密)  4:发送  5:重发 6:签收  7:退回 10:发文方归档
 */

public class SendDocLogManager {

  public SendDocLogManager() {
  }

  /**
   * 获得某一个文件的发送日志
   * 返回:日志向量表
   */
  public static  Vector getDocSendLog(String docId) throws SQLException,NotFoundException,DBPoolException {
    Connection cn = DBManager.getConnection();
     try{
         String where = "where docId=" + docId + " and operateId in (4,5)";
         Vector v = SendDocLogPersistent.load(cn,where);
        return  v;
     }finally {
         cn.close();
     }
  }

  /**
   * 获得某一个文件的重发日志
   * 返回:日志向量表
   */
  public static  Vector getDocReSendLog(String docId) throws SQLException,NotFoundException,DBPoolException {
    Connection cn = DBManager.getConnection();
     try{
         String where = "where docId=" + docId + " and operateId in (5)";
         Vector v = SendDocLogPersistent.load(cn,where);
        return  v;
     }finally {
         cn.close();
     }
  }

  /**
    * 获得某一个文件的签收日志
    * 返回:日志向量表
    */
   public static  Vector getDocQianShouLog(String docId) throws SQLException,NotFoundException,DBPoolException {
     Connection cn = DBManager.getConnection();
      try{
          String where = "where docId=" + docId + " and operateId in (6)";
          Vector v = SendDocLogPersistent.load(cn,where);
          return  v;
      }finally {
          cn.close();
      }
   }

   /**
    * 获得某一个文件的退回日志
    * 返回:日志向量表
    */
   public static  Vector getDocBackLog(String docId) throws SQLException,NotFoundException,DBPoolException {
     Connection cn = DBManager.getConnection();
      try{
          String where = "where docId=" + docId + " and operateId in (7)";
          Vector v = SendDocLogPersistent.load(cn,where);
          return  v;
      }finally {
          cn.close();
      }
   }


  /**
   * 获得某一个单位的用印记录
   * 返回:Page表
   */
  public static  Page getSealUseList(int start,String unitId,String orderBy,String cxtj) throws SQLException,DBPoolException {
    Connection cn = DBManager.getConnection();
     try{
         String where = "where  unitId="+unitId+cxtj+" and operateId=3 and len(memo)>0 order by "+orderBy+" desc";
         Page p = SendDocLogPersistent.load(cn, start, 10, where);
         return  p;
     }finally {
         cn.close();
     }
  }

  /**
  * 获得某一个文件被收文方回填的收文日志
  * 返回:日志向量表
  */
 public static  Vector getRecvLogReWrite(String docId,String unitId,String sendlogId) throws SQLException,NotFoundException,DBPoolException {
   Connection cn = DBManager.getConnection();
    try{
        String where = "where docId=" + docId + " and unitId="+unitId+" and sendlogId="+sendlogId+"";
        Vector v = SendDocLogPersistent.load(cn,where);
        return  v;
    }finally {
        cn.close();
    }
 }

 /**
 * 获得某一个文件被收文方回填的收文日志(签收或退文)
 * unitId(收文单位ID)
 * 返回:日志向量表
 */
 public static  Vector getRecvLog(String docId,String unitId,String operateId,String sendlogId) throws SQLException,NotFoundException,DBPoolException {
   Connection cn = DBManager.getConnection();
    try{
        String where = "where docId=" + docId + " and unitId="+unitId+" and operateId="+operateId+" and sendlogId="+sendlogId+"";
        Vector v = SendDocLogPersistent.load(cn,where);
        return  v;
    }finally {
        cn.close();
    }
 }

//返回被退回文件数目
 public static int  getUnreceiveNumber(int unitId) throws SQLException, NotFoundException,DBPoolException {
   Connection cn = DBManager.getConnection();
   int retValue =0;
   try{
       String where = "where docId in(select docId from senddocform where createUnitid=" + unitId + " and status in(3,4) ) and operateId=7";
       Vector v = SendDocLogPersistent.load(cn,where);
       retValue=v.size();
       return retValue;
  }finally {
        cn.close();
  }
}


}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -