调度任务api模块

This commit is contained in:
2022-11-08 09:59:07 +08:00
parent edb5ba2b09
commit 6a3a05d45f
81 changed files with 24428 additions and 34 deletions

View File

@@ -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);
}
}

View File

@@ -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);
}
}