算法对外接口添加
This commit is contained in:
@@ -61,4 +61,22 @@ public class LiteFlowJob {
|
||||
liteFlowFeignClient.deviceExecutor(baseParam);
|
||||
}
|
||||
|
||||
@XxlJob("pmsDimJob")
|
||||
public void pmsDimJob() {
|
||||
BaseParam baseParam = new BaseParam();
|
||||
baseParam.setFullChain(true);
|
||||
baseParam.setRepair(false);
|
||||
baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
|
||||
liteFlowFeignClient.pmsDimExecutor(baseParam);
|
||||
}
|
||||
|
||||
@XxlJob("generaTrixJob")
|
||||
public void generaTrixJob() {
|
||||
BaseParam baseParam = new BaseParam();
|
||||
baseParam.setFullChain(true);
|
||||
baseParam.setRepair(false);
|
||||
baseParam.setDataDate(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
|
||||
liteFlowFeignClient.generaTrixExecutor(baseParam);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package com.njcn.prepare.harmonic.api.liteflow;
|
||||
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.prepare.harmonic.api.liteflow.fallback.LiteFlowFeignClientFallbackFactory;
|
||||
import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@@ -35,4 +38,11 @@ public interface LiteFlowFeignClient {
|
||||
@PostMapping("/deviceExecutor")
|
||||
void deviceExecutor(@RequestBody BaseParam baseParam);
|
||||
|
||||
@ApiOperation("pms变电站母线算法执行链")
|
||||
@PostMapping("/pmsdimexecutor")
|
||||
void pmsDimExecutor(@RequestBody BaseParam baseParam);
|
||||
|
||||
@ApiOperation("母线算法执行链(主网测点)")
|
||||
@PostMapping("/generaTrixExecutor")
|
||||
void generaTrixExecutor(@RequestBody BaseParam baseParam);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,18 @@ public class LiteFlowFeignClientFallbackFactory implements FallbackFactory<LiteF
|
||||
log.error("{}异常,降级处理,异常为:{}", "装置算法执行链: ", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pmsDimExecutor(BaseParam baseParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "pms变电站母线算法执行链: ", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generaTrixExecutor(BaseParam baseParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "母线算法执行链(主网测点): ", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user