定时任务修改
This commit is contained in:
@@ -1,23 +0,0 @@
|
|||||||
package com.njcn.system.timer.tasks;
|
|
||||||
|
|
||||||
import com.njcn.prepare.harmonic.api.event.RActivePowerRangeFeignClient;
|
|
||||||
import com.njcn.system.timer.TimerTaskRunner;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 有功功率趋势算法执行定时任务
|
|
||||||
* @author guofeihu
|
|
||||||
* @date 2024/8/21
|
|
||||||
*/
|
|
||||||
@Component
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class RActivePowerRangeTaskRunner implements TimerTaskRunner {
|
|
||||||
|
|
||||||
private final RActivePowerRangeFeignClient rActivePowerRangeFeignClient;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void action(String date) {
|
|
||||||
rActivePowerRangeFeignClient.record(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
package com.njcn.system.timer.tasks;
|
|
||||||
|
|
||||||
import com.njcn.prepare.harmonic.api.event.SpThroughFeignClient;
|
|
||||||
import com.njcn.system.timer.TimerTaskRunner;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 高低电压穿越算法执行定时任务
|
|
||||||
* @author guofeihu
|
|
||||||
* @date 2024/8/21
|
|
||||||
*/
|
|
||||||
@Component
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class SpThroughTaskRunner implements TimerTaskRunner {
|
|
||||||
|
|
||||||
private final SpThroughFeignClient spThroughFeignClient;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void action(String date) {
|
|
||||||
spThroughFeignClient.record();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.njcn.system.timer.tasks;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DatePattern;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.njcn.algorithm.pojo.bo.BaseParam;
|
||||||
|
import com.njcn.algorithm.pojo.liteflow.LiteFlowAlgorithmFeignClient;
|
||||||
|
import com.njcn.system.timer.TimerTaskRunner;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 有功功率趋势算法执行定时任务
|
||||||
|
* @author guofeihu
|
||||||
|
* @date 2024/8/21
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class SpecialAnalysisTaskRunner implements TimerTaskRunner {
|
||||||
|
|
||||||
|
private final LiteFlowAlgorithmFeignClient liteFlowAlgorithmFeignClient;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void action(String date) {
|
||||||
|
BaseParam baseParam = new BaseParam();
|
||||||
|
baseParam.setFullChain(true);
|
||||||
|
baseParam.setRepair(false);
|
||||||
|
if(StrUtil.isBlank(date)){
|
||||||
|
baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
|
||||||
|
}else {
|
||||||
|
baseParam.setDataDate(date);
|
||||||
|
}
|
||||||
|
liteFlowAlgorithmFeignClient.specialAnalysisExecutor(baseParam);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user