充放电一体机FGCD通信程序【二期初版】
11
whyclxw
2021-09-02 5c3e9ca324155efb5461ee48ad591a1070d6ae5e
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();
       }   
   }