publicstaticfinalStringSELECT_TF_DOWNLOAD_NOTIFY_BLACK="SELECT ID,SYSTEMID,TABLENAME,BATCHNO,VERSION,PROTOCOL_TYPE,CREATETIME,RECORDNUM,UPDATEFLAG,UPDATETIME,DOMAIN1,DOMAIN2,DOMAIN3,DOMAIN4 FROM TF_DOWNLOAD_NOTIFY_CS where createtime>=to_date('20240624','yyyyMMdd') and protocol_type in(101,102,103,104,105,106,107,108,111,801,802,808,809,919,920) and updateflag=0 and length(domain1)>18 and substr(domain1,0,3)='ftp'";
publicstaticfinalStringSELECT_TF_DOWNLOAD_NOTIFY_INSERT_DB="SELECT ID,SYSTEMID,TABLENAME,BATCHNO,VERSION,PROTOCOL_TYPE,CREATETIME,RECORDNUM,UPDATEFLAG,UPDATETIME,DOMAIN1,DOMAIN2,DOMAIN3,DOMAIN4 FROM TF_DOWNLOAD_NOTIFY_CS where createtime>=to_date('20240705','yyyyMMdd') and protocol_type in(237,240,241,242,243,244,245,246,302,304,306,501,502,503,604,605,804,803,901,902,903,904,905,917,918,922,923,924,925) and updateflag=0 and length(domain1)>18 and substr(domain1,0,3)='ftp'";
publicstaticfinalStringSELECT_TF_DOWNLOAD_NOTIFY_INSERT_DB="SELECT ID,SYSTEMID,TABLENAME,BATCHNO,VERSION,PROTOCOL_TYPE,CREATETIME,RECORDNUM,UPDATEFLAG,UPDATETIME,DOMAIN1,DOMAIN2,DOMAIN3,DOMAIN4 FROM TF_DOWNLOAD_NOTIFY_CS where createtime>=to_date('20240705','yyyyMMdd') and protocol_type in(237,240,243,244,245,246,302,304,306,501,502,503,604,605,804,803,901,902,903,904,905,917,918,922,923,924,925) and updateflag=0 and length(domain1)>18 and substr(domain1,0,3)='ftp'";
publicstaticfinalStringSELECT_TF_DOWNLOAD_NOTIFY_INSERT_DB_241="SELECT ID,SYSTEMID,TABLENAME,BATCHNO,VERSION,PROTOCOL_TYPE,CREATETIME,RECORDNUM,UPDATEFLAG,UPDATETIME,DOMAIN1,DOMAIN2,DOMAIN3,DOMAIN4 FROM TF_DOWNLOAD_NOTIFY_CS where createtime>=to_date('20240705','yyyyMMdd') and protocol_type in(241) and updateflag=0 and length(domain1)>18 and substr(domain1,0,3)='ftp'";
publicstaticfinalStringSELECT_TF_DOWNLOAD_NOTIFY_INSERT_DB_242="SELECT ID,SYSTEMID,TABLENAME,BATCHNO,VERSION,PROTOCOL_TYPE,CREATETIME,RECORDNUM,UPDATEFLAG,UPDATETIME,DOMAIN1,DOMAIN2,DOMAIN3,DOMAIN4 FROM TF_DOWNLOAD_NOTIFY_CS where createtime>=to_date('20240705','yyyyMMdd') and protocol_type in(242) and updateflag=0 and length(domain1)>18 and substr(domain1,0,3)='ftp'";
//public static final String SELECT_TF_DOWNLOAD_NOTIFY_INSERT_DB = "SELECT ID,SYSTEMID,TABLENAME,BATCHNO,VERSION,PROTOCOL_TYPE,CREATETIME,RECORDNUM,UPDATEFLAG,UPDATETIME,DOMAIN1,DOMAIN2,DOMAIN3,DOMAIN4 FROM TF_DOWNLOAD_NOTIFY_CS where createtime>=to_date('2024-06-12 00:00:00','yyyy-mm-dd hh24:mi:ss') and createtime<=to_date('2024-06-20 00:00:00','yyyy-mm-dd hh24:mi:ss') and protocol_type in(901,902,903,904,905,917,918,922,923,924,925)and updateflag=1 and length(domain1)>18 and substr(domain1,0,3)='ftp'";
//public static final String SELECT_TF_DOWNLOAD_NOTIFY_INSERT_DB = "SELECT ID,SYSTEMID,TABLENAME,BATCHNO,VERSION,PROTOCOL_TYPE,CREATETIME,RECORDNUM,UPDATEFLAG,UPDATETIME,DOMAIN1,DOMAIN2,DOMAIN3,DOMAIN4 FROM TF_DOWNLOAD_NOTIFY_CS where createtime>=to_date('2024-07-05 00:00:00','yyyy-mm-dd hh24:mi:ss') and createtime<to_date('2024-07-06 00:00:00','yyyy-mm-dd hh24:mi:ss') and protocol_type in(242,243,244,245,246) and length(domain1)>18 and substr(domain1,0,3)='ftp'";
publicstaticfinalStringUPDATE_TF_DOWNLOAD_NOTIFY_HR="UPDATE TF_DOWNLOAD_NOTIFY_CS SET UPDATEFLAG = 1 WHERE ID =";
@ -203,7 +205,9 @@ public class Constant {
publicstaticfinalStringUPDATE_APP_ALIVE_STATUS_ALIVEID_2="UPDATE APP_ALIVE_STATUS SET ALIVEID = 2 WHERE APPID=1";
publicstaticfinalStringDEL_BUSINESS_OVERDUE="DELETE FROM business_tasks_info WHERE downloadTime BETWEEN '2023-01-01 00:00:00' AND datetime('now','localtime','-AAAAA day');";
publicstaticfinalStringSELECT_BUSINESS_HANDLER_HR_MIN_FEE="SELECT id,fileName,size,recordCount,downStatus,protocolType,downloadTime,consumTime,version,newVersion,proStatus,middleDatabase,handleStatus,handleTime,publishStatus,publishTime FROM business_tasks_info WHERE protocolType=250 AND middleDatabase = 1 AND handleStatus = 0 OR handleStatus = 2";
publicstaticfinalStringSELECT_BUSINESS_HANDLER_HR="SELECT id,fileName,size,recordCount,downStatus,protocolType,downloadTime,consumTime,version,newVersion,proStatus,middleDatabase,handleStatus,handleTime,publishStatus,publishTime FROM business_tasks_info WHERE protocolType not in (250) AND middleDatabase = 1 AND handleStatus = 0 OR handleStatus = 2";
publicstaticfinalStringSELECT_BUSINESS_HANDLER_HR="SELECT id,fileName,size,recordCount,downStatus,protocolType,downloadTime,consumTime,version,newVersion,proStatus,middleDatabase,handleStatus,handleTime,publishStatus,publishTime FROM business_tasks_info WHERE protocolType not in (250,241,242) AND middleDatabase = 1 AND handleStatus = 0 OR handleStatus = 2";
publicstaticfinalStringSELECT_BUSINESS_HANDLER_HR_241="SELECT id,fileName,size,recordCount,downStatus,protocolType,downloadTime,consumTime,version,newVersion,proStatus,middleDatabase,handleStatus,handleTime,publishStatus,publishTime FROM business_tasks_info WHERE protocolType in (241) AND middleDatabase = 1 AND handleStatus = 0 OR handleStatus = 2";
publicstaticfinalStringSELECT_BUSINESS_HANDLER_HR_242="SELECT id,fileName,size,recordCount,downStatus,protocolType,downloadTime,consumTime,version,newVersion,proStatus,middleDatabase,handleStatus,handleTime,publishStatus,publishTime FROM business_tasks_info WHERE protocolType in (242) AND middleDatabase = 1 AND handleStatus = 0 OR handleStatus = 2";
publicstaticfinalStringSELECT_BUSINESS_HANDLER_MD="SELECT id,fileName,size,recordCount,downStatus,protocolType,downloadTime,consumTime,version,newVersion,proStatus,middleDatabase,handleStatus,handleTime,publishStatus,publishTime FROM business_tasks_info WHERE middleDatabase = 2 AND handleStatus = 0 OR handleStatus = 2";
publicstaticfinalStringSELECT_BUSINESS_BY_ID="SELECT id,fileName,size,recordCount,downStatus,protocolType,downloadTime,consumTime,version,newVersion,proStatus,middleDatabase,handleStatus,handleTime,publishStatus,publishTime FROM business_tasks_info WHERE id =";
publicstaticfinalStringSELECT_BUSINESS_COUNT="SELECT COUNT(*) FROM business_tasks_info WHERE protocolType in(102,104,802,36)";