宜都城投资产数据同步插件 -1不执行
This commit is contained in:
@@ -73,24 +73,26 @@ 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) {
|
||||||
date = df.parse(arg0);
|
date = df.parse(arg0);
|
||||||
}
|
}
|
||||||
processFeeData(connection, date);
|
processFeeData(connection, date);
|
||||||
}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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user