From 5c3e9ca324155efb5461ee48ad591a1070d6ae5e Mon Sep 17 00:00:00 2001 From: whyclxw <http://whyclxw@118.89.139.230:10101/r/~whyclxw/IdeaTest.git> Date: 星期四, 02 九月 2021 17:43:16 +0800 Subject: [PATCH] 11 --- BattMonitor_FGCD-A059NT/src/com/dev/fgcd/comm/FGCD_Export_Thread_SQL.java | 25 +++++++++++-------------- 1 files changed, 11 insertions(+), 14 deletions(-) diff --git a/BattMonitor_FGCD-A059NT/src/com/dev/fgcd/comm/FGCD_Export_Thread_SQL.java b/BattMonitor_FGCD-A059NT/src/com/dev/fgcd/comm/FGCD_Export_Thread_SQL.java index 43845d2..0a74186 100644 --- a/BattMonitor_FGCD-A059NT/src/com/dev/fgcd/comm/FGCD_Export_Thread_SQL.java +++ b/BattMonitor_FGCD-A059NT/src/com/dev/fgcd/comm/FGCD_Export_Thread_SQL.java @@ -16,17 +16,17 @@ 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; @@ -38,25 +38,22 @@ @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(); } } -- Gitblit v1.9.1