package com.trs.ggzyexchange.config;


import com.trs.ggzyexchange.schedul.*;
import org.quartz.*;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class QuartzConfig {
/*

    @Value("${time.cron}")
    private String strSron;
     //创建Job实例
    @Bean
    public JobDetail jobDetailCqSwBargainResult() {
        return JobBuilder.newJob(CqSwBargainResultSchedul.class).storeDurably().build();
    }
    //触发器
    @Bean
    public Trigger triggerCqSwBargainResult() {
        return TriggerBuilder.newTrigger()
                .withIdentity("triggerCqSwBargainResult", "groupCqSwBargainResult")
                .withSchedule(CronScheduleBuilder.cronSchedule(this.strSron))
                .forJob(jobDetailCqSwBargainResult())
                .build();
    }

    @Bean
    public JobDetail jobDetailCqSwIssueBulletin() {
        return JobBuilder.newJob(CqSwIssueBulletinSchedul.class).storeDurably().build();
    }
    //触发器
    @Bean
    public Trigger triggerCqSwIssueBulletin() {
        return TriggerBuilder.newTrigger()
                .withIdentity("triggerCqSwIssueBulletin", "groupCqSwIssueBulletin")
                .withSchedule(CronScheduleBuilder.cronSchedule(this.strSron))
                .forJob(jobDetailCqSwIssueBulletin())
                .build();
    }

    @Bean
    public JobDetail jobGcBidcandidatePost() {
        return JobBuilder.newJob(GcBidcandidatePostSchedul.class).storeDurably().build();
    }
    //触发器
    @Bean
    public Trigger triggerGcBidcandidatePost() {
        return TriggerBuilder.newTrigger()
                .withIdentity("triggerGcBidcandidatePost", "groupGcBidcandidatePost")
                .withSchedule(CronScheduleBuilder.cronSchedule(this.strSron))
                .forJob(jobGcBidcandidatePost())
                .build();
    }

    @Bean
    public JobDetail jobGcBidExceptioNoticeSchedul() {
        return JobBuilder.newJob(GcBidExceptioNoticeSchedul.class).storeDurably().build();
    }
    //触发器
    @Bean
    public Trigger triggerGcBidExceptioNoticeSchedul() {
        return TriggerBuilder.newTrigger()
                .withIdentity("triggerGcBidExceptioNoticeSchedul", "groupGcBidExceptioNoticeSchedul")
                .withSchedule(CronScheduleBuilder.cronSchedule(this.strSron))
                .forJob(jobGcBidExceptioNoticeSchedul())
                .build();
    }


    @Bean
    public JobDetail jobGcBidopenrecordSchedul() {
        return JobBuilder.newJob(GcBidopenrecordSchedul.class).storeDurably().build();
    }
    @Bean
    public Trigger triggerGcBidopenrecordSchedul() {
        return TriggerBuilder.newTrigger()
                .withIdentity("triggerGcBidopenrecordSchedul", "groupGcBidopenrecordSchedul")
                .withSchedule(CronScheduleBuilder.cronSchedule(this.strSron))
                .forJob(jobGcBidopenrecordSchedul())
                .build();
    }


    @Bean
    public JobDetail jobGcBidpublicitySchedul() {
        return JobBuilder.newJob(GcBidpublicitySchedul.class).storeDurably().build();
    }
    //触发器
    @Bean
    public Trigger triggerGcBidpublicitySchedul() {
        return TriggerBuilder.newTrigger()
                .withIdentity("triggerGcBidpublicitySchedul", "groupGcBidpublicitySchedul")
                .withSchedule(CronScheduleBuilder.cronSchedule(this.strSron))
                .forJob(jobGcBidpublicitySchedul())
                .build();
    }


    @Bean
    public JobDetail jobGcNoticeandfileSchedul() {
        return JobBuilder.newJob(GcNoticeandfileSchedul.class).storeDurably().build();
    }
    //触发器
    @Bean
    public Trigger triggerGcNoticeandfileSchedulSchedul() {
        return TriggerBuilder.newTrigger()
                .withIdentity("triggerGcNoticeandfileSchedulSchedul", "groupGcNoticeandfileSchedul")
                .withSchedule(CronScheduleBuilder.cronSchedule(this.strSron))
                .forJob(jobGcNoticeandfileSchedul())
                .build();
    }



    @Bean
    public JobDetail jobGcPerformanceSchedul() {
        return JobBuilder.newJob(GcPerformanceSchedul.class).storeDurably().build();
    }
    //触发器
    @Bean
    public Trigger triggerGcPerformanceSchedul() {
        return TriggerBuilder.newTrigger()
                .withIdentity("triggerGcPerformanceSchedul", "groupGcPerformanceSchedul")
                .withSchedule(CronScheduleBuilder.cronSchedule(this.strSron))
                .forJob(jobGcPerformanceSchedul())
                .build();
    }



    @Bean
    public JobDetail jobGcPubContractSchedul() {
        return JobBuilder.newJob(GcPubContractSchedul.class).storeDurably().build();
    }
    //触发器
    @Bean
    public Trigger triggerGcPubContractSchedul() {
        return TriggerBuilder.newTrigger()
                .withIdentity("triggerGcPubContractSchedul", "groupGcPubContractSchedul")
                .withSchedule(CronScheduleBuilder.cronSchedule(this.strSron))
                .forJob(jobGcPubContractSchedul())
                .build();
    }


    @Bean
    public JobDetail jobGcTenderbidfileSchedul() {
        return JobBuilder.newJob(GcTenderbidfileSchedul.class).storeDurably().build();
    }
    //触发器
    @Bean
    public Trigger triggerGcTenderbidfileSchedul() {
        return TriggerBuilder.newTrigger()
                .withIdentity("triggerGcPubContractSchedul", "groupGcTenderbidfileSchedul")
                .withSchedule(CronScheduleBuilder.cronSchedule(this.strSron))
                .forJob(jobGcTenderbidfileSchedul())
                .build();
    }


    @Bean
    public JobDetail jobZrzyTdBidwinnoticeSchedul() {
        return JobBuilder.newJob(ZrzyTdBidwinnoticeSchedul.class).storeDurably().build();
    }
    //触发器
    @Bean
    public Trigger triggerZrzyTdBidwinnoticeSchedul() {
        return TriggerBuilder.newTrigger()
                .withIdentity("triggerZrzyTdBidwinnoticeSchedul", "groupZrzyTdBidwinnoticeSchedul")
                .withSchedule(CronScheduleBuilder.cronSchedule(this.strSron))
                .forJob(jobZrzyTdBidwinnoticeSchedul())
                .build();
    }

    @Bean
    public JobDetail jobZrzyTdCedeNoticeSchedul() {
        return JobBuilder.newJob(ZrzyTdCedeNoticeSchedul.class).storeDurably().build();
    }
    //触发器
    @Bean
    public Trigger triggerZrzyTdCedeNoticeSchedul() {
        return TriggerBuilder.newTrigger()
                .withIdentity("triggerZrzyTdCedeNoticeSchedul", "groupZrzyTdCedeNoticeSchedul")
                .withSchedule(CronScheduleBuilder.cronSchedule(this.strSron))
                .forJob(jobZrzyTdCedeNoticeSchedul())
                .build();
    }
*/
}