宜都城投资产数据同步插件 -1不执行

This commit is contained in:
2025-01-10 09:37:42 +08:00
parent 27555c83f6
commit cb4ea03632

View File

@@ -73,14 +73,17 @@ public class YdzbDataSyncQuartz extends AbstractQuartzTask implements Disposable
@Override @Override
public String taskRun(String arg0) { public String taskRun(String arg0) {
log.info("宜都城投资产数据同步任务任务开始"); if (!"-1".equals(arg0)) {
log.info("宜都城投资产数据同步任务不执行");
}
log.info("宜都城投资产数据同步任务开始");
long startTime = System.currentTimeMillis(); long startTime = System.currentTimeMillis();
try (Connection connection = ydzbThirdDataSource.getConnection()){ try (Connection connection = ydzbThirdDataSource.getConnection()){
agent = new JDBCAgent(); agent = new JDBCAgent();
processZcData(connection); processZcData(connection);
processContractData(connection); processContractData(connection);
DateFormat df = new SimpleDateFormat("yyyy-MM-dd"); DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
if (!"-1".equals(arg0)) {
try { try {
Date date = null; Date date = null;
if (arg0 != null) { if (arg0 != null) {
@@ -90,7 +93,6 @@ public class YdzbDataSyncQuartz extends AbstractQuartzTask implements Disposable
} catch (ParseException e) { } catch (ParseException e) {
throw e; throw e;
} }
}
} catch (Exception e) { } catch (Exception e) {
log.error("宜都城投资产数据同步任务执行失败"); log.error("宜都城投资产数据同步任务执行失败");
log.error(e.getMessage(),e); log.error(e.getMessage(),e);
@@ -99,7 +101,7 @@ public class YdzbDataSyncQuartz extends AbstractQuartzTask implements Disposable
agent.close(); agent.close();
} }
} }
log.info("宜都城投资产数据同步任务任务结束,耗时:"+ (System.currentTimeMillis() - startTime)+ " ms"); log.info("宜都城投资产数据同步任务结束,耗时:"+ (System.currentTimeMillis() - startTime)+ " ms");
return null; return null;
} }