package com.njcn.executor.handler;


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

/**
 * pqs
 * 畸变率(mysql)
 * @author cdf
 * @date 2022/10/24
 */
@Slf4j
@Component
@RequiredArgsConstructor
public class HarmAberrationRateJob {

    private final DistortionRateFeignClient distortionRateFeignClient;

    @XxlJob("harmAberrationRateHandler")
    public void harmAberrationRateHandler(){

        LineParam lineParam = new LineParam();
        lineParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_DAY));
        String date = CommonExecutorUtils.prepareTimeDeal(BizParamConstant.STAT_BIZ_DAY);
        //date = "2022-10-26";
        //lineParam.setDataDate(date);
        //lineParam.setDataSource(1);
        CommonExecutorUtils.commDefineDate(BizParamConstant.STAT_BIZ_DAY,lineParam);
        distortionRateFeignClient.harmonicThdDay(lineParam);

    }

}
