| | |
| | | }
|
| | |
|
| | | //文件导入进度修改
|
| | | public static void updateFBOGressByOneSql(MysqlConnPool pool,int file_sum,int file_block,FGCD_TestFBOFile fbofile,int file_downloadNum) {
|
| | | public static void updateFBOGressByOneSql(MysqlConnPool pool,int file_sum,int file_block,int battgroupid,int file_downloadNum) {
|
| | | //System.out.println("file_downloadNum:"+file_downloadNum);
|
| | | String sql_str = " update " + Sql_Mysql.Tb_Fgcd_Filedownload_Table +
|
| | | " 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;
|
| | | " set now_data_block"+(file_downloadNum+1)+"="+file_block+",total_data_block"+(file_downloadNum+1)+"="+file_sum+" WHERE BattGroupId = " + battgroupid;
|
| | | Sql_Mysql sql = new Sql_Mysql(pool);
|
| | | try {
|
| | | sql.sqlMysqlExecute(sql_str);
|
| | |
| | | sql.close_con();
|
| | | }
|
| | | }
|
| | | //文件导入状态
|
| | | public static void updateFBOStateByOneSql(MysqlConnPool pool,int download_flag,int download_state,FGCD_TestFBOFile fbofile,int file_downloadNum) {
|
| | | //文件导入状态 op_cmd="+FGCD_ComBase.CMD_DownLoadFBDFile_Over_ACK+",
|
| | | public static void updateFBOStateByOneSql(MysqlConnPool pool,int download_flag,int download_state,int battgroupid,int file_downloadNum) {
|
| | | String sql_str = " update " + Sql_Mysql.Tb_Fgcd_Filedownload_Table +
|
| | | " set op_cmd="+FGCD_ComBase.CMD_DownLoadFBDFile_Over_ACK+",download_flag"+(file_downloadNum+1)+"="+download_flag+",download_state"+(file_downloadNum+1)+"="+download_state+" WHERE BattGroupId = " + fbofile.battgroupid+" and dev_id="+fbofile.dev_id;
|
| | | " set download_flag"+(file_downloadNum+1)+"="+download_flag+",download_state"+(file_downloadNum+1)+"="+download_state+" WHERE BattGroupId = " + battgroupid;
|
| | | Sql_Mysql sql = new Sql_Mysql(pool);
|
| | | try {
|
| | | sql.sqlMysqlExecute(sql_str);
|
| | |
| | | * 更新当前下载状态,以及异常结束原因
|
| | | * @param pool
|
| | | * @param file
|
| | | * op_cmd = " + file.op_cmd + " ,
|
| | | */
|
| | | public static void updateFgcd_Filedownload_TableCmdByDevId(MysqlConnPool pool,FGCD_TestFBOFile file,int file_downloadNum) {
|
| | | String sql_str = " UPDATE " + Sql_Mysql.Tb_Fgcd_Filedownload_Table +
|
| | | " SET op_cmd = " + file.op_cmd +
|
| | | " ,stop_reason = " + file.getStop_reason() +
|
| | | " SET stop_reason = " + file.getStop_reason() +
|
| | | " ,download_flag"+(file_downloadNum+1)+" = " + file.files[file_downloadNum].download_flag +
|
| | | " ,download_state"+(file_downloadNum+1)+" = " + file.files[file_downloadNum].download_state +
|
| | | " WHERE dev_id = " + file.dev_id;
|