package com.steering.jobface.mch;

import org.apache.log4j.Logger;

import java.util.TimerTask;

/**
 * Created by 朱少波 on 2019/4/15.
 */
public class CoreRtdMeasurePosDataHelper   extends TimerTask {

    private   CoreRtdMeasurePosDataTask TaskA ;
    private   CoreRtdMeasurePosDataTask TaskB ;
    private   CoreRtdMeasurePosDataTask TaskC ;

    private static final long serialVersionUID = -8118232385548910425L;

    public Logger logger = Logger.getLogger(CoreRtdMeasurePosDataHelper.class);

    private   CoreRtdMeasurePosDataTask TaskAall ;
    private   CoreRtdMeasurePosDataTask TaskBall;
    private   CoreRtdMeasurePosDataTask TaskCall;

    public   CoreRtdMeasurePosDataHelper(){
        TaskA=  new CoreRtdMeasurePosDataTask("MSSQL1Dao","TgDao","A");
        TaskB=  new CoreRtdMeasurePosDataTask("MSSQL2Dao","TgDao","B");
        TaskC=  new CoreRtdMeasurePosDataTask("MSSQL720Dao","TgDao","C");


        TaskAall=  new CoreRtdMeasurePosDataTask("MSSQL1Dao","TgDao","A",true);
        TaskBall=  new CoreRtdMeasurePosDataTask("MSSQL2Dao","TgDao","B",true);
        TaskCall=  new CoreRtdMeasurePosDataTask("MSSQL720Dao","TgDao","C",true);
    }


    @Override
    public void run() {
        // 同步锁
        synchronized (this) {

            /*logger.info("本部10.3开始运行");
            TaskA.Main();

            logger.info("元通10.30开始运行");
            TaskB.Main();
            
            logger.info("720 10.30开始运行");
            TaskC.Main();

            logger.info("本部10.3检查遗漏ID开始运行");
            TaskAall.Main();
            
            logger.info("元通10.30检查遗漏ID开始运行");
            TaskBall.Main();
            
            logger.info("720 10.30检查遗漏ID开始运行");
            TaskCall.Main();*/
            // System.out.println("\r<br>执行耗时 : " +(System.currentTimeMillis()-a)/1000f+" 秒   --- " + originalDaoName);
        }
    }


}
