充放电一体机FGCD通信程序【二期初版】
whyclxw
2021-09-02 1367c0f3e0388d1ac77e19653d857058eef1de52
BattMonitor_FGCD-A059NT/src/com/dev/fgcd/comm/FGCD_Task_Thread_SQL.java
@@ -291,9 +291,10 @@
   }
   //文件导入进度修改
   public static void updateFBOGressByOneSql(MysqlConnPool pool,int file_sum,int file_block,FGCD_TestFBOFile fbofile) {
   public static void updateFBOGressByOneSql(MysqlConnPool pool,int file_sum,int file_block,FGCD_TestFBOFile fbofile,int file_downloadNum) {
      //System.out.println("file_downloadNum:"+file_downloadNum);
      String sql_str = " update " + Sql_Mysql.Tb_Fgcd_Filedownload_Table +
                   " set now_data_block1="+file_block+",total_data_block1="+file_sum+" WHERE BattGroupId = " + fbofile.battgroupid+" and dev_id="+fbofile.dev_id;
                   " set now_data_block"+(file_downloadNum+1)+"="+file_block+",total_data_block"+(file_downloadNum+1)+"="+file_sum+" WHERE BattGroupId = " + fbofile.battgroupid+" and dev_id="+fbofile.dev_id;
      Sql_Mysql sql = new Sql_Mysql(pool);
      try {
         sql.sqlMysqlExecute(sql_str);
@@ -303,7 +304,19 @@
         sql.close_con();
      }
   }
   //文件导入状态
   public static void updateFBOStateByOneSql(MysqlConnPool pool,int download_flag,int download_state,FGCD_TestFBOFile fbofile,int file_downloadNum) {
      String sql_str = " update " + Sql_Mysql.Tb_Fgcd_Filedownload_Table +
                   " set download_flag"+(file_downloadNum+1)+"="+download_flag+",download_state"+(file_downloadNum+1)+"="+download_state+" WHERE BattGroupId = " + fbofile.battgroupid+" and dev_id="+fbofile.dev_id;
      Sql_Mysql sql = new Sql_Mysql(pool);
      try {
         sql.sqlMysqlExecute(sql_str);
      } catch (SQLException e) {
         e.printStackTrace();
      } finally {
         sql.close_con();
      }
   }
   public static void updateFBOFIleExportFlag(MysqlConnPool pool, FGCD_TestFBOFile fbofile) {
      String sql_str = " Update  " + Sql_Mysql.Tb_Fgcd_Filedownload_Table +
                   " Set ";