预处理模块添加异步处理
This commit is contained in:
@@ -233,7 +233,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (Integer.parseInt(contion) != 60 || Integer.parseInt(contion) != 61 || Integer.parseInt(contion) != 62) {
|
if (!Integer.valueOf(contion).equals(60) && !Integer.valueOf(contion).equals(61) && !Integer.valueOf(contion).equals(62)) {
|
||||||
stringBuilder.append(" and ").append(InfluxDBPublicParam.VALUETYPE + "='").append(valueTypeName).append("'");
|
stringBuilder.append(" and ").append(InfluxDBPublicParam.VALUETYPE + "='").append(valueTypeName).append("'");
|
||||||
}
|
}
|
||||||
String sql = "";
|
String sql = "";
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
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.HarmonicGeneralFeignClient;
|
||||||
|
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||||
|
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/11/11
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class HarmComprehensiveAssessJob {
|
||||||
|
|
||||||
|
private final HarmonicGeneralFeignClient harmonicGeneralFeignClient;
|
||||||
|
|
||||||
|
@XxlJob("comprehensiveAssessHandler")
|
||||||
|
public void comprehensiveAssessHandler(){
|
||||||
|
|
||||||
|
LineParam lineParam = new LineParam();
|
||||||
|
lineParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_DAY));
|
||||||
|
lineParam.setDataDate(CommonExecutorUtils.prepareTimeDeal(BizParamConstant.STAT_BIZ_DAY));
|
||||||
|
|
||||||
|
//下面测试数据部署需删除
|
||||||
|
//lineParam.setDataDate("2022-10-27");
|
||||||
|
harmonicGeneralFeignClient.generalData(lineParam);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -28,7 +28,6 @@ public class HarmCustomReportJob {
|
|||||||
|
|
||||||
@XxlJob("harmCustomReportHandler")
|
@XxlJob("harmCustomReportHandler")
|
||||||
public void harmCustomReportHandler(){
|
public void harmCustomReportHandler(){
|
||||||
long a = System.currentTimeMillis();
|
|
||||||
|
|
||||||
String command = XxlJobHelper.getJobParam();
|
String command = XxlJobHelper.getJobParam();
|
||||||
LineParam lineParam = new LineParam();
|
LineParam lineParam = new LineParam();
|
||||||
@@ -38,8 +37,6 @@ public class HarmCustomReportJob {
|
|||||||
//date = "2022-10-26";
|
//date = "2022-10-26";
|
||||||
lineParam.setDataDate(date);
|
lineParam.setDataDate(date);
|
||||||
coustmReportFeignClient.batchReport(lineParam);
|
coustmReportFeignClient.batchReport(lineParam);
|
||||||
long b = System.currentTimeMillis();
|
|
||||||
System.out.println("时间"+(b-a)/1000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
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.HarmonicGeneralFeignClient;
|
||||||
|
import com.njcn.prepare.harmonic.api.line.HarmonicMetricFeignClient;
|
||||||
|
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||||
|
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/11/11
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class HarmKpiAssessJob {
|
||||||
|
|
||||||
|
private final HarmonicMetricFeignClient harmonicMetricFeignClient;
|
||||||
|
|
||||||
|
@XxlJob("kpiAssessHandler")
|
||||||
|
public void kpiAssessHandler(){
|
||||||
|
|
||||||
|
LineParam lineParam = new LineParam();
|
||||||
|
lineParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_DAY));
|
||||||
|
lineParam.setDataDate(CommonExecutorUtils.prepareTimeDeal(BizParamConstant.STAT_BIZ_DAY));
|
||||||
|
|
||||||
|
//下面测试数据部署需删除
|
||||||
|
//lineParam.setDataDate("2022-10-27");
|
||||||
|
harmonicMetricFeignClient.metricData(lineParam);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -18,6 +18,8 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author denghuajun
|
* @author denghuajun
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
@@ -37,12 +39,7 @@ public class NormalLimitController extends BaseController {
|
|||||||
@ApiOperation("告警数据预处理")
|
@ApiOperation("告警数据预处理")
|
||||||
public HttpResult<String> getNormLimitData(@RequestBody LineParam lineParam) {
|
public HttpResult<String> getNormLimitData(@RequestBody LineParam lineParam) {
|
||||||
String methodDescribe = getMethodDescribe("getNormLimitData");
|
String methodDescribe = getMethodDescribe("getNormLimitData");
|
||||||
try {
|
normLimitService.AbnormalLineData(lineParam);
|
||||||
normLimitService.AbnormalLineData(lineParam);
|
|
||||||
}catch (Exception e){
|
|
||||||
e.printStackTrace();
|
|
||||||
log.error("告警数据预处理异常:"+e.getMessage());
|
|
||||||
}
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import org.influxdb.impl.InfluxDBResultMapper;
|
|||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.BeanWrapper;
|
import org.springframework.beans.BeanWrapper;
|
||||||
import org.springframework.beans.BeanWrapperImpl;
|
import org.springframework.beans.BeanWrapperImpl;
|
||||||
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
@@ -72,6 +73,7 @@ public class DayDataServiceImpl implements DayDataService {
|
|||||||
@Transactional(
|
@Transactional(
|
||||||
rollbackFor = {Exception.class}
|
rollbackFor = {Exception.class}
|
||||||
)
|
)
|
||||||
|
@Async("asyncExecutor")
|
||||||
public void dayDataJobHandler(List<String> indexLists, String startTime, String endTime) {
|
public void dayDataJobHandler(List<String> indexLists, String startTime, String endTime) {
|
||||||
|
|
||||||
|
|
||||||
@@ -3071,13 +3073,13 @@ public class DayDataServiceImpl implements DayDataService {
|
|||||||
|
|
||||||
return result ;
|
return result ;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @Description: packageRMpInharmonicIRateReportDPO
|
* @Description: packageRMpInharmonicIRateReportDPO
|
||||||
* @Param: [dataInHarmRateIPO, PhaseType]
|
* @Param: [dataInHarmRateIPO, PhaseType]
|
||||||
* @return: com.njcn.prepare.harmonic.pojo.po.line.RMpInharmonicIRateReportDPO
|
* @return: com.njcn.prepare.harmonic.pojo.po.line.RMpInharmonicIRateReportDPO
|
||||||
* @Author: clam
|
* @Author: clam
|
||||||
* @Date: 2022/10/26
|
* @Date: 2022/10/26
|
||||||
*/
|
*/
|
||||||
private RMpInharmonicIRateReportDPO packageRMpInharmonicIRateReportDPO(List<DataInHarmRateIPO> dataInHarmRateIPO, String PhaseType) {
|
private RMpInharmonicIRateReportDPO packageRMpInharmonicIRateReportDPO(List<DataInHarmRateIPO> dataInHarmRateIPO, String PhaseType) {
|
||||||
RMpInharmonicIRateReportDPO result = null;
|
RMpInharmonicIRateReportDPO result = null;
|
||||||
|
|
||||||
@@ -3117,13 +3119,13 @@ public class DayDataServiceImpl implements DayDataService {
|
|||||||
return result ;
|
return result ;
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @Description: packageRMpInharmonicIMagReportDPO
|
* @Description: packageRMpInharmonicIMagReportDPO
|
||||||
* @Param: [dataInHarmIPO, PhaseType]
|
* @Param: [dataInHarmIPO, PhaseType]
|
||||||
* @return: com.njcn.prepare.harmonic.pojo.po.line.RMpInharmonicIMagReportDPO
|
* @return: com.njcn.prepare.harmonic.pojo.po.line.RMpInharmonicIMagReportDPO
|
||||||
* @Author: clam
|
* @Author: clam
|
||||||
* @Date: 2022/10/27
|
* @Date: 2022/10/27
|
||||||
*/
|
*/
|
||||||
private RMpInharmonicIMagReportDPO packageRMpInharmonicIMagReportDPO(List<DataInHarmIPO> dataInHarmIPO, String PhaseType) {
|
private RMpInharmonicIMagReportDPO packageRMpInharmonicIMagReportDPO(List<DataInHarmIPO> dataInHarmIPO, String PhaseType) {
|
||||||
|
|
||||||
RMpInharmonicIMagReportDPO result = null;
|
RMpInharmonicIMagReportDPO result = null;
|
||||||
@@ -3164,14 +3166,14 @@ public class DayDataServiceImpl implements DayDataService {
|
|||||||
return result ;
|
return result ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: packageRMpInharmonicVRateReportDPO
|
* @Description: packageRMpInharmonicVRateReportDPO
|
||||||
* @Param: [dataInHarmRateVPO, PhaseType]
|
* @Param: [dataInHarmRateVPO, PhaseType]
|
||||||
* @return: com.njcn.prepare.harmonic.pojo.po.line.RMpInharmonicVRateReportDPO
|
* @return: com.njcn.prepare.harmonic.pojo.po.line.RMpInharmonicVRateReportDPO
|
||||||
* @Author: clam
|
* @Author: clam
|
||||||
* @Date: 2022/10/27
|
* @Date: 2022/10/27
|
||||||
*/
|
*/
|
||||||
private RMpInharmonicVRateReportDPO packageRMpInharmonicVRateReportDPO(List<DataInHarmRateVPO> dataInHarmRateVPO, String PhaseType) {
|
private RMpInharmonicVRateReportDPO packageRMpInharmonicVRateReportDPO(List<DataInHarmRateVPO> dataInHarmRateVPO, String PhaseType) {
|
||||||
|
|
||||||
RMpInharmonicVRateReportDPO result = null ;
|
RMpInharmonicVRateReportDPO result = null ;
|
||||||
@@ -3212,13 +3214,13 @@ public class DayDataServiceImpl implements DayDataService {
|
|||||||
return result ;
|
return result ;
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @Description: packageRMpHarmonicPReportDPO
|
* @Description: packageRMpHarmonicPReportDPO
|
||||||
* @Param: [dataHarmPowerPPO, dataHarmPowerQPO, PhaseType]
|
* @Param: [dataHarmPowerPPO, dataHarmPowerQPO, PhaseType]
|
||||||
* @return: com.njcn.prepare.harmonic.pojo.po.line.RMpHarmonicPReportDPO
|
* @return: com.njcn.prepare.harmonic.pojo.po.line.RMpHarmonicPReportDPO
|
||||||
* @Author: clam
|
* @Author: clam
|
||||||
* @Date: 2022/10/28
|
* @Date: 2022/10/28
|
||||||
*/
|
*/
|
||||||
private RMpHarmonicPReportDPO packageRMpHarmonicPReportDPO(List<DataHarmPowerPPO> dataHarmPowerPPO, List<DataHarmPowerQPO> dataHarmPowerQPO, String PhaseType) {
|
private RMpHarmonicPReportDPO packageRMpHarmonicPReportDPO(List<DataHarmPowerPPO> dataHarmPowerPPO, List<DataHarmPowerQPO> dataHarmPowerQPO, String PhaseType) {
|
||||||
|
|
||||||
RMpHarmonicPReportDPO result = null ;
|
RMpHarmonicPReportDPO result = null ;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import lombok.AllArgsConstructor;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.influxdb.dto.QueryResult;
|
import org.influxdb.dto.QueryResult;
|
||||||
import org.influxdb.impl.InfluxDBResultMapper;
|
import org.influxdb.impl.InfluxDBResultMapper;
|
||||||
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@@ -39,6 +40,7 @@ public class DistortionRateServiceImpl implements DistortionRateService {
|
|||||||
private final RMpVThdMapper rMpVThdMapper;
|
private final RMpVThdMapper rMpVThdMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Async("asyncExecutor")
|
||||||
public void distortionRate(LineParam lineParam) {
|
public void distortionRate(LineParam lineParam) {
|
||||||
List<String> lineIdOutList;
|
List<String> lineIdOutList;
|
||||||
if (CollUtil.isEmpty(lineParam.getLineIds())){
|
if (CollUtil.isEmpty(lineParam.getLineIds())){
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import org.influxdb.dto.BatchPoints;
|
|||||||
import org.influxdb.dto.Point;
|
import org.influxdb.dto.Point;
|
||||||
import org.influxdb.dto.QueryResult;
|
import org.influxdb.dto.QueryResult;
|
||||||
import org.influxdb.impl.InfluxDBResultMapper;
|
import org.influxdb.impl.InfluxDBResultMapper;
|
||||||
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@@ -40,6 +41,7 @@ public class HarmonicGeneralServiceImpl implements HarmonicGeneralService {
|
|||||||
private final LineFeignClient lineFeignClient;
|
private final LineFeignClient lineFeignClient;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Async("asyncExecutor")
|
||||||
public void generalData(LineParam lineParam) {
|
public void generalData(LineParam lineParam) {
|
||||||
List<String> lineIdOutList;
|
List<String> lineIdOutList;
|
||||||
if (CollUtil.isEmpty(lineParam.getLineIds())){
|
if (CollUtil.isEmpty(lineParam.getLineIds())){
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import org.influxdb.dto.BatchPoints;
|
|||||||
import org.influxdb.dto.Point;
|
import org.influxdb.dto.Point;
|
||||||
import org.influxdb.dto.QueryResult;
|
import org.influxdb.dto.QueryResult;
|
||||||
import org.influxdb.impl.InfluxDBResultMapper;
|
import org.influxdb.impl.InfluxDBResultMapper;
|
||||||
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -38,6 +39,7 @@ public class HarmonicMetricServiceImpl implements HarmonicMetricService {
|
|||||||
private final LineFeignClient lineFeignClient;
|
private final LineFeignClient lineFeignClient;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Async("asyncExecutor")
|
||||||
public void metricData(LineParam lineParam) {
|
public void metricData(LineParam lineParam) {
|
||||||
List<String> lineIdList;
|
List<String> lineIdList;
|
||||||
if (CollUtil.isEmpty(lineParam.getLineIds())){
|
if (CollUtil.isEmpty(lineParam.getLineIds())){
|
||||||
@@ -85,4 +87,4 @@ public class HarmonicMetricServiceImpl implements HarmonicMetricService {
|
|||||||
private List<Overlimit> getAllLineData() {
|
private List<Overlimit> getAllLineData() {
|
||||||
return lineFeignClient.getAllLineOverLimit("harmonic-boot","").getData();
|
return lineFeignClient.getAllLineOverLimit("harmonic-boot","").getData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import org.influxdb.dto.BatchPoints;
|
|||||||
import org.influxdb.dto.Point;
|
import org.influxdb.dto.Point;
|
||||||
import org.influxdb.dto.QueryResult;
|
import org.influxdb.dto.QueryResult;
|
||||||
import org.influxdb.impl.InfluxDBResultMapper;
|
import org.influxdb.impl.InfluxDBResultMapper;
|
||||||
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -42,6 +43,7 @@ public class IntegrityServiceImpl implements IntegrityService {
|
|||||||
private final LineFeignClient lineFeignClient;
|
private final LineFeignClient lineFeignClient;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Async("asyncExecutor")
|
||||||
public String computeDataIntegrity(LineParam lineParam) {
|
public String computeDataIntegrity(LineParam lineParam) {
|
||||||
List<LineDetail> lineDetailList;
|
List<LineDetail> lineDetailList;
|
||||||
if (CollUtil.isEmpty(lineParam.getLineIds())){
|
if (CollUtil.isEmpty(lineParam.getLineIds())){
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import org.influxdb.dto.Point;
|
|||||||
import org.influxdb.dto.QueryResult;
|
import org.influxdb.dto.QueryResult;
|
||||||
import org.influxdb.impl.InfluxDBResultMapper;
|
import org.influxdb.impl.InfluxDBResultMapper;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
@@ -64,6 +65,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
|||||||
rollbackFor = {Exception.class}
|
rollbackFor = {Exception.class}
|
||||||
)
|
)
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
|
@Async("asyncExecutor")
|
||||||
public List<LimitRatePO> limitRateJobHandler(List<String> lineList, String startTime, String endTime) {
|
public List<LimitRatePO> limitRateJobHandler(List<String> lineList, String startTime, String endTime) {
|
||||||
List<LimitRatePO> limitRates = new ArrayList<> ();
|
List<LimitRatePO> limitRates = new ArrayList<> ();
|
||||||
List<LimitRate> limitRateList = new ArrayList<> ();
|
List<LimitRate> limitRateList = new ArrayList<> ();
|
||||||
@@ -1199,13 +1201,13 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 插入influxdb
|
* @Description: 插入influxdb
|
||||||
* @Param: [list, time]
|
* @Param: [list, time]
|
||||||
* @return: void
|
* @return: void
|
||||||
* @Author: clam
|
* @Author: clam
|
||||||
* @Date: 2022/10/21
|
* @Date: 2022/10/21
|
||||||
*/
|
*/
|
||||||
private void insert(List<LimitRate> list, long time){
|
private void insert(List<LimitRate> list, long time){
|
||||||
List<String> records = new ArrayList<>();
|
List<String> records = new ArrayList<>();
|
||||||
list.forEach(item->{
|
list.forEach(item->{
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import org.influxdb.dto.BatchPoints;
|
|||||||
import org.influxdb.dto.Point;
|
import org.influxdb.dto.Point;
|
||||||
import org.influxdb.dto.QueryResult;
|
import org.influxdb.dto.QueryResult;
|
||||||
import org.influxdb.impl.InfluxDBResultMapper;
|
import org.influxdb.impl.InfluxDBResultMapper;
|
||||||
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -34,6 +35,7 @@ public class LimitTargetServiceImpl implements LimitTargetService {
|
|||||||
private final InfluxDbUtils influxDbUtils;
|
private final InfluxDbUtils influxDbUtils;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Async("asyncExecutor")
|
||||||
public void getLimitTargetData(LineParam lineParam) {
|
public void getLimitTargetData(LineParam lineParam) {
|
||||||
List<String> records;
|
List<String> records;
|
||||||
Date dateOut = DateUtil.parse(lineParam.getDataDate());
|
Date dateOut = DateUtil.parse(lineParam.getDataDate());
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import com.njcn.prepare.harmonic.service.line.NormalLimitService;
|
|||||||
import com.njcn.web.utils.RequestUtil;
|
import com.njcn.web.utils.RequestUtil;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import org.influxdb.dto.QueryResult;
|
import org.influxdb.dto.QueryResult;
|
||||||
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
@@ -1187,6 +1188,7 @@ public class NormalLimitServiceImpl extends ServiceImpl<AbnormalMapper, MpSurplu
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Async("asyncExecutor")
|
||||||
public Boolean AbnormalLineData(LineParam lineParam) {
|
public Boolean AbnormalLineData(LineParam lineParam) {
|
||||||
|
|
||||||
List<String> lineIds = new ArrayList<>();
|
List<String> lineIds = new ArrayList<>();
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import org.influxdb.dto.BatchPoints;
|
|||||||
import org.influxdb.dto.Point;
|
import org.influxdb.dto.Point;
|
||||||
import org.influxdb.dto.QueryResult;
|
import org.influxdb.dto.QueryResult;
|
||||||
import org.influxdb.impl.InfluxDBResultMapper;
|
import org.influxdb.impl.InfluxDBResultMapper;
|
||||||
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@@ -44,6 +45,7 @@ public class OnlineRateServiceImpl implements OnlineRateService {
|
|||||||
private final LineFeignClient lineFeignClient;
|
private final LineFeignClient lineFeignClient;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Async("asyncExecutor")
|
||||||
public void getOnlineRateData(LineParam lineParam) {
|
public void getOnlineRateData(LineParam lineParam) {
|
||||||
List<String> lineIdList = lineParam.getLineIds();
|
List<String> lineIdList = lineParam.getLineIds();
|
||||||
if (CollUtil.isEmpty(lineParam.getLineIds())){
|
if (CollUtil.isEmpty(lineParam.getLineIds())){
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import lombok.AllArgsConstructor;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.influxdb.dto.QueryResult;
|
import org.influxdb.dto.QueryResult;
|
||||||
import org.influxdb.impl.InfluxDBResultMapper;
|
import org.influxdb.impl.InfluxDBResultMapper;
|
||||||
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@@ -76,6 +77,7 @@ public class PollutionServiceImpl implements PollutionService {
|
|||||||
private final RMpPollutionDMapper rMpPollutionDMapper;
|
private final RMpPollutionDMapper rMpPollutionDMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Async("asyncExecutor")
|
||||||
public void processPollutionData(LineParam lineParam) {
|
public void processPollutionData(LineParam lineParam) {
|
||||||
TimeInterval timer = new TimeInterval();
|
TimeInterval timer = new TimeInterval();
|
||||||
List<PollutionDTO> pollutionList;
|
List<PollutionDTO> pollutionList;
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import org.apache.commons.fileupload.disk.DiskFileItemFactory;
|
|||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.influxdb.dto.QueryResult;
|
import org.influxdb.dto.QueryResult;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.multipart.commons.CommonsMultipartFile;
|
import org.springframework.web.multipart.commons.CommonsMultipartFile;
|
||||||
@@ -72,6 +73,7 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Async("asyncExecutor")
|
||||||
public boolean batchReport(LineParam reportParam) {
|
public boolean batchReport(LineParam reportParam) {
|
||||||
|
|
||||||
//查询所有已激活模板
|
//查询所有已激活模板
|
||||||
|
|||||||
Reference in New Issue
Block a user