package com.njcn.executor.handler;

import com.njcn.common.pojo.constant.BizParamConstant;
import com.njcn.executor.utils.CommonExecutorUtils;
import com.njcn.prepare.harmonic.api.newalgorithm.RMpEventDetailFeignClient;
import com.njcn.prepare.harmonic.api.newalgorithm.RMpMonitorEvaluateFeignClient;
import com.njcn.prepare.harmonic.pojo.param.LineParam;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * 类的介绍：
 *
 * @author xuyang
 * @version 1.0.0
 * @createTime 2023/7/26 9:30
 */
@Slf4j
@Component
@RequiredArgsConstructor
public class RMpEventDetailJob {

    private final RMpEventDetailFeignClient rMpEventDetailFeignClient;

    @XxlJob("rMpEventDetailDay")
    public void rMpEventDetailDay(){
        log.info(LocalDateTime.now()+"监测点暂态指标处理调度开始------------------------");
        LineParam lineParam = new LineParam();
        lineParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_DAY));
        //lineParam.setDataDate(CommonExecutorUtils.prepareTimeDeal(BizParamConstant.STAT_BIZ_DAY));
        //lineParam.setDataSource(2);
        CommonExecutorUtils.commDefineDate(BizParamConstant.STAT_BIZ_DAY,lineParam);
        rMpEventDetailFeignClient.eventdetailHandler(lineParam);
    }

}
