package com.dev.fgcd.comm;
|
|
import java.io.File;
|
import java.util.ArrayList;
|
import java.util.Date;
|
|
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.Logger;
|
|
import com.battmonitor.sql.MysqlConnPool;
|
import com.dev.fgcd.data.FGCD_TestFBOFile;
|
import com.dev.fgcd.data.FGCD_TestFBOFile.FBOFile;
|
import com.dev.fgcd.fbo.FboData;
|
import com.dev.fgcd.fbo.FboDataInf;
|
import com.sybase.jdbc3.a.b.g;
|
|
public class FGCD_Export_Thread_SQL implements Runnable{
|
public MysqlConnPool m_ConnPool = null;
|
public FBOFile nowFbo =null;
|
private Logger logger = null;
|
public int battgroupid=0;
|
public FGCD_TestFBOFile fbofile=null;
|
public int file_downloadNum=0;
|
|
|
public FGCD_Export_Thread_SQL(MysqlConnPool m_ConnPool, FBOFile nowFbo,int battgroupid,int file_downloadNum) {
|
super();
|
this.m_ConnPool = m_ConnPool;
|
this.nowFbo = nowFbo;
|
this.battgroupid=battgroupid;
|
//this.fbofile=fbofile;
|
this.file_downloadNum=file_downloadNum;
|
this.logger = LogManager.getLogger(this);
|
}
|
|
|
|
@Override
|
public void run() {
|
//System.out.println("Ï߳̿ªÆô"+new Date());
|
//file.setDownload_state(FGCD_TestDataDownLoad.DownLoadState_ExportData);
|
readFBOFileData(nowFbo,m_ConnPool);
|
}
|
/**
|
* ½âÎöFBOÎļþ
|
* @param file
|
* @param pool
|
*/
|
private void readFBOFileData(FBOFile nowFbo,MysqlConnPool pool) {
|
File file = new File(nowFbo.filename);
|
if(nowFbo.test_timelong > 0) {
|
FboData.checkFboFileByOneSql(m_ConnPool,file,battgroupid,file_downloadNum);
|
}
|
if(file.exists()) {
|
//ɾ³ýÏÂÔØµÄFBOÎļþ
|
file.delete();
|
}
|
}
|
|
|
}
|