将241,242分开线程单独处理入库

main
gaoshuguang 1 year ago
parent cf08c0944f
commit bcc60df313

@ -183,7 +183,9 @@ public class Constant {
//测试环境使用 begin
public static final String SELECT_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'";
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('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'";
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('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'";
public static final String SELECT_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'";
public static final String SELECT_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'";
public static final String UPDATE_TF_DOWNLOAD_NOTIFY_HR = "UPDATE TF_DOWNLOAD_NOTIFY_CS SET UPDATEFLAG = 1 WHERE ID =";
@ -203,7 +205,9 @@ public class Constant {
public static final String UPDATE_APP_ALIVE_STATUS_ALIVEID_2 = "UPDATE APP_ALIVE_STATUS SET ALIVEID = 2 WHERE APPID=1";
public static final String DEL_BUSINESS_OVERDUE = "DELETE FROM business_tasks_info WHERE downloadTime BETWEEN '2023-01-01 00:00:00' AND datetime('now','localtime','-AAAAA day');";
public static final String SELECT_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";
public static final String SELECT_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";
public static final String SELECT_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";
public static final String SELECT_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";
public static final String SELECT_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";
public static final String SELECT_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";
public static final String SELECT_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 =";
public static final String SELECT_BUSINESS_COUNT = "SELECT COUNT(*) FROM business_tasks_info WHERE protocolType in(102,104,802,36)";

@ -18,6 +18,54 @@ import java.util.concurrent.ThreadPoolExecutor;
@EnableScheduling // 开启定时任务
@EnableAsync //开启对异步定时任务的支持
public class TaskThreadPoolConfig {
@Bean("threadPoolIntoDatabase241") // bean的名称默认为首字母小写的方法名
public Executor threadPoolIntoDatabase241() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
//线程前缀名
executor.setThreadNamePrefix("timeTaskIntoDatabase241-thread-");
//最大线程数
executor.setMaxPoolSize(1);
//核心线程数
executor.setCorePoolSize(1);
//任务队列的大小
executor.setQueueCapacity(5);
//这种策略下,因为线程池已经无法接纳新的任务了,那么谁提交的这个任务,谁就去跑这个业务;
//
//比如,主线程向线程池提交了一个任务,线程池已经不能接纳这个任务了,那么此时就会让这个提交任务的主线程去执行这个任务;
//
//这种策略有两点好处1这种策略避免了业务损失2可以让任务提交的速度降低下来比如主线程提交的任务被打回来后主线程就必须执行完这个被打回来的任务后才能够向线程池提交下一个任务而这就相当于给了线程池一个缓冲的时间
//executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
//这种策略,会默默的把新来的这个任务给丢弃;我们不会得到通知;
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.DiscardPolicy());
//线程初始化
executor.initialize();
return executor;
}
@Bean("threadPoolIntoDatabase242") // bean的名称默认为首字母小写的方法名
public Executor threadPoolIntoDatabase242() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
//线程前缀名
executor.setThreadNamePrefix("timeTaskIntoDatabase242-thread-");
//最大线程数
executor.setMaxPoolSize(1);
//核心线程数
executor.setCorePoolSize(1);
//任务队列的大小
executor.setQueueCapacity(5);
//这种策略下,因为线程池已经无法接纳新的任务了,那么谁提交的这个任务,谁就去跑这个业务;
//
//比如,主线程向线程池提交了一个任务,线程池已经不能接纳这个任务了,那么此时就会让这个提交任务的主线程去执行这个任务;
//
//这种策略有两点好处1这种策略避免了业务损失2可以让任务提交的速度降低下来比如主线程提交的任务被打回来后主线程就必须执行完这个被打回来的任务后才能够向线程池提交下一个任务而这就相当于给了线程池一个缓冲的时间
//executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
//这种策略,会默默的把新来的这个任务给丢弃;我们不会得到通知;
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.DiscardPolicy());
//线程初始化
executor.initialize();
return executor;
}
@Bean("threadPoolIntoDatabase") // bean的名称默认为首字母小写的方法名
public Executor threadPoolIntoDatabase() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();

@ -154,6 +154,70 @@ public class TimeTaskInfo {
}
}
/**
* 241
*
* @author shuguang
* @date 2023-10-16 22:37
*/
@Async("threadPoolIntoDatabase241")
@Scheduled(cron = "${time.corn7}")
public void timeTaskIntoDatabase241() {
String uuid = UuidUtil.getUuid();
//insertDBLog.info("[uuid:{}]-根据配置时间定时下载入库文件,当前时间{}", uuid, LocalDateTime.now());
LogUtil.WriteLog_241InsertDB("[uuid:" + uuid + "]-根据配置时间定时将241入库文件入库操作,当前时间=" + LocalDateTime.now(), "TimeTaskInfo-timeTaskIntoDatabase241");
long start = System.currentTimeMillis();
boolean b=false;
//1-入库0-不入库
String isNotInsertDb = PropertiesUtil.getValue("isNotInsertDb");
if (Constant.STR_ONE.equals(isNotInsertDb)) {
b = intoDatabaseService.downAndInsert241(uuid);
}
long end = System.currentTimeMillis();
if (b) {
//insertDBLog.info("[uuid:{}]-根据配置时间定时下载入库文件执行完成,耗时毫秒:{}", uuid, (end - start));
LogUtil.WriteLog_241InsertDB("[uuid:" + uuid + "]-]根据配置时间定时将241入库文件入库执行完成,耗时毫秒=" + (end - start), "TimeTaskInfo-timeTaskIntoDatabase241");
} else {
//insertDBLog.info("[uuid:{}]-当前服务不执行定时下载入库文件,耗时毫秒:{}", uuid, (end - start));
LogUtil.WriteLog_241InsertDB("[uuid:" + uuid + "]-]当前服务不执行定时将241入库文件入库操作,耗时毫秒=" + (end - start), "TimeTaskInfo-timeTaskIntoDatabase241");
}
}
/**
* 241
*
* @author shuguang
* @date 2023-10-16 22:37
*/
@Async("threadPoolIntoDatabase242")
@Scheduled(cron = "${time.corn8}")
public void timeTaskIntoDatabase242() {
String uuid = UuidUtil.getUuid();
//insertDBLog.info("[uuid:{}]-根据配置时间定时下载入库文件,当前时间{}", uuid, LocalDateTime.now());
LogUtil.WriteLog_242InsertDB("[uuid:" + uuid + "]-根据配置时间定时将242入库文件入库操作,当前时间=" + LocalDateTime.now(), "TimeTaskInfo-timeTaskIntoDatabase242");
long start = System.currentTimeMillis();
boolean b=false;
//1-入库0-不入库
String isNotInsertDb = PropertiesUtil.getValue("isNotInsertDb");
if (Constant.STR_ONE.equals(isNotInsertDb)) {
b = intoDatabaseService.downAndInsert242(uuid);
}
long end = System.currentTimeMillis();
if (b) {
//insertDBLog.info("[uuid:{}]-根据配置时间定时下载入库文件执行完成,耗时毫秒:{}", uuid, (end - start));
LogUtil.WriteLog_242InsertDB("[uuid:" + uuid + "]-]根据配置时间定时将242入库文件入库执行完成,耗时毫秒=" + (end - start), "TimeTaskInfo-timeTaskIntoDatabase242");
} else {
//insertDBLog.info("[uuid:{}]-当前服务不执行定时下载入库文件,耗时毫秒:{}", uuid, (end - start));
LogUtil.WriteLog_242InsertDB("[uuid:" + uuid + "]-]当前服务不执行定时将242入库文件入库操作,耗时毫秒=" + (end - start), "TimeTaskInfo-timeTaskIntoDatabase242");
}
}
/**

@ -31,6 +31,16 @@ public class LogUtil {
String fileName = f.format(new Date()) + "_Error";
WriteLog(fileName, msg, disStr);
}
public static void WriteLog_242InsertDB(String msg, String disStr) {
SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd-HH");
String fileName = f.format(new Date()) + "_242InsertDB";
WriteLog(fileName, msg, disStr);
}
public static void WriteLog_241InsertDB(String msg, String disStr) {
SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd-HH");
String fileName = f.format(new Date()) + "_241InsertDB";
WriteLog(fileName, msg, disStr);
}
public static void WriteLog_InsertDB(String msg, String disStr) {
SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd-HH");
String fileName = f.format(new Date()) + "_InsertDB";
@ -73,6 +83,16 @@ public class LogUtil {
String fileName = f.format(new Date()) + "_DeleteOverFile";
WriteLog(fileName, msg, disStr);
}
public static void WriteLog_241HRZipDownloadFile(String msg, String disStr) {
SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd-HH");
String fileName = f.format(new Date()) + "_241HRZipDownloadFile";
WriteLog(fileName, msg, disStr);
}
public static void WriteLog_242HRZipDownloadFile(String msg, String disStr) {
SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd-HH");
String fileName = f.format(new Date()) + "_242HRZipDownloadFile";
WriteLog(fileName, msg, disStr);
}
public static void WriteLog_HRZipDownloadFile(String msg, String disStr) {
SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd-HH");
String fileName = f.format(new Date()) + "_HRZipDownloadFile";

@ -17,4 +17,22 @@ public interface CreateDbService {
*/
void zipToDataBase(String uuid, BusinessTasks businessTask);
/**
* 241zip
*
* @param uuid uuid
* @param businessTask sqlite
* @author shuguang
* @date 2024-07-09 11:37
*/
void zipToDataBase241(String uuid, BusinessTasks businessTask);
/**
* 242zip
*
* @param uuid uuid
* @param businessTask sqlite
* @author shuguang
* @date 2024-07-09 11:37
*/
void zipToDataBase242(String uuid, BusinessTasks businessTask);
}

@ -31,4 +31,14 @@ public interface FtpDownloadService {
* @date 2024-06-17 10:03
*/
void getHrInsertDBTask(String uuid);
/**
*
*
* @param uuid uuid
* @author shuguang
* @date 2024-06-17 10:03
*/
void getHr241InsertDBTask(String uuid);
void getHr242InsertDBTask(String uuid);
}

@ -7,11 +7,31 @@ package com.nm.gsgl.service;
*/
public interface IntoDatabaseService {
/**
*nmgmpayadmin
* nmgmpayadmin
*
* @param uuid uuid
* @return boolean
* @author shuguang
* @date 2023-10-16 23:19
*/
boolean downAndInsert(String uuid);
/**
* 241nmgmpayadmin
*
* @param uuid uuid
* @return boolean
* @author shuguang
* @date 2024-07-09 11:30
*/
boolean downAndInsert(String uuid);
boolean downAndInsert241(String uuid);
/**
* 242nmgmpayadmin
*
* @param uuid uuid
* @return boolean
* @author shuguang
* @date 2024-07-09 11:30
*/
boolean downAndInsert242(String uuid);
}

@ -203,17 +203,17 @@ public class CreateDbServiceImpl implements CreateDbService {
count = IntoOraDbForOtherClearSum(uuid, fileName, dbTableName, dbfDir, protocolType);
break;
//ETC拆分结果以通行省门架汇总记录拆分下载
case "241":
dbTableName = "CT_GANTRYPASSID";
dbfDir = "GANTRYPASSID241";
count = IntoOraDbForGantryPassid(uuid, fileName, dbTableName, dbfDir, protocolType);
break;
//case "241":
// dbTableName = "CT_GANTRYPASSID";
// dbfDir = "GANTRYPASSID241";
// count = IntoOraDbForGantryPassid(uuid, fileName, dbTableName, dbfDir, protocolType);
// break;
//ETC拆分结果以出口交易正常记账拆分下载
case "242":
dbTableName = "CT_OUT_PORT_ETC";
dbfDir = "OUTPORTETC242";
count = IntoOraDbForOutPortEtc242(uuid, fileName, dbTableName, dbfDir, protocolType);
break;
//case "242":
// dbTableName = "CT_OUT_PORT_ETC";
// dbfDir = "OUTPORTETC242";
// count = IntoOraDbForOutPortEtc242(uuid, fileName, dbTableName, dbfDir, protocolType);
// break;
//ETC拆分结果以出口交易争议记账拆分下载
case "243":
dbTableName = "CT_OUT_PORT_ETC_NOPAY";
@ -385,6 +385,108 @@ public class CreateDbServiceImpl implements CreateDbService {
}
}
/**
* 241zip
*
* @param uuid uuid
* @param businessTask sqlite
* @author shuguang
* @date 2024-07-09 11:37
*/
@Override
public void zipToDataBase241(String uuid, BusinessTasks businessTask) {
String dbTableName = "";
//各类黑名单存放目录
String dbfDir;
String protocolType = businessTask.getProtocolType();
String fileName = businessTask.getFileName();
try {
//数据入库
long start = System.currentTimeMillis();
int count = 0;
//生产暂时入库不入-2023-09-06
//1-入库0-不入库
String isNotInsertDb = PropertiesUtil.getValue("isNotInsertDb");
if (Constant.STR_ONE.equals(isNotInsertDb)) {
//ETC拆分结果以通行省门架汇总记录拆分下载
if ("241".equals(protocolType)) {
dbTableName = "CT_GANTRYPASSID";
dbfDir = "GANTRYPASSID241";
count = IntoOraDbForGantryPassid(uuid, fileName, dbTableName, dbfDir, protocolType);
}
}
//LogUtil.WriteLog_241InsertDB("[uuid:" + uuid + "]-插入数据库表"+dbTableName+"条数为"+ count, "CreateDbServiceImpl");
LogUtil.WriteLog_241InsertDB("[uuid:" + uuid + "]-插入数据库表" + dbTableName + "中数据条数为" + count, "CreateDbServiceImpl");
String sqlParam = Constant.UPDATE_BUSINESS_HANDLER_DB + DateTimeUtil.getFormateString(new Date(), Constant.YYYY_MM_DD_HH_MM_SS) + Constant.WHERE_ID + businessTask.getId();
if (DatabaseUtil.insertSqlite(sqliteDriverName, sqliteUrl, sqlParam) > 0) {
//log.info("[uuid:{}]更新business_tasks_info调用动态库任务列表成功id为:{}", uuid, businessTask.getId());
LogUtil.WriteLog_241InsertDB("[uuid:" + uuid + "]-更新business_tasks_info调用动态库任务列表成功id为:" + businessTask.getId(), "CreateDbServiceImpl");
}
long end = System.currentTimeMillis();
//log.info("[uuid:{}]插入数据库对应表中任务完成,耗时:{}毫秒", uuid, end - start);
LogUtil.WriteLog_241InsertDB("[uuid:" + uuid + "]-插入数据库对应表中任务完成,耗时毫秒:" + (end - start), "CreateDbServiceImpl");
} catch (Exception e) {
//log.error("[uuid:{}]插入数据库对应表中失败{}", uuid, e.getMessage(), e);
LogUtil.WriteLog_Error("[uuid:" + uuid + "]-插入数据库对应表中失败:" + e.getMessage(), "CreateDbServiceImpl");
//更新sqlite任务表的任务状态为2-报错
DatabaseUtil.insertSqlite(sqliteDriverName, sqliteUrl, Constant.ERROR_UPDATE_BUSINESS_HANDLER + businessTask.getId());
//throw new PPException(MessageEnum.插入数据库对应表中操作失败.getCode(), MessageEnum.插入数据库对应表中操作失败.getMessage());
}
}
/**
* 242zip
*
* @param uuid uuid
* @param businessTask sqlite
* @author shuguang
* @date 2024-07-09 11:37
*/
@Override
public void zipToDataBase242(String uuid, BusinessTasks businessTask) {
String dbTableName = "";
//各类黑名单存放目录
String dbfDir;
String protocolType = businessTask.getProtocolType();
String fileName = businessTask.getFileName();
try {
//数据入库
long start = System.currentTimeMillis();
int count = 0;
//生产暂时入库不入-2023-09-06
//1-入库0-不入库
String isNotInsertDb = PropertiesUtil.getValue("isNotInsertDb");
if (Constant.STR_ONE.equals(isNotInsertDb)) {
//ETC拆分结果以通行省门架汇总记录拆分下载
if ("242".equals(protocolType)) {
dbTableName = "CT_OUT_PORT_ETC";
dbfDir = "OUTPORTETC242";
count = IntoOraDbForOutPortEtc242(uuid, fileName, dbTableName, dbfDir, protocolType);
}
}
//LogUtil.WriteLog_242InsertDB("[uuid:" + uuid + "]-插入数据库表"+dbTableName+"条数为"+ count, "CreateDbServiceImpl");
LogUtil.WriteLog_242InsertDB("[uuid:" + uuid + "]-插入数据库表" + dbTableName + "中数据条数为" + count, "CreateDbServiceImpl");
String sqlParam = Constant.UPDATE_BUSINESS_HANDLER_DB + DateTimeUtil.getFormateString(new Date(), Constant.YYYY_MM_DD_HH_MM_SS) + Constant.WHERE_ID + businessTask.getId();
if (DatabaseUtil.insertSqlite(sqliteDriverName, sqliteUrl, sqlParam) > 0) {
//log.info("[uuid:{}]更新business_tasks_info调用动态库任务列表成功id为:{}", uuid, businessTask.getId());
LogUtil.WriteLog_242InsertDB("[uuid:" + uuid + "]-更新business_tasks_info调用动态库任务列表成功id为:" + businessTask.getId(), "CreateDbServiceImpl");
}
long end = System.currentTimeMillis();
//log.info("[uuid:{}]插入数据库对应表中任务完成,耗时:{}毫秒", uuid, end - start);
LogUtil.WriteLog_242InsertDB("[uuid:" + uuid + "]-插入数据库对应表中任务完成,耗时毫秒:" + (end - start), "CreateDbServiceImpl");
} catch (Exception e) {
//log.error("[uuid:{}]插入数据库对应表中失败{}", uuid, e.getMessage(), e);
LogUtil.WriteLog_Error("[uuid:" + uuid + "]-插入数据库对应表中失败:" + e.getMessage(), "CreateDbServiceImpl");
//更新sqlite任务表的任务状态为2-报错
DatabaseUtil.insertSqlite(sqliteDriverName, sqliteUrl, Constant.ERROR_UPDATE_BUSINESS_HANDLER + businessTask.getId());
//throw new PPException(MessageEnum.插入数据库对应表中操作失败.getCode(), MessageEnum.插入数据库对应表中操作失败.getMessage());
}
}
/**
* zipjsonCT_REFUND_LATERPAY_SUM
*/

@ -90,17 +90,17 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
@Override
public void getHrMdTask(String uuid) {
//log.info("[uuid:{}]开始查询华软中介服务上的下载任务数据", uuid);
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-开始查询华软中介服务上的下载任务数据" , "FtpDownloadServiceImpl-getHrMdTask");
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-开始查询华软中介服务上的下载任务数据", "FtpDownloadServiceImpl-getHrMdTask");
//查询下载任务数据
List<DownloadNotify> downloadNotifys = DatabaseUtil.selectDownloadNotify(driverName, HRConnectionStringOracle, HROracleName, HROraclePass, Constant.SELECT_TF_DOWNLOAD_NOTIFY_BLACK);
String localPath = NFSFilePath + PathUtil.downFile;
FileUtil.fileCreat(localPath);
//log.info("[uuid:{}]查询华软中介服务上的下载任务数据条数为{}", uuid, downloadNotifys.size());
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-查询华软中介服务上的下载任务数据条数为"+downloadNotifys.size() , "FtpDownloadServiceImpl-getHrMdTask");
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-查询华软中介服务上的下载任务数据条数为" + downloadNotifys.size(), "FtpDownloadServiceImpl-getHrMdTask");
if (downloadNotifys.size() == 0) {
//log.info("[uuid:{}]华软中介服务上无下载任务", uuid);
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-华软中介服务无下载任务" , "FtpDownloadServiceImpl-getHrMdTask");
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-华软中介服务无下载任务", "FtpDownloadServiceImpl-getHrMdTask");
} else {
for (DownloadNotify downloadNotify : downloadNotifys) {
long start = System.currentTimeMillis();
@ -123,40 +123,40 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
String ftpFilePath = domain1.replace(ftpUrl, Constant.NULL_STRING).replace(fileName, Constant.NULL_STRING);
if (businessTasks.size() == 0 || !FileUtil.fileExists(localPath + fileName)) {
//log.info("[uuid:{}]开始下载华软中介服务上的任务数据,protocolType为{}", uuid, protocolType);
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-开始下载华软中介服务上的任务数据,protocolType为"+protocolType , "FtpDownloadServiceImpl-getHrMdTask");
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-开始下载华软中介服务上的任务数据,protocolType为" + protocolType, "FtpDownloadServiceImpl-getHrMdTask");
boolean isDownload = false;
try {
isDownload = FTPUtil.downloadFile(HRFtpIP, HRFtpUsername, HRPassword, Integer.parseInt(HRPort), ftpFilePath, localPath, fileName);
} catch (Exception e) {
//log.error("[uuid:{}]{}-下载zip文件({}){}失败,等待下次轮询", uuid, protocolType, id, tableName);
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为"+protocolType+"id为"+id+"业务主表表名为"+tableName , "FtpDownloadServiceImpl-getHrMdTask");
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为" + protocolType + "id为" + id + "业务主表表名为" + tableName, "FtpDownloadServiceImpl-getHrMdTask");
//throw new PPException(MessageEnum.FTP文件下载失败.getCode(), MessageEnum.FTP文件下载失败.getMessage());
}
long end = System.currentTimeMillis();
//log.info("[uuid:{}]下载耗时:{}毫秒", uuid, end - start);
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载耗时毫秒为"+(end - start) , "FtpDownloadServiceImpl-getHrMdTask");
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载耗时毫秒为" + (end - start), "FtpDownloadServiceImpl-getHrMdTask");
if (isDownload) {
//校验md5
String downlMd5 = MD5Util.getMd5ByFilePath(localPath + fileName);
//log.info("[uuid:{}]{}-下载zip文件({}){},原MD5值为{}", uuid, protocolType, id, tableName, md5);
//log.info("[uuid:{}]{}-下载zip文件({}){},下载的MD5值为{}", uuid, protocolType, id, tableName, downlMd5);
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为"+protocolType+"id为"+id+"业务主表表名为"+tableName +"原MD5值为"+md5,
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为" + protocolType + "id为" + id + "业务主表表名为" + tableName + "原MD5值为" + md5,
"FtpDownloadServiceImpl-getHrMdTask");
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为"+protocolType+"id为"+id+"业务主表表名为"+tableName +"下载的MD5值为"+downlMd5,
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为" + protocolType + "id为" + id + "业务主表表名为" + tableName + "下载的MD5值为" + downlMd5,
"FtpDownloadServiceImpl-getHrMdTask");
if (StringUtils.isBlank(downlMd5) || !md5.equals(downlMd5)) {
//log.info("[uuid:{}]{}-下载zip文件({}){},MD5校验失败", uuid, protocolType, id, tableName);
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为"+protocolType+"id为"+id+"业务主表表名为"+tableName +"MD5校验失败",
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为" + protocolType + "id为" + id + "业务主表表名为" + tableName + "MD5校验失败",
"FtpDownloadServiceImpl-getHrMdTask");
//throw new PPException(MessageEnum.MD5校验失败.getCode(), MessageEnum.MD5校验失败.getMessage());
} else {
//log.info("[uuid:{}]{}-下载zip文件({}){},MD5校验成功", uuid, protocolType, id, tableName);
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为"+protocolType+"id为"+id+"业务主表表名为"+tableName +"MD5校验成功",
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为" + protocolType + "id为" + id + "业务主表表名为" + tableName + "MD5校验成功",
"FtpDownloadServiceImpl-getHrMdTask");
//获取新的版本号
String newVersion = StringUtil.getNewVersion(protocolType, version);
@ -183,7 +183,7 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
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,
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-插入sqlite数据库business_tasks_info表中任务数据,id为" + id + "protocolType为" + protocolType,
"FtpDownloadServiceImpl-getHrMdTask");
}
@ -192,7 +192,7 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
}
} else {
//log.info("[uuid:{}]sqlite数据库中已存在下载的记录同时下载路径下存在该文件{},跳过下载执行后面的处理程序,id为{}", uuid, fileName, id);
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-sqlite数据库中已存在下载的记录同时下载路径下存在该文件"+fileName+"跳过下载执行后面的处理程序,id为"+id,
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-sqlite数据库中已存在下载的记录同时下载路径下存在该文件" + fileName + "跳过下载执行后面的处理程序,id为" + id,
"FtpDownloadServiceImpl-getHrMdTask");
}
@ -213,18 +213,18 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
@Override
public void getMdMdTask(String uuid) {
//log.info("[uuid:{}]开始查询迈道中介服务上的下载任务数据", uuid);
LogUtil.WriteLog_MDBlackCard("[uuid:" + uuid + "]-开始查询迈道中介服务上的下载任务数据" , "FtpDownloadServiceImpl-getHrMdTask");
LogUtil.WriteLog_MDBlackCard("[uuid:" + uuid + "]-开始查询迈道中介服务上的下载任务数据", "FtpDownloadServiceImpl-getHrMdTask");
//查询下载任务数据
List<ParamNotify> paramNotifyList = DatabaseUtil.selectParamNotify(driverName, MDConnectionStringOracle, MDOracleName, MDOraclePass, Constant.SELECT_T_PARAM_NOTIFY);
String localPath = NFSFilePath + PathUtil.downFile;
FileUtil.fileCreat(localPath);
//log.info("[uuid:{}]查询迈道中介服务上的下载任务数据条数为{}", uuid, paramNotifyList.size());
LogUtil.WriteLog_MDBlackCard("[uuid:" + uuid + "]-查询迈道中介服务上的下载任务数据条数为"+paramNotifyList.size() , "FtpDownloadServiceImpl-getMdMdTask");
LogUtil.WriteLog_MDBlackCard("[uuid:" + uuid + "]-查询迈道中介服务上的下载任务数据条数为" + paramNotifyList.size(), "FtpDownloadServiceImpl-getMdMdTask");
if (paramNotifyList.size() == 0) {
//log.info("[uuid:{}]迈道中介服务上JSON无下载任务", uuid);
LogUtil.WriteLog_MDBlackCard("[uuid:" + uuid + "]-迈道中介服务无下载任务" , "FtpDownloadServiceImpl-getMdMdTask");
LogUtil.WriteLog_MDBlackCard("[uuid:" + uuid + "]-迈道中介服务无下载任务", "FtpDownloadServiceImpl-getMdMdTask");
} else {
for (ParamNotify paramNotify : paramNotifyList) {
String paramId = paramNotify.getPARAM_ID();
@ -248,7 +248,7 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
} catch (Exception e) {
//log.error("[uuid:{}]{}-下载zip文件({}){}失败,等待下次轮询{}", uuid, paramName, paramId + version, fileName, e.getMessage(), e);
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件paramName为"+paramName+"paramId为"+paramId+"fileName"+fileName , "FtpDownloadServiceImpl-getHrMdTask");
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件paramName为" + paramName + "paramId为" + paramId + "fileName" + fileName, "FtpDownloadServiceImpl-getHrMdTask");
}
long end = System.currentTimeMillis();
@ -257,20 +257,20 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
String downlMd5 = MD5Util.getMd5ByFilePath(localPath + fileName);
//log.info("[uuid:{}]-下载zip文件({}){},原MD5值为{}", uuid, paramId, fileName, md5);
//log.info("[uuid:{}]-下载zip文件({}){},下载的MD5值为{}", uuid, paramId, fileName, downlMd5);
LogUtil.WriteLog_MDBlackCard("[uuid:" + uuid + "]-下载zip文件paramName为"+paramName+"paramId为"+paramId+"fileName"+fileName +"原MD5值为"+md5,
LogUtil.WriteLog_MDBlackCard("[uuid:" + uuid + "]-下载zip文件paramName为" + paramName + "paramId为" + paramId + "fileName" + fileName + "原MD5值为" + md5,
"FtpDownloadServiceImpl-getMdMdTask");
LogUtil.WriteLog_MDBlackCard("[uuid:" + uuid + "]-下载zip文件paramName为"+paramName+"paramId为"+paramId+"fileName"+fileName +"下载的MD5值为"+downlMd5,
LogUtil.WriteLog_MDBlackCard("[uuid:" + uuid + "]-下载zip文件paramName为" + paramName + "paramId为" + paramId + "fileName" + fileName + "下载的MD5值为" + downlMd5,
"FtpDownloadServiceImpl-getMdMdTask");
if (StringUtils.isBlank(downlMd5) || !md5.equals(downlMd5)) {
//log.info("[uuid:{}]{}-下载zip文件({}){},MD5校验失败", uuid, paramName, paramId, fileName);
LogUtil.WriteLog_MDBlackCard("[uuid:" + uuid + "]-下载zip文件paramName为"+paramName+"paramId为"+paramId+"fileName"+fileName +"MD5校验失败",
LogUtil.WriteLog_MDBlackCard("[uuid:" + uuid + "]-下载zip文件paramName为" + paramName + "paramId为" + paramId + "fileName" + fileName + "MD5校验失败",
"FtpDownloadServiceImpl-getMdMdTask");
//throw new PPException(MessageEnum.MD5校验失败.getCode(), MessageEnum.MD5校验失败.getMessage());
} else {
//log.info("[uuid:{}]{}-下载zip文件({}){},MD5校验成功", uuid, paramName, paramId, fileName);
LogUtil.WriteLog_MDBlackCard("[uuid:" + uuid + "]-下载zip文件paramName为"+paramName+"paramId为"+paramId+"fileName"+fileName +"MD5校验成功",
LogUtil.WriteLog_MDBlackCard("[uuid:" + uuid + "]-下载zip文件paramName为" + paramName + "paramId为" + paramId + "fileName" + fileName + "MD5校验成功",
"FtpDownloadServiceImpl-getMdMdTask");
//获取新的版本号
String newVersion = StringUtil.getNewVersion(paramId + Constant.STR_01, version);
@ -297,7 +297,7 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
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,
LogUtil.WriteLog_MDBlackCard("[uuid:" + uuid + "]-插入sqlite数据库business_tasks_info表中任务数据,id为" + paramId + version + "protocolType为" + paramId,
"FtpDownloadServiceImpl-getMdMdTask");
}
@ -305,7 +305,7 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
}
} else {
//log.info("[uuid:{}]sqlite数据库中已存在下载的记录,无需下载,跳过下载执行后面的处理程序,id为{}", uuid, paramId);
LogUtil.WriteLog_MDBlackCard("[uuid:" + uuid + "]-sqlite数据库中已存在下载的记录同时下载路径下存在该文件"+fileName+"跳过下载执行后面的处理程序,id为"+paramId,
LogUtil.WriteLog_MDBlackCard("[uuid:" + uuid + "]-sqlite数据库中已存在下载的记录同时下载路径下存在该文件" + fileName + "跳过下载执行后面的处理程序,id为" + paramId,
"FtpDownloadServiceImpl-getMdMdTask");
}
@ -323,17 +323,17 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
@Override
public void getHrInsertDBTask(String uuid) {
//log.info("[uuid:{}]开始查询华软中介服务上的下载任务数据", uuid);
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-开始查询华软中介服务上的下载任务数据" , "FtpDownloadServiceImpl-getHrMdTask");
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-开始查询华软中介服务上的下载任务数据", "FtpDownloadServiceImpl-getHrMdTask");
//查询下载任务数据
List<DownloadNotify> downloadNotifys = DatabaseUtil.selectDownloadNotify(driverName, HRConnectionStringOracle, HROracleName, HROraclePass, Constant.SELECT_TF_DOWNLOAD_NOTIFY_INSERT_DB);
String localPath = NFSFilePath + PathUtil.downFile;
FileUtil.fileCreat(localPath);
//log.info("[uuid:{}]查询华软中介服务上的下载任务数据条数为{}", uuid, downloadNotifys.size());
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-查询华软中介服务上的下载任务数据条数为"+downloadNotifys.size() , "FtpDownloadServiceImpl-getHrMdTask");
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-查询华软中介服务上的下载任务数据条数为" + downloadNotifys.size(), "FtpDownloadServiceImpl-getHrMdTask");
if (downloadNotifys.size() == 0) {
//log.info("[uuid:{}]华软中介服务上无下载任务", uuid);
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-华软中介服务无下载任务" , "FtpDownloadServiceImpl-getHrMdTask");
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-华软中介服务无下载任务", "FtpDownloadServiceImpl-getHrMdTask");
} else {
for (DownloadNotify downloadNotify : downloadNotifys) {
long start = System.currentTimeMillis();
@ -356,40 +356,40 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
String ftpFilePath = domain1.replace(ftpUrl, Constant.NULL_STRING).replace(fileName, Constant.NULL_STRING);
if (businessTasks.size() == 0 || !FileUtil.fileExists(localPath + fileName)) {
//log.info("[uuid:{}]开始下载华软中介服务上的任务数据,protocolType为{}", uuid, protocolType);
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-开始下载华软中介服务上的任务数据,protocolType为"+protocolType , "FtpDownloadServiceImpl-getHrMdTask");
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-开始下载华软中介服务上的任务数据,protocolType为" + protocolType, "FtpDownloadServiceImpl-getHrMdTask");
boolean isDownload = false;
try {
isDownload = FTPUtil.downloadFile(HRFtpIP, HRFtpUsername, HRPassword, Integer.parseInt(HRPort), ftpFilePath, localPath, fileName);
} catch (Exception e) {
//log.error("[uuid:{}]{}-下载zip文件({}){}失败,等待下次轮询", uuid, protocolType, id, tableName);
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为"+protocolType+"id为"+id+"业务主表表名为"+tableName , "FtpDownloadServiceImpl-getHrMdTask");
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为" + protocolType + "id为" + id + "业务主表表名为" + tableName, "FtpDownloadServiceImpl-getHrMdTask");
//throw new PPException(MessageEnum.FTP文件下载失败.getCode(), MessageEnum.FTP文件下载失败.getMessage());
}
long end = System.currentTimeMillis();
//log.info("[uuid:{}]下载耗时:{}毫秒", uuid, end - start);
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载耗时毫秒为"+(end - start) , "FtpDownloadServiceImpl-getHrMdTask");
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载耗时毫秒为" + (end - start), "FtpDownloadServiceImpl-getHrMdTask");
if (isDownload) {
//校验md5
String downlMd5 = MD5Util.getMd5ByFilePath(localPath + fileName);
//log.info("[uuid:{}]{}-下载zip文件({}){},原MD5值为{}", uuid, protocolType, id, tableName, md5);
//log.info("[uuid:{}]{}-下载zip文件({}){},下载的MD5值为{}", uuid, protocolType, id, tableName, downlMd5);
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为"+protocolType+"id为"+id+"业务主表表名为"+tableName +"原MD5值为"+md5,
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为" + protocolType + "id为" + id + "业务主表表名为" + tableName + "原MD5值为" + md5,
"FtpDownloadServiceImpl-getHrMdTask");
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为"+protocolType+"id为"+id+"业务主表表名为"+tableName +"下载的MD5值为"+downlMd5,
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为" + protocolType + "id为" + id + "业务主表表名为" + tableName + "下载的MD5值为" + downlMd5,
"FtpDownloadServiceImpl-getHrMdTask");
if (StringUtils.isBlank(downlMd5) || !md5.equals(downlMd5)) {
//log.info("[uuid:{}]{}-下载zip文件({}){},MD5校验失败", uuid, protocolType, id, tableName);
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为"+protocolType+"id为"+id+"业务主表表名为"+tableName +"MD5校验失败",
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为" + protocolType + "id为" + id + "业务主表表名为" + tableName + "MD5校验失败",
"FtpDownloadServiceImpl-getHrMdTask");
//throw new PPException(MessageEnum.MD5校验失败.getCode(), MessageEnum.MD5校验失败.getMessage());
} else {
//log.info("[uuid:{}]{}-下载zip文件({}){},MD5校验成功", uuid, protocolType, id, tableName);
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为"+protocolType+"id为"+id+"业务主表表名为"+tableName +"MD5校验成功",
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为" + protocolType + "id为" + id + "业务主表表名为" + tableName + "MD5校验成功",
"FtpDownloadServiceImpl-getHrMdTask");
//获取新的版本号
String newVersion = StringUtil.getNewVersion(protocolType, version);
@ -416,7 +416,7 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
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,
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-插入sqlite数据库business_tasks_info表中任务数据,id为" + id + "protocolType为" + protocolType,
"FtpDownloadServiceImpl-getHrMdTask");
}
@ -425,7 +425,7 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
}
} else {
//log.info("[uuid:{}]sqlite数据库中已存在下载的记录同时下载路径下存在该文件{},跳过下载执行后面的处理程序,id为{}", uuid, fileName, id);
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-sqlite数据库中已存在下载的记录同时下载路径下存在该文件"+fileName+"跳过下载执行后面的处理程序,id为"+id,
LogUtil.WriteLog_HRZipDownloadFile("[uuid:" + uuid + "]-sqlite数据库中已存在下载的记录同时下载路径下存在该文件" + fileName + "跳过下载执行后面的处理程序,id为" + id,
"FtpDownloadServiceImpl-getHrMdTask");
}
@ -434,4 +434,238 @@ public class FtpDownloadServiceImpl implements FtpDownloadService {
}
}
/**
* 241
*
* @param uuid uuid
* @author shuguang
* @date 2024-06-17 10:03
*/
@Override
public void getHr241InsertDBTask(String uuid) {
//log.info("[uuid:{}]开始查询华软中介服务上的下载任务数据", uuid);
LogUtil.WriteLog_241HRZipDownloadFile("[uuid:" + uuid + "]-开始查询华软中介服务上的下载任务数据", "FtpDownloadServiceImpl-getHrMdTask");
//查询下载任务数据
List<DownloadNotify> downloadNotifys = DatabaseUtil.selectDownloadNotify(driverName, HRConnectionStringOracle, HROracleName, HROraclePass, Constant.SELECT_TF_DOWNLOAD_NOTIFY_INSERT_DB_241);
String localPath = NFSFilePath + PathUtil.downFile;
FileUtil.fileCreat(localPath);
//log.info("[uuid:{}]查询华软中介服务上的下载任务数据条数为{}", uuid, downloadNotifys.size());
LogUtil.WriteLog_241HRZipDownloadFile("[uuid:" + uuid + "]-查询华软中介服务上的下载任务数据条数为" + downloadNotifys.size(), "FtpDownloadServiceImpl-getHrMdTask");
if (downloadNotifys.size() == 0) {
//log.info("[uuid:{}]华软中介服务上无下载任务", uuid);
LogUtil.WriteLog_241HRZipDownloadFile("[uuid:" + uuid + "]-华软中介服务无下载任务", "FtpDownloadServiceImpl-getHrMdTask");
} else {
for (DownloadNotify downloadNotify : downloadNotifys) {
long start = System.currentTimeMillis();
String id = downloadNotify.getID();
String tableName = downloadNotify.getTABLENAME();
String version = downloadNotify.getVERSION();
String protocolType = downloadNotify.getPROTOCOLTYPE();
//Json文件记录数
String fileCount = downloadNotify.getRECORDNUM();
//如果时黑名单 就是文件下载地址
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);
//构建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)) {
//log.info("[uuid:{}]开始下载华软中介服务上的任务数据,protocolType为{}", uuid, protocolType);
LogUtil.WriteLog_241HRZipDownloadFile("[uuid:" + uuid + "]-开始下载华软中介服务上的任务数据,protocolType为" + protocolType, "FtpDownloadServiceImpl-getHrMdTask");
boolean isDownload = false;
try {
isDownload = FTPUtil.downloadFile(HRFtpIP, HRFtpUsername, HRPassword, Integer.parseInt(HRPort), ftpFilePath, localPath, fileName);
} catch (Exception e) {
//log.error("[uuid:{}]{}-下载zip文件({}){}失败,等待下次轮询", uuid, protocolType, id, tableName);
LogUtil.WriteLog_241HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为" + protocolType + "id为" + id + "业务主表表名为" + tableName, "FtpDownloadServiceImpl-getHrMdTask");
//throw new PPException(MessageEnum.FTP文件下载失败.getCode(), MessageEnum.FTP文件下载失败.getMessage());
}
long end = System.currentTimeMillis();
//log.info("[uuid:{}]下载耗时:{}毫秒", uuid, end - start);
LogUtil.WriteLog_241HRZipDownloadFile("[uuid:" + uuid + "]-下载耗时毫秒为" + (end - start), "FtpDownloadServiceImpl-getHrMdTask");
if (isDownload) {
//校验md5
String downlMd5 = MD5Util.getMd5ByFilePath(localPath + fileName);
//log.info("[uuid:{}]{}-下载zip文件({}){},原MD5值为{}", uuid, protocolType, id, tableName, md5);
//log.info("[uuid:{}]{}-下载zip文件({}){},下载的MD5值为{}", uuid, protocolType, id, tableName, downlMd5);
LogUtil.WriteLog_241HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为" + protocolType + "id为" + id + "业务主表表名为" + tableName + "原MD5值为" + md5,
"FtpDownloadServiceImpl-getHrMdTask");
LogUtil.WriteLog_241HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为" + protocolType + "id为" + id + "业务主表表名为" + tableName + "下载的MD5值为" + downlMd5,
"FtpDownloadServiceImpl-getHrMdTask");
if (StringUtils.isBlank(downlMd5) || !md5.equals(downlMd5)) {
//log.info("[uuid:{}]{}-下载zip文件({}){},MD5校验失败", uuid, protocolType, id, tableName);
LogUtil.WriteLog_241HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为" + protocolType + "id为" + id + "业务主表表名为" + tableName + "MD5校验失败",
"FtpDownloadServiceImpl-getHrMdTask");
//throw new PPException(MessageEnum.MD5校验失败.getCode(), MessageEnum.MD5校验失败.getMessage());
} else {
//log.info("[uuid:{}]{}-下载zip文件({}){},MD5校验成功", uuid, protocolType, id, tableName);
LogUtil.WriteLog_241HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为" + protocolType + "id为" + id + "业务主表表名为" + tableName + "MD5校验成功",
"FtpDownloadServiceImpl-getHrMdTask");
//获取新的版本号
String newVersion = StringUtil.getNewVersion(protocolType, version);
//插入sqlite数据库任务表中
BusinessTasks bt = new BusinessTasks();
bt.setId(id);
bt.setFileName(fileName);
bt.setSize(FileUtil.formatFileSize(FileUtil.getFileSize(new File(localPath + fileName))));
bt.setRecordCount(Integer.parseInt(fileCount));
//1-已下载
bt.setDownStatus(1);
bt.setProtocolType(protocolType);
bt.setDownloadTime(DateTimeUtil.getFormateString(new Date(), Constant.YYYY_MM_DD_HH_MM_SS));
bt.setConsumTime(end - start);
bt.setVersion(version);
bt.setNewVersion(newVersion);
bt.setProStatus(StringUtil.turnProStatus(protocolType));
//中介库名称 1-华软 2-迈道
bt.setMiddleDatabase(1);
//办理状态 0-未处理 1-已处理 2-再次轮询处理
bt.setHandleStatus(0);
String sqliteInsert = StringUtil.sqliteInsert(bt);
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-getHrMdTask");
}
}
}
} else {
//log.info("[uuid:{}]sqlite数据库中已存在下载的记录同时下载路径下存在该文件{},跳过下载执行后面的处理程序,id为{}", uuid, fileName, id);
LogUtil.WriteLog_241HRZipDownloadFile("[uuid:" + uuid + "]-sqlite数据库中已存在下载的记录同时下载路径下存在该文件" + fileName + "跳过下载执行后面的处理程序,id为" + id,
"FtpDownloadServiceImpl-getHrMdTask");
}
}
}
}
@Override
public void getHr242InsertDBTask(String uuid) {
LogUtil.WriteLog_242HRZipDownloadFile("[uuid:" + uuid + "]-开始查询华软中介服务上的下载任务数据", "FtpDownloadServiceImpl-getHrMdTask");
//查询下载任务数据
List<DownloadNotify> downloadNotifys = DatabaseUtil.selectDownloadNotify(driverName, HRConnectionStringOracle, HROracleName, HROraclePass, Constant.SELECT_TF_DOWNLOAD_NOTIFY_INSERT_DB_242);
String localPath = NFSFilePath + PathUtil.downFile;
FileUtil.fileCreat(localPath);
//log.info("[uuid:{}]查询华软中介服务上的下载任务数据条数为{}", uuid, downloadNotifys.size());
LogUtil.WriteLog_242HRZipDownloadFile("[uuid:" + uuid + "]-查询华软中介服务上的下载任务数据条数为" + downloadNotifys.size(), "FtpDownloadServiceImpl-getHrMdTask");
if (downloadNotifys.size() == 0) {
//log.info("[uuid:{}]华软中介服务上无下载任务", uuid);
LogUtil.WriteLog_242HRZipDownloadFile("[uuid:" + uuid + "]-华软中介服务无下载任务", "FtpDownloadServiceImpl-getHrMdTask");
} else {
for (DownloadNotify downloadNotify : downloadNotifys) {
long start = System.currentTimeMillis();
String id = downloadNotify.getID();
String tableName = downloadNotify.getTABLENAME();
String version = downloadNotify.getVERSION();
String protocolType = downloadNotify.getPROTOCOLTYPE();
//Json文件记录数
String fileCount = downloadNotify.getRECORDNUM();
//如果时黑名单 就是文件下载地址
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);
//构建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)) {
//log.info("[uuid:{}]开始下载华软中介服务上的任务数据,protocolType为{}", uuid, protocolType);
LogUtil.WriteLog_242HRZipDownloadFile("[uuid:" + uuid + "]-开始下载华软中介服务上的任务数据,protocolType为" + protocolType, "FtpDownloadServiceImpl-getHrMdTask");
boolean isDownload = false;
try {
isDownload = FTPUtil.downloadFile(HRFtpIP, HRFtpUsername, HRPassword, Integer.parseInt(HRPort), ftpFilePath, localPath, fileName);
} catch (Exception e) {
//log.error("[uuid:{}]{}-下载zip文件({}){}失败,等待下次轮询", uuid, protocolType, id, tableName);
LogUtil.WriteLog_242HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为" + protocolType + "id为" + id + "业务主表表名为" + tableName, "FtpDownloadServiceImpl-getHrMdTask");
//throw new PPException(MessageEnum.FTP文件下载失败.getCode(), MessageEnum.FTP文件下载失败.getMessage());
}
long end = System.currentTimeMillis();
//log.info("[uuid:{}]下载耗时:{}毫秒", uuid, end - start);
LogUtil.WriteLog_242HRZipDownloadFile("[uuid:" + uuid + "]-下载耗时毫秒为" + (end - start), "FtpDownloadServiceImpl-getHrMdTask");
if (isDownload) {
//校验md5
String downlMd5 = MD5Util.getMd5ByFilePath(localPath + fileName);
//log.info("[uuid:{}]{}-下载zip文件({}){},原MD5值为{}", uuid, protocolType, id, tableName, md5);
//log.info("[uuid:{}]{}-下载zip文件({}){},下载的MD5值为{}", uuid, protocolType, id, tableName, downlMd5);
LogUtil.WriteLog_242HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为" + protocolType + "id为" + id + "业务主表表名为" + tableName + "原MD5值为" + md5,
"FtpDownloadServiceImpl-getHrMdTask");
LogUtil.WriteLog_242HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为" + protocolType + "id为" + id + "业务主表表名为" + tableName + "下载的MD5值为" + downlMd5,
"FtpDownloadServiceImpl-getHrMdTask");
if (StringUtils.isBlank(downlMd5) || !md5.equals(downlMd5)) {
//log.info("[uuid:{}]{}-下载zip文件({}){},MD5校验失败", uuid, protocolType, id, tableName);
LogUtil.WriteLog_242HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为" + protocolType + "id为" + id + "业务主表表名为" + tableName + "MD5校验失败",
"FtpDownloadServiceImpl-getHrMdTask");
//throw new PPException(MessageEnum.MD5校验失败.getCode(), MessageEnum.MD5校验失败.getMessage());
} else {
//log.info("[uuid:{}]{}-下载zip文件({}){},MD5校验成功", uuid, protocolType, id, tableName);
LogUtil.WriteLog_242HRZipDownloadFile("[uuid:" + uuid + "]-下载zip文件protocolType为" + protocolType + "id为" + id + "业务主表表名为" + tableName + "MD5校验成功",
"FtpDownloadServiceImpl-getHrMdTask");
//获取新的版本号
String newVersion = StringUtil.getNewVersion(protocolType, version);
//插入sqlite数据库任务表中
BusinessTasks bt = new BusinessTasks();
bt.setId(id);
bt.setFileName(fileName);
bt.setSize(FileUtil.formatFileSize(FileUtil.getFileSize(new File(localPath + fileName))));
bt.setRecordCount(Integer.parseInt(fileCount));
//1-已下载
bt.setDownStatus(1);
bt.setProtocolType(protocolType);
bt.setDownloadTime(DateTimeUtil.getFormateString(new Date(), Constant.YYYY_MM_DD_HH_MM_SS));
bt.setConsumTime(end - start);
bt.setVersion(version);
bt.setNewVersion(newVersion);
bt.setProStatus(StringUtil.turnProStatus(protocolType));
//中介库名称 1-华软 2-迈道
bt.setMiddleDatabase(1);
//办理状态 0-未处理 1-已处理 2-再次轮询处理
bt.setHandleStatus(0);
String sqliteInsert = StringUtil.sqliteInsert(bt);
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-getHrMdTask");
}
}
}
} else {
//log.info("[uuid:{}]sqlite数据库中已存在下载的记录同时下载路径下存在该文件{},跳过下载执行后面的处理程序,id为{}", uuid, fileName, id);
LogUtil.WriteLog_242HRZipDownloadFile("[uuid:" + uuid + "]-sqlite数据库中已存在下载的记录同时下载路径下存在该文件" + fileName + "跳过下载执行后面的处理程序,id为" + id,
"FtpDownloadServiceImpl-getHrMdTask");
}
}
}
}
}

@ -99,14 +99,7 @@ public class IntoDatabaseServiceImpl implements IntoDatabaseService {
case "240":
dirPath = "OTHERCLEARSUM240";
break;
//ETC拆分结果以通行省门架汇总记录拆分下载
case "241":
dirPath = "GANTRYPASSID241";
break;
//ETC拆分结果以出口交易正常记账拆分下载
case "242":
dirPath = "OUTPORTETC242";
break;
//ETC拆分结果以出口交易争议记账拆分下载
case "243":
dirPath = "OUTPORTETCNOPAY243";
@ -230,4 +223,136 @@ public class IntoDatabaseServiceImpl implements IntoDatabaseService {
return false;
}
}
/**
* 241nmgmpayadmin
*
* @param uuid uuid
* @return boolean
* @author shuguang
* @date 2024-07-09 11:30
*/
@Override
public boolean downAndInsert241(String uuid) {
//双机方案
//获取本机的机器ID,本机的机器ID 1-主机2-备用机
int mId = Integer.parseInt(machineId);
//insertDBLog.info("[uuid:{}]获取当前机器的id为{}", uuid, mId);
LogUtil.WriteLog_241InsertDB("[uuid:" + uuid + "]-获取当前机器的id为" +mId, "IntoDatabaseServiceImpl");
AppAliveStatus appAliveStatus = appAliveStatusMapper.selectById(1);
int aLiveId = appAliveStatus.getALiveId();
if (mId == aLiveId) {
//开始下载扫描迈道,华软下载任务
ftpDownloadService.getHr241InsertDBTask(uuid);
//开始查询sqlite任务表中华软未处理数据任务
List<BusinessTasks> businessTasks = DatabaseUtil.selectBusines(sqliteDriverName, sqliteUrl, Constant.SELECT_BUSINESS_HANDLER_HR_241);
//按照文件类型排序
businessTasks.sort(Comparator.comparing(BusinessTasks::getProtocolType));
if (businessTasks.size() > 0) {
for (BusinessTasks businessTask : businessTasks) {
String protocolType = businessTask.getProtocolType();
String id = businessTask.getId();
//是否处理完成
boolean isFinished = false;
if (Constant.INTO_DB_LIST.contains(protocolType)) {
String fileName = businessTask.getFileName();
String fileZip = NFSFilePath + PathUtil.downFile + fileName;
String dirPath="";
//ETC拆分结果以通行省门架汇总记录拆分下载
if ("241".equals(protocolType)) {
dirPath = "GANTRYPASSID241";
}
//备份zip文件
String downFileBackup = NFSFilePath + PathUtil.downZipInsertBackup + dirPath + File.separator;
FileUtil.fileCreat(downFileBackup);
FileUtil.copyFile(fileZip, downFileBackup + fileName);
//入库操作
createDbService.zipToDataBase241(uuid, businessTask);
isFinished = true;
}
if (isFinished) {
//更新中介库华软的下载状态
//insertDBLog.info("[uuid:{}]-更新中介库TF_DOWNLOAD_NOTIFY(id为:{})下载状态为1-已下载", uuid, id);
LogUtil.WriteLog_241InsertDB("[uuid:" + uuid + "]-更新中介库TF_DOWNLOAD_NOTIFY(id为:" +id+")下载状态为1-已下载", "IntoDatabaseServiceImpl");
DatabaseUtil.updateSql(driverName, HRConnectionStringOracle, HROracleName, HROraclePass, Constant.UPDATE_TF_DOWNLOAD_NOTIFY_HR + id, uuid);
//删除下载的zip文件
FileUtil.delete(new File(NFSFilePath + PathUtil.downFile + businessTask.getFileName()));
}
}
}
sqliteBackupsService.buildBackups(uuid);
return true;
} else {
return false;
}
}
/**
* 242nmgmpayadmin
*
* @param uuid uuid
* @return boolean
* @author shuguang
* @date 2024-07-09 11:30
*/
@Override
public boolean downAndInsert242(String uuid) {
//双机方案
//获取本机的机器ID,本机的机器ID 1-主机2-备用机
int mId = Integer.parseInt(machineId);
//insertDBLog.info("[uuid:{}]获取当前机器的id为{}", uuid, mId);
LogUtil.WriteLog_242InsertDB("[uuid:" + uuid + "]-获取当前机器的id为" +mId, "IntoDatabaseServiceImpl");
AppAliveStatus appAliveStatus = appAliveStatusMapper.selectById(1);
int aLiveId = appAliveStatus.getALiveId();
if (mId == aLiveId) {
//开始下载扫描迈道,华软下载任务
ftpDownloadService.getHr242InsertDBTask(uuid);
//开始查询sqlite任务表中华软未处理数据任务
List<BusinessTasks> businessTasks = DatabaseUtil.selectBusines(sqliteDriverName, sqliteUrl, Constant.SELECT_BUSINESS_HANDLER_HR_242);
//按照文件类型排序
businessTasks.sort(Comparator.comparing(BusinessTasks::getProtocolType));
if (businessTasks.size() > 0) {
for (BusinessTasks businessTask : businessTasks) {
String protocolType = businessTask.getProtocolType();
String id = businessTask.getId();
//是否处理完成
boolean isFinished = false;
if (Constant.INTO_DB_LIST.contains(protocolType)) {
String fileName = businessTask.getFileName();
String fileZip = NFSFilePath + PathUtil.downFile + fileName;
String dirPath="";
//ETC拆分结果以出口交易正常记账拆分下载
if ("242".equals(protocolType)) {
dirPath = "OUTPORTETC242";
}
//备份zip文件
String downFileBackup = NFSFilePath + PathUtil.downZipInsertBackup + dirPath + File.separator;
FileUtil.fileCreat(downFileBackup);
FileUtil.copyFile(fileZip, downFileBackup + fileName);
//入库操作
createDbService.zipToDataBase242(uuid, businessTask);
isFinished = true;
}
if (isFinished) {
//更新中介库华软的下载状态
//insertDBLog.info("[uuid:{}]-更新中介库TF_DOWNLOAD_NOTIFY(id为:{})下载状态为1-已下载", uuid, id);
LogUtil.WriteLog_242InsertDB("[uuid:" + uuid + "]-更新中介库TF_DOWNLOAD_NOTIFY(id为:" +id+")下载状态为1-已下载", "IntoDatabaseServiceImpl");
DatabaseUtil.updateSql(driverName, HRConnectionStringOracle, HROracleName, HROraclePass, Constant.UPDATE_TF_DOWNLOAD_NOTIFY_HR + id, uuid);
//删除下载的zip文件
FileUtil.delete(new File(NFSFilePath + PathUtil.downFile + businessTask.getFileName()));
}
}
}
sqliteBackupsService.buildBackups(uuid);
return true;
} else {
return false;
}
}
}

@ -13,3 +13,7 @@ time.corn4 = 0 0/5 * * * ?
time.corn5 = 0 0/1 * * * ?
#每5分钟执行一次
time.corn6= 0 0/5 * * * ?
#每5分钟执行一次
time.corn7= 0 0/5 * * * ?
#每5分钟执行一次
time.corn8= 0 0/5 * * * ?

Loading…
Cancel
Save