|
@ -5,6 +5,8 @@ import org.quartz.DisallowConcurrentExecution;
|
|
import org.quartz.Job;
|
|
import org.quartz.Job;
|
|
import org.quartz.JobExecutionContext;
|
|
import org.quartz.JobExecutionContext;
|
|
import org.quartz.JobExecutionException;
|
|
import org.quartz.JobExecutionException;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
/**
|
|
/**
|
|
@ -13,13 +15,17 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
*/
|
|
*/
|
|
@DisallowConcurrentExecution
|
|
@DisallowConcurrentExecution
|
|
public class SynElectricRecordsJob implements Job {
|
|
public class SynElectricRecordsJob implements Job {
|
|
|
|
|
|
|
|
Logger logger = LoggerFactory.getLogger(SynElectricRecordsJob.class);
|
|
@Autowired
|
|
@Autowired
|
|
private HzInterfaceService hzInterfaceService;
|
|
private HzInterfaceService hzInterfaceService;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
|
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
|
try {
|
|
try {
|
|
|
|
logger.info("SynElectricRecordsJob start");
|
|
hzInterfaceService.electricityTable(null);
|
|
hzInterfaceService.electricityTable(null);
|
|
|
|
logger.info("SynElectricRecordsJob end");
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|