judge.java

来自「一套完整的档案管理系统」· Java 代码 · 共 78 行

JAVA
78
字号
package com.stsc.archive.jygl;


import java.io.IOException;
import java.util.Hashtable;
import java.util.Locale;
import java.util.Properties;
import java.util.Date;
import java.text.SimpleDateFormat;
import com.stsc.util.STPoolDataSet;
import com.stsc.util.STResultSet;
import org.apache.struts.upload.FormFile;
import org.apache.struts.upload.MultipartRequestHandler;

public class Judge {
 
	
	

	String serialno ="";
    int    tmp      =0;  
    String temp     =""; 


	public int getloanable(String serialno){
	    Properties dbBase = new Properties();
		dbBase.setProperty("dsJndiName",Constants.DATABASE_KEY);
		STPoolDataSet data = new STPoolDataSet();
		STResultSet rs;
//由于在fArchive中的流水号变为FlowNo使用以下sql,若改回来则用以上sql
		String  sql="select * from fLoanable where SerialNo=(select FlowNo  from Farchive where SerialNo= "+Integer.parseInt(serialno)+")"; 
		rs  =data.getSTResult(sql,dbBase);
		while (rs!=null&&rs.next())
		{
				tmp = rs.getInt("LoanableNum");
		}	
        return  tmp;
	}
  
   	public int getloanable_edit(String lendfileid){
	    Properties dbBase = new Properties();
		dbBase.setProperty("dsJndiName",Constants.DATABASE_KEY);
		STPoolDataSet data = new STPoolDataSet();
		STResultSet rs;
		String  sql="select * from fLoanable where SerialNo=(select SerialNo from fLendFile where lendfileid="+ (Integer.parseInt(lendfileid))+ ")";
		System.out.println("######## sql======"+sql); 
		rs  =data.getSTResult(sql,dbBase);
		while (rs!=null&&rs.next())
		{
				tmp = rs.getInt("LoanableNum");
		}	
        return  tmp;
	}
 
	
	public String  getfilepath(String serialno){
			Properties dbBase = new Properties();
			dbBase.setProperty("dsJndiName",Constants.DATABASE_KEY);
			STPoolDataSet data = new STPoolDataSet();
			STResultSet rs;
//			String  sql="select * from  fArchive where SerialNo="+Integer.parseInt(serialno)+ ""; 
//由于在fArchive中的流水号变为FlowNo使用以下sql,若改回来则用以上sql
			String  sql="select * from  fArchive where FlowNo='"+serialno+ "'"; 
			rs  =data.getSTResult(sql,dbBase);
			while (rs!=null&&rs.next())
			{
					temp = rs.getString("AttachmentPath");
			}	
	    	temp=temp.replace('\\', '/');
			//System.out.println("############### temp"+temp);
			return  temp;
		}





}

⌨️ 快捷键说明

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