| | |
| | | |
| | | public class FGCD_Export_Thread_SQL implements Runnable{ |
| | | public MysqlConnPool m_ConnPool = null; |
| | | public FBOFile file =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 file,FGCD_TestFBOFile fbofile,int file_downloadNum) { |
| | | public FGCD_Export_Thread_SQL(MysqlConnPool m_ConnPool, FBOFile nowFbo,FGCD_TestFBOFile fbofile,int file_downloadNum) { |
| | | super(); |
| | | this.m_ConnPool = m_ConnPool; |
| | | this.file = file; |
| | | this.nowFbo = nowFbo; |
| | | //this.battgroupid=battgroupid; |
| | | this.fbofile=fbofile; |
| | | this.file_downloadNum=file_downloadNum; |
| | |
| | | @Override |
| | | public void run() { |
| | | //System.out.println("线程开启"+new Date()); |
| | | file.setDownload_state(FGCD_TestDataDownLoad.DownLoadState_ExportSucc); |
| | | readFBOFileData(file,m_ConnPool); |
| | | |
| | | |
| | | //file.setDownload_state(FGCD_TestDataDownLoad.DownLoadState_ExportData); |
| | | readFBOFileData(nowFbo,m_ConnPool); |
| | | } |
| | | /** |
| | | * 解析FBO文件 |
| | | * @param file |
| | | * @param pool |
| | | */ |
| | | private void readFBOFileData(FBOFile file,MysqlConnPool pool) { |
| | | File f = new File(file.filename); |
| | | System.err.println(f.getName()+" "+f.length()); |
| | | if(file.test_timelong > 0) { |
| | | FboData.checkFboFileByOneSql(m_ConnPool,f,fbofile,file_downloadNum); |
| | | private void readFBOFileData(FBOFile nowFbo,MysqlConnPool pool) { |
| | | File file = new File(nowFbo.filename); |
| | | if(nowFbo.test_timelong > 0) { |
| | | FboData.checkFboFileByOneSql(m_ConnPool,file,fbofile,file_downloadNum); |
| | | } |
| | | if(f.exists()) { |
| | | if(file.exists()) { |
| | | //删除下载的FBO文件 |
| | | f.delete(); |
| | | file.delete(); |
| | | } |
| | | } |
| | | |