@ -114,14 +114,15 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
String domain1 = downloadNotify . getDOMAIN1 ( ) ;
String md5 = downloadNotify . getDOMAIN2 ( ) . trim ( ) ;
//先查询sqlite库中是否存在已下载的文件
String sql = Constant . SELECT_BUSINESS_BY_ID + id ;
List < BusinessTasks > businessTasks = DatabaseUtil . selectBusines ( sqliteDriverName , sqliteUrl , sql ) ;
//String sql = Constant.SELECT_BUSINESS_BY_ID + id;
//List<BusinessTasks> businessTasks = DatabaseUtil.selectBusines(sqliteDriverName, sqliteUrl, sql);
//构建Ftp下载文件
String ftpUrl = Constant . FTP_PREFIX + HRFtpIP + Constant . STR_COLON + HRPort + Constant . STR_SLASH ;
String fileName = domain1 . substring ( domain1 . lastIndexOf ( "/" ) + 1 ) ;
String ftpFilePath = domain1 . replace ( ftpUrl , Constant . NULL_STRING ) . replace ( fileName , Constant . NULL_STRING ) ;
if ( businessTasks . size ( ) = = 0 | | ! FileUtil . fileExists ( localPath + fileName ) ) {
//if (businessTasks.size() == 0 || !FileUtil.fileExists(localPath + fileName)) {
//if (!FileUtil.fileExists(localPath + fileName)) {
//log.info("[uuid:{}]开始下载华软中介服务上的任务数据,protocolType为{}", uuid, protocolType);
LogUtil . WriteLog_HRZipDownloadFile ( "[uuid:" + uuid + "]-开始下载华软中介服务上的任务数据,protocolType为" + protocolType , "FtpDownloadServiceImpl" ) ;
boolean isDownload = false ;
@ -181,21 +182,21 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
//增加部中心zip处理时间 yyyy-MM-dd HH:mm:ss
bt . setCreateTime ( downloadNotify . getCREATETIME ( ) ) ;
String sqliteInsert = StringUtil . sqliteInsert ( bt ) ;
if ( businessTasks . size ( ) = = 0 ) {
//if (businessTasks.size() == 0) {
DatabaseUtil . insertSqlite ( sqliteDriverName , sqliteUrl , sqliteInsert ) ;
//log.info("[uuid:{}]插入sqlite数据库business_tasks_info表中任务数据,id为{}, protocolType为{}", uuid, id, protocolType);
LogUtil . WriteLog_HRZipDownloadFile ( "[uuid:" + uuid + "]-插入sqlite数据库business_tasks_info表中任务数据,id为" + id + "protocolType为" + protocolType ,
"FtpDownloadServiceImpl" ) ;
}
//}
}
}
} else {
//log.info("[uuid:{}]sqlite数据库中已存在下载的记录同时下载路径下存在该文件{},跳过下载执行后面的处理程序,id为{}", uuid, fileName, id);
LogUtil . WriteLog_HRZipDownloadFile ( "[uuid:" + uuid + "]-sqlite数据库中已存在下载的记录同时下载路径下存在该文件" + fileName + "跳过下载执行后面的处理程序,id为" + id ,
"FtpDownloadServiceImpl" ) ;
}
//} else {
// //log.info("[uuid:{}]sqlite数据库中已存在下载的记录同时下载路径下存在该文件{},跳过下载执行后面的处理程序,id为{}", uuid, fileName, id);
// LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-sqlite数据库中已存在下载的记录同时下载路径下存在该文件" + fileName + "跳过下载执行后面的处理程序,id为" + id,
// "FtpDownloadServiceImpl");
//}
}
@ -239,9 +240,9 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
//FileUtil.delFile(new File(localPath+fileName));
//先查询sqlite库中是否存在已下载的文件
String sql = Constant . SELECT_BUSINESS_BY_ID + paramId + version ;
List < BusinessTasks > businessTasks = DatabaseUtil . selectBusines ( sqliteDriverName , sqliteUrl , sql ) ;
if ( businessTasks . size ( ) = = 0 ) {
//String sql = Constant.SELECT_BUSINESS_BY_ID + paramId + version;
//List<BusinessTasks> businessTasks = DatabaseUtil.selectBusines(sqliteDriverName, sqliteUrl, sql);
//if (!FileUtil.fileExists(localPath + fileName)) {
long start = System . currentTimeMillis ( ) ;
boolean isDownload = false ;
try {
@ -297,20 +298,20 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
bt . setCreateTime ( paramNotify . getCREATE_TIME ( ) ) ;
String sqliteInsert = StringUtil . sqliteInsert ( bt ) ;
if ( businessTasks . size ( ) = = 0 ) {
//if (businessTasks.size() == 0) {
DatabaseUtil . insertSqlite ( sqliteDriverName , sqliteUrl , sqliteInsert ) ;
//log.info("[uuid:{}]插入sqlite数据库business_tasks_info表中任务数据,id为{}, protocolType为{}", uuid, paramId + version, paramId);
LogUtil . WriteLog_MDBlackCard ( "[uuid:" + uuid + "]-插入sqlite数据库business_tasks_info表中任务数据,id为" + paramId + version + "protocolType为" + paramId ,
"FtpDownloadServiceImpl-getMdMdTask" ) ;
//}
}
}
}
} else {
//log.info("[uuid:{}]sqlite数据库中已存在下载的记录,无需下载,跳过下载执行后面的处理程序,id为{}", uuid, paramId);
LogUtil . WriteLog_MDBlackCard ( "[uuid:" + uuid + "]-sqlite数据库中已存在下载的记录同时下载路径下存在该文件" + fileName + "跳过下载执行后面的处理程序,id为" + paramId ,
"FtpDownloadServiceImpl-getMdMdTask" ) ;
}
//} else {
// //log.info("[uuid:{}]sqlite数据库中已存在下载的记录,无需下载,跳过下载执行后面的处理程序,id为{}", uuid, paramId);
// LogUtil.WriteLog_MDBlackCard("[uuid:" + uuid + "]-sqlite数据库中已存在下载的记录同时下载路径下存在该文件" + fileName + "跳过下载执行后面的处理程序,id为" + paramId,
// "FtpDownloadServiceImpl-getMdMdTask");
//}
}
}
@ -350,14 +351,15 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
String domain1 = downloadNotify . getDOMAIN1 ( ) ;
String md5 = downloadNotify . getDOMAIN2 ( ) . trim ( ) ;
//先查询sqlite库中是否存在已下载的文件
String sql = Constant . SELECT_BUSINESS_BY_ID + id ;
List < BusinessTasks > businessTasks = DatabaseUtil . selectBusines ( sqliteDriverName , sqliteUrl , sql ) ;
//String sql = Constant.SELECT_BUSINESS_BY_ID + id;
//List<BusinessTasks> businessTasks = DatabaseUtil.selectBusines(sqliteDriverName, sqliteUrl, sql);
//构建Ftp下载文件
String ftpUrl = Constant . FTP_PREFIX + HRFtpIP + Constant . STR_COLON + HRPort + Constant . STR_SLASH ;
String fileName = domain1 . substring ( domain1 . lastIndexOf ( "/" ) + 1 ) ;
String ftpFilePath = domain1 . replace ( ftpUrl , Constant . NULL_STRING ) . replace ( fileName , Constant . NULL_STRING ) ;
if ( businessTasks . size ( ) = = 0 | | ! FileUtil . fileExists ( localPath + fileName ) ) {
//if (businessTasks.size() == 0 || !FileUtil.fileExists(localPath + fileName)) {
//if (!FileUtil.fileExists(localPath + fileName)) {
//log.info("[uuid:{}]开始下载华软中介服务上的任务数据,protocolType为{}", uuid, protocolType);
LogUtil . WriteLog_HRZipDownloadFile ( "[uuid:" + uuid + "]-开始下载华软中介服务上的任务数据,protocolType为" + protocolType , "FtpDownloadServiceImpl" ) ;
boolean isDownload = false ;
@ -417,21 +419,21 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
//增加部中心zip处理时间 yyyy-MM-dd HH:mm:ss
bt . setCreateTime ( downloadNotify . getCREATETIME ( ) ) ;
String sqliteInsert = StringUtil . sqliteInsert ( bt ) ;
if ( businessTasks . size ( ) = = 0 ) {
//if (businessTasks.size() == 0) {
DatabaseUtil . insertSqlite ( sqliteDriverName , sqliteUrl , sqliteInsert ) ;
//log.info("[uuid:{}]插入sqlite数据库business_tasks_info表中任务数据,id为{}, protocolType为{}", uuid, id, protocolType);
LogUtil . WriteLog_HRZipDownloadFile ( "[uuid:" + uuid + "]-插入sqlite数据库business_tasks_info表中任务数据,id为" + id + "protocolType为" + protocolType ,
"FtpDownloadServiceImpl" ) ;
}
//}
}
}
} else {
//log.info("[uuid:{}]sqlite数据库中已存在下载的记录同时下载路径下存在该文件{},跳过下载执行后面的处理程序,id为{}", uuid, fileName, id);
LogUtil . WriteLog_HRZipDownloadFile ( "[uuid:" + uuid + "]-sqlite数据库中已存在下载的记录同时下载路径下存在该文件" + fileName + "跳过下载执行后面的处理程序,id为" + id ,
"FtpDownloadServiceImpl" ) ;
}
//} else {
// //log.info("[uuid:{}]sqlite数据库中已存在下载的记录同时下载路径下存在该文件{},跳过下载执行后面的处理程序,id为{}", uuid, fileName, id);
// LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-sqlite数据库中已存在下载的记录同时下载路径下存在该文件" + fileName + "跳过下载执行后面的处理程序,id为" + id,
// "FtpDownloadServiceImpl");
//}
}
@ -473,14 +475,14 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
String domain1 = downloadNotify . getDOMAIN1 ( ) ;
String md5 = downloadNotify . getDOMAIN2 ( ) . trim ( ) ;
//先查询sqlite库中是否存在已下载的文件
String sql = Constant . SELECT_BUSINESS_BY_ID + id ;
List < BusinessTasks > businessTasks = DatabaseUtil . selectBusines ( sqliteDriverName , sqliteUrl , sql ) ;
//String sql = Constant.SELECT_BUSINESS_BY_ID + id;
//List<BusinessTasks> businessTasks = DatabaseUtil.selectBusines(sqliteDriverName, sqliteUrl, sql);
//构建Ftp下载文件
String ftpUrl = Constant . FTP_PREFIX + HRFtpIP + Constant . STR_COLON + HRPort + Constant . STR_SLASH ;
String fileName = domain1 . substring ( domain1 . lastIndexOf ( "/" ) + 1 ) ;
String ftpFilePath = domain1 . replace ( ftpUrl , Constant . NULL_STRING ) . replace ( fileName , Constant . NULL_STRING ) ;
if ( businessTasks . size ( ) = = 0 | | ! FileUtil . fileExists ( localPath + fileName ) ) {
//if (businessTasks.size() == 0 || !FileUtil.fileExists(localPath + fileName)) {
//log.info("[uuid:{}]开始下载华软中介服务上的任务数据,protocolType为{}", uuid, protocolType);
LogUtil . WriteLog_241HRZipDownloadFile ( "[uuid:" + uuid + "]-开始下载华软中介服务上的任务数据,protocolType为" + protocolType , "FtpDownloadServiceImpl" ) ;
boolean isDownload = false ;
@ -540,21 +542,21 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
//增加部中心zip处理时间 yyyy-MM-dd HH:mm:ss
bt . setCreateTime ( downloadNotify . getCREATETIME ( ) ) ;
String sqliteInsert = StringUtil . sqliteInsert ( bt ) ;
if ( businessTasks . size ( ) = = 0 ) {
//if (businessTasks.size() == 0) {
DatabaseUtil . insertSqlite ( sqliteDriverName , sqliteUrl , sqliteInsert ) ;
//log.info("[uuid:{}]插入sqlite数据库business_tasks_info表中任务数据,id为{}, protocolType为{}", uuid, id, protocolType);
LogUtil . WriteLog_241HRZipDownloadFile ( "[uuid:" + uuid + "]-插入sqlite数据库business_tasks_info表中任务数据,id为" + id + "protocolType为" + protocolType ,
"FtpDownloadServiceImpl" ) ;
}
//}
}
}
} else {
//log.info("[uuid:{}]sqlite数据库中已存在下载的记录同时下载路径下存在该文件{},跳过下载执行后面的处理程序,id为{}", uuid, fileName, id);
LogUtil . WriteLog_241HRZipDownloadFile ( "[uuid:" + uuid + "]-sqlite数据库中已存在下载的记录同时下载路径下存在该文件" + fileName + "跳过下载执行后面的处理程序,id为" + id ,
"FtpDownloadServiceImpl" ) ;
}
//} else {
// //log.info("[uuid:{}]sqlite数据库中已存在下载的记录同时下载路径下存在该文件{},跳过下载执行后面的处理程序,id为{}", uuid, fileName, id);
// LogUtil.WriteLog_241HRZipDownloadFile("[uuid:" + uuid + "]-sqlite数据库中已存在下载的记录同时下载路径下存在该文件" + fileName + "跳过下载执行后面的处理程序,id为" + id,
// "FtpDownloadServiceImpl");
//}
}
@ -587,14 +589,14 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
String domain1 = downloadNotify . getDOMAIN1 ( ) ;
String md5 = downloadNotify . getDOMAIN2 ( ) . trim ( ) ;
//先查询sqlite库中是否存在已下载的文件
String sql = Constant . SELECT_BUSINESS_BY_ID + id ;
List < BusinessTasks > businessTasks = DatabaseUtil . selectBusines ( sqliteDriverName , sqliteUrl , sql ) ;
//String sql = Constant.SELECT_BUSINESS_BY_ID + id;
//List<BusinessTasks> businessTasks = DatabaseUtil.selectBusines(sqliteDriverName, sqliteUrl, sql);
//构建Ftp下载文件
String ftpUrl = Constant . FTP_PREFIX + HRFtpIP + Constant . STR_COLON + HRPort + Constant . STR_SLASH ;
String fileName = domain1 . substring ( domain1 . lastIndexOf ( "/" ) + 1 ) ;
String ftpFilePath = domain1 . replace ( ftpUrl , Constant . NULL_STRING ) . replace ( fileName , Constant . NULL_STRING ) ;
if ( businessTasks . size ( ) = = 0 | | ! FileUtil . fileExists ( localPath + fileName ) ) {
//if (businessTasks.size() == 0 || !FileUtil.fileExists(localPath + fileName)) {
//log.info("[uuid:{}]开始下载华软中介服务上的任务数据,protocolType为{}", uuid, protocolType);
LogUtil . WriteLog_242HRZipDownloadFile ( "[uuid:" + uuid + "]-开始下载华软中介服务上的任务数据,protocolType为" + protocolType , "FtpDownloadServiceImpl" ) ;
boolean isDownload = false ;
@ -654,21 +656,21 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
//增加部中心zip处理时间 yyyy-MM-dd HH:mm:ss
bt . setCreateTime ( downloadNotify . getCREATETIME ( ) ) ;
String sqliteInsert = StringUtil . sqliteInsert ( bt ) ;
if ( businessTasks . size ( ) = = 0 ) {
//if (businessTasks.size() == 0) {
DatabaseUtil . insertSqlite ( sqliteDriverName , sqliteUrl , sqliteInsert ) ;
//log.info("[uuid:{}]插入sqlite数据库business_tasks_info表中任务数据,id为{}, protocolType为{}", uuid, id, protocolType);
LogUtil . WriteLog_242HRZipDownloadFile ( "[uuid:" + uuid + "]-插入sqlite数据库business_tasks_info表中任务数据,id为" + id + "protocolType为" + protocolType ,
"FtpDownloadServiceImpl" ) ;
}
//}
}
}
} else {
//log.info("[uuid:{}]sqlite数据库中已存在下载的记录同时下载路径下存在该文件{},跳过下载执行后面的处理程序,id为{}", uuid, fileName, id);
LogUtil . WriteLog_242HRZipDownloadFile ( "[uuid:" + uuid + "]-sqlite数据库中已存在下载的记录同时下载路径下存在该文件" + fileName + "跳过下载执行后面的处理程序,id为" + id ,
"FtpDownloadServiceImpl" ) ;
}
//} else {
// //log.info("[uuid:{}]sqlite数据库中已存在下载的记录同时下载路径下存在该文件{},跳过下载执行后面的处理程序,id为{}", uuid, fileName, id);
// LogUtil.WriteLog_242HRZipDownloadFile("[uuid:" + uuid + "]-sqlite数据库中已存在下载的记录同时下载路径下存在该文件" + fileName + "跳过下载执行后面的处理程序,id为" + id,
// "FtpDownloadServiceImpl");
//}
}
@ -701,14 +703,14 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
String domain1 = downloadNotify . getDOMAIN1 ( ) ;
String md5 = downloadNotify . getDOMAIN2 ( ) . trim ( ) ;
//先查询sqlite库中是否存在已下载的文件
String sql = Constant . SELECT_BUSINESS_BY_ID + id ;
List < BusinessTasks > businessTasks = DatabaseUtil . selectBusines ( sqliteDriverName , sqliteUrl , sql ) ;
//String sql = Constant.SELECT_BUSINESS_BY_ID + id;
//List<BusinessTasks> businessTasks = DatabaseUtil.selectBusines(sqliteDriverName, sqliteUrl, sql);
//构建Ftp下载文件
String ftpUrl = Constant . FTP_PREFIX + HRFtpIP + Constant . STR_COLON + HRPort + Constant . STR_SLASH ;
String fileName = domain1 . substring ( domain1 . lastIndexOf ( "/" ) + 1 ) ;
String ftpFilePath = domain1 . replace ( ftpUrl , Constant . NULL_STRING ) . replace ( fileName , Constant . NULL_STRING ) ;
if ( businessTasks . size ( ) = = 0 | | ! FileUtil . fileExists ( localPath + fileName ) ) {
//if (businessTasks.size() == 0 || !FileUtil.fileExists(localPath + fileName)) {
//log.info("[uuid:{}]开始下载华软中介服务上的任务数据,protocolType为{}", uuid, protocolType);
LogUtil . WriteLog_244HRZipDownloadFile ( "[uuid:" + uuid + "]-开始下载华软中介服务上的任务数据,protocolType为" + protocolType , "FtpDownloadServiceImpl" ) ;
boolean isDownload = false ;
@ -768,21 +770,21 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
//增加部中心zip处理时间 yyyy-MM-dd HH:mm:ss
bt . setCreateTime ( downloadNotify . getCREATETIME ( ) ) ;
String sqliteInsert = StringUtil . sqliteInsert ( bt ) ;
if ( businessTasks . size ( ) = = 0 ) {
//if (businessTasks.size() == 0) {
DatabaseUtil . insertSqlite ( sqliteDriverName , sqliteUrl , sqliteInsert ) ;
//log.info("[uuid:{}]插入sqlite数据库business_tasks_info表中任务数据,id为{}, protocolType为{}", uuid, id, protocolType);
LogUtil . WriteLog_244HRZipDownloadFile ( "[uuid:" + uuid + "]-插入sqlite数据库business_tasks_info表中任务数据,id为" + id + "protocolType为" + protocolType ,
"FtpDownloadServiceImpl" ) ;
}
//}
}
}
} else {
//log.info("[uuid:{}]sqlite数据库中已存在下载的记录同时下载路径下存在该文件{},跳过下载执行后面的处理程序,id为{}", uuid, fileName, id);
LogUtil . WriteLog_244HRZipDownloadFile ( "[uuid:" + uuid + "]-sqlite数据库中已存在下载的记录同时下载路径下存在该文件" + fileName + "跳过下载执行后面的处理程序,id为" + id ,
"FtpDownloadServiceImpl" ) ;
}
//} else {
// //log.info("[uuid:{}]sqlite数据库中已存在下载的记录同时下载路径下存在该文件{},跳过下载执行后面的处理程序,id为{}", uuid, fileName, id);
// LogUtil.WriteLog_244HRZipDownloadFile("[uuid:" + uuid + "]-sqlite数据库中已存在下载的记录同时下载路径下存在该文件" + fileName + "跳过下载执行后面的处理程序,id为" + id,
// "FtpDownloadServiceImpl");
//}
}