调度任务api模块
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
package com.njcn.executor.handler;
|
||||
|
||||
|
||||
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
|
||||
* 畸变率
|
||||
* @author cdf
|
||||
* @date 2022/10/24
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class HarmAberrationRateJob {
|
||||
|
||||
private final DistortionRateFeignClient distortionRateFeignClient;
|
||||
|
||||
@XxlJob("harmAberrationRateHandler")
|
||||
public void harmAberrationRateHandler(){
|
||||
long a = System.currentTimeMillis();
|
||||
|
||||
String command = XxlJobHelper.getJobParam();
|
||||
LineParam lineParam = new LineParam();
|
||||
lineParam.setType(Integer.valueOf(command));
|
||||
|
||||
String date = CommonExecutorUtils.prepareTimeDeal(command);
|
||||
//date = "2022-10-26";
|
||||
lineParam.setDataDate(date);
|
||||
distortionRateFeignClient.distortionRate(lineParam);
|
||||
long b = System.currentTimeMillis();
|
||||
System.out.println("时间"+(b-a)/1000);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,29 +1,36 @@
|
||||
//package com.njcn.executor.handler;
|
||||
//
|
||||
//import com.njcn.prepare.harmonic.api.line.NormalLimitFeignClient;
|
||||
//import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
//import lombok.RequiredArgsConstructor;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//import org.springframework.stereotype.Component;
|
||||
//
|
||||
//
|
||||
///**
|
||||
// * pqs
|
||||
// * 告警异常
|
||||
// *
|
||||
// * @author cdf
|
||||
// * @date 2022/4/7
|
||||
// */
|
||||
//@Slf4j
|
||||
//@Component
|
||||
//@RequiredArgsConstructor
|
||||
//public class HarmAlarmDetailJob {
|
||||
//
|
||||
// private final NormalLimitFeignClient normalLimitFeignClient;
|
||||
//
|
||||
// @XxlJob("harmAlarmDetailJob")
|
||||
// public void harmAlarmDetailJob() {
|
||||
// normalLimitFeignClient.getNormLimitData();
|
||||
// }
|
||||
//
|
||||
//}
|
||||
package com.njcn.executor.handler;
|
||||
|
||||
import com.njcn.executor.utils.CommonExecutorUtils;
|
||||
import com.njcn.prepare.harmonic.api.line.NormalLimitFeignClient;
|
||||
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
|
||||
* 告警异常
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class HarmAlarmDetailJob {
|
||||
|
||||
private final NormalLimitFeignClient normalLimitFeignClient;
|
||||
|
||||
@XxlJob("harmAlarmDetailJob")
|
||||
public void harmAlarmDetailJob(){
|
||||
|
||||
String command = XxlJobHelper.getJobParam();
|
||||
LineParam lineParam = new LineParam();
|
||||
lineParam.setType(Integer.valueOf(command));
|
||||
|
||||
String date = CommonExecutorUtils.prepareTimeDeal(command);
|
||||
//date = "2022-10-26";
|
||||
lineParam.setDataDate(date);
|
||||
normalLimitFeignClient.getNormLimitData(lineParam);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user