8 Commits

17 changed files with 553 additions and 280 deletions

View File

@@ -4,26 +4,29 @@ import com.njcn.device.biz.pojo.po.Overlimit;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.CompletableFuture;
public interface IDataLimitRateAsync { public interface IDataLimitRateAsync {
/** /**
* limit_rate多线程算法 * limit_rate多线程算法
*
* @param dataDate * @param dataDate
* @param list * @param list
* @param phase * @param phase
* @param overLimitMap * @param overLimitMap
* @param size * @param size
* @param i * @param i
* @param type 系统类型 * @param type 系统类型
* @return
* @Author: wr * @Author: wr
* @Date: 2025/12/17 12:16 * @Date: 2025/12/17 12:16
*/ */
void lineDataRate(String dataDate, CompletableFuture<Void> lineDataRate(String dataDate,
List<String> list, List<String> list,
List<String> phase, List<String> phase,
Map<String, Overlimit> overLimitMap, Map<String, Overlimit> overLimitMap,
int size, int size,
int i, int i,
int type); int type);
} }

View File

@@ -22,6 +22,7 @@ import org.springframework.stereotype.Component;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@@ -64,9 +65,13 @@ public class DayDataServiceImpl implements IDayDataService {
private DataInharmVFeignClient dataInharmVFeignClient; private DataInharmVFeignClient dataInharmVFeignClient;
@Resource @Resource
private DataPltFeignClient dataPltFeignClient; private DataPltFeignClient dataPltFeignClient;
@Resource @Resource
private PqDataVerifyFeignClient pqDataVerifyFeignClient; private PqDataVerifyFeignClient pqDataVerifyFeignClient;
/**
* 查询配置 辽宁版本比较特殊没有CP95值采用平均值进行判断
*/
@Value("${version.used:master}")
private String versionUsed;
@Override @Override
public void dataVHandler(CalculatedParam calculatedParam) { public void dataVHandler(CalculatedParam calculatedParam) {
@@ -102,7 +107,8 @@ public class DayDataServiceImpl implements IDayDataService {
dto.setPhasicType(item2.getPhasicType()); dto.setPhasicType(item2.getPhasicType());
dto.setValueType(item3.getValueType().toUpperCase()); dto.setValueType(item3.getValueType().toUpperCase());
dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag()); dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag());
channelDataVHandler(item3,valueTypes,dto,true); //默认CP95值取 CP95的最大值如果有特殊要求可以根据平均值的数据取CP95
channelDataVHandler(item3,valueTypes,dto,!Objects.equals(versionUsed, "liaoning"));
result.add(dto); result.add(dto);
}); });
}); });
@@ -150,7 +156,7 @@ public class DayDataServiceImpl implements IDayDataService {
dto.setPhasicType(item2.getPhasicType()); dto.setPhasicType(item2.getPhasicType());
dto.setValueType(item3.getValueType().toUpperCase()); dto.setValueType(item3.getValueType().toUpperCase());
dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag()); dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag());
channelDataIHandler(item3,valueTypes,dto,true); channelDataIHandler(item3,valueTypes,dto,!Objects.equals(versionUsed, "liaoning"));
result.add(dto); result.add(dto);
}); });
}); });
@@ -198,7 +204,7 @@ public class DayDataServiceImpl implements IDayDataService {
dto.setPhasicType(item2.getPhasicType()); dto.setPhasicType(item2.getPhasicType());
dto.setValueType(item4.toUpperCase()); dto.setValueType(item4.toUpperCase());
dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag()); dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag());
channelDataFlickerHandler(item3,dto,item4,true); channelDataFlickerHandler(item3,dto,item4,!Objects.equals(versionUsed, "liaoning"));
result.add(dto); result.add(dto);
}); });
}); });
@@ -247,7 +253,7 @@ public class DayDataServiceImpl implements IDayDataService {
dto.setPhasicType(item2.getPhasicType()); dto.setPhasicType(item2.getPhasicType());
dto.setValueType(item4.toUpperCase()); dto.setValueType(item4.toUpperCase());
dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag()); dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag());
channelDataFlucHandler(item3,dto,item4,true); channelDataFlucHandler(item3,dto,item4,!Objects.equals(versionUsed, "liaoning"));
result.add(dto); result.add(dto);
}); });
}); });
@@ -296,7 +302,7 @@ public class DayDataServiceImpl implements IDayDataService {
dto.setPhasicType(item2.getPhasicType()); dto.setPhasicType(item2.getPhasicType());
dto.setValueType(item3.getValueType().toUpperCase()); dto.setValueType(item3.getValueType().toUpperCase());
dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag()); dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag());
channelDataHarmPhasicIHandler(item3,valueTypes,dto,true); channelDataHarmPhasicIHandler(item3,valueTypes,dto,!Objects.equals(versionUsed, "liaoning"));
result.add(dto); result.add(dto);
}); });
}); });
@@ -344,7 +350,7 @@ public class DayDataServiceImpl implements IDayDataService {
dto.setPhasicType(item2.getPhasicType()); dto.setPhasicType(item2.getPhasicType());
dto.setValueType(item3.getValueType().toUpperCase()); dto.setValueType(item3.getValueType().toUpperCase());
dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag()); dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag());
channelDataHarmPhasicVHandler(item3,valueTypes,dto,true); channelDataHarmPhasicVHandler(item3,valueTypes,dto,!Objects.equals(versionUsed, "liaoning"));
result.add(dto); result.add(dto);
}); });
}); });
@@ -392,7 +398,7 @@ public class DayDataServiceImpl implements IDayDataService {
dto.setPhasicType(item2.getPhasicType()); dto.setPhasicType(item2.getPhasicType());
dto.setValueType(item3.getValueType().toUpperCase()); dto.setValueType(item3.getValueType().toUpperCase());
dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag()); dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag());
channelDataHarmPowerPHandler(item3,valueTypes,dto,true); channelDataHarmPowerPHandler(item3,valueTypes,dto,!Objects.equals(versionUsed, "liaoning"));
result.add(dto); result.add(dto);
}); });
}); });
@@ -440,7 +446,7 @@ public class DayDataServiceImpl implements IDayDataService {
dto.setPhasicType(item2.getPhasicType()); dto.setPhasicType(item2.getPhasicType());
dto.setValueType(item3.getValueType().toUpperCase()); dto.setValueType(item3.getValueType().toUpperCase());
dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag()); dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag());
channelDataHarmPowerQHandler(item3,valueTypes,dto,true); channelDataHarmPowerQHandler(item3,valueTypes,dto,!Objects.equals(versionUsed, "liaoning"));
result.add(dto); result.add(dto);
}); });
}); });
@@ -488,7 +494,7 @@ public class DayDataServiceImpl implements IDayDataService {
dto.setPhasicType(item2.getPhasicType()); dto.setPhasicType(item2.getPhasicType());
dto.setValueType(item3.getValueType().toUpperCase()); dto.setValueType(item3.getValueType().toUpperCase());
dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag()); dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag());
channelDataHarmPowerSHandler(item3,valueTypes,dto,true); channelDataHarmPowerSHandler(item3,valueTypes,dto,!Objects.equals(versionUsed, "liaoning"));
result.add(dto); result.add(dto);
}); });
}); });
@@ -536,7 +542,7 @@ public class DayDataServiceImpl implements IDayDataService {
dto.setPhasicType(item2.getPhasicType()); dto.setPhasicType(item2.getPhasicType());
dto.setValueType(item3.getValueType().toUpperCase()); dto.setValueType(item3.getValueType().toUpperCase());
dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag()); dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag());
channelDataHarmRateIHandler(item3,valueTypes,dto,true); channelDataHarmRateIHandler(item3,valueTypes,dto,!Objects.equals(versionUsed, "liaoning"));
result.add(dto); result.add(dto);
}); });
}); });
@@ -584,7 +590,7 @@ public class DayDataServiceImpl implements IDayDataService {
dto.setPhasicType(item2.getPhasicType()); dto.setPhasicType(item2.getPhasicType());
dto.setValueType(item3.getValueType().toUpperCase()); dto.setValueType(item3.getValueType().toUpperCase());
dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag()); dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag());
channelDataHarmRateVHandler(item3,valueTypes,dto,true); channelDataHarmRateVHandler(item3,valueTypes,dto,!Objects.equals(versionUsed, "liaoning"));
result.add(dto); result.add(dto);
}); });
}); });
@@ -632,7 +638,7 @@ public class DayDataServiceImpl implements IDayDataService {
dto.setPhasicType(item2.getPhasicType()); dto.setPhasicType(item2.getPhasicType());
dto.setValueType(item3.getValueType().toUpperCase()); dto.setValueType(item3.getValueType().toUpperCase());
dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag()); dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag());
channelDataInHarmIHandler(item3,valueTypes,dto,true); channelDataInHarmIHandler(item3,valueTypes,dto,!Objects.equals(versionUsed, "liaoning"));
result.add(dto); result.add(dto);
}); });
}); });
@@ -680,7 +686,7 @@ public class DayDataServiceImpl implements IDayDataService {
dto.setPhasicType(item2.getPhasicType()); dto.setPhasicType(item2.getPhasicType());
dto.setValueType(item3.getValueType().toUpperCase()); dto.setValueType(item3.getValueType().toUpperCase());
dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag()); dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag());
channelDataInHarmVHandler(item3,valueTypes,dto,true); channelDataInHarmVHandler(item3,valueTypes,dto,!Objects.equals(versionUsed, "liaoning"));
result.add(dto); result.add(dto);
}); });
}); });
@@ -728,7 +734,7 @@ public class DayDataServiceImpl implements IDayDataService {
dto.setPhasicType(item2.getPhasicType()); dto.setPhasicType(item2.getPhasicType());
dto.setValueType(item4.toUpperCase()); dto.setValueType(item4.toUpperCase());
dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag()); dto.setQualityFlag(Objects.equals(item.getQualityFlag(),"null") ? "0" : item.getQualityFlag());
channelDataPltHandler(item3,dto,item4,true); channelDataPltHandler(item3,dto,item4,!Objects.equals(versionUsed, "liaoning"));
result.add(dto); result.add(dto);
}); });
}); });
@@ -1549,23 +1555,20 @@ public class DayDataServiceImpl implements IDayDataService {
valueType = valueType.toUpperCase(); valueType = valueType.toUpperCase();
if (scheme) { if (scheme) {
switch (valueType) { switch (valueType) {
case InfluxDbSqlConstant.MAX: case "MAX":
case InfluxDbSqlConstant.CP95: case "CP95":
Optional<Double> max = list.stream().filter(Objects::nonNull).max(Double::compare); Optional<Double> max = list.stream().filter(Objects::nonNull).max(Double::compare);
// result = max.orElse(null);
result = max.orElse(0.0); result = max.orElse(0.0);
break; break;
case InfluxDbSqlConstant.MIN: case "MIN":
Optional<Double> min = list.stream().filter(Objects::nonNull).min(Double::compare); Optional<Double> min = list.stream().filter(Objects::nonNull).min(Double::compare);
// result = min.orElse(null);
result = min.orElse(0.0); result = min.orElse(0.0);
break; break;
case InfluxDbSqlConstant.AVG_WEB: case "AVG":
OptionalDouble average = list.stream() OptionalDouble average = list.stream()
.filter(Objects::nonNull) .filter(Objects::nonNull)
.mapToDouble(Double::doubleValue) .mapToDouble(Double::doubleValue)
.average(); .average();
// result = average.isPresent() ? average.getAsDouble() : null;
result = average.isPresent() ? average.getAsDouble() : 0.0; result = average.isPresent() ? average.getAsDouble() : 0.0;
break; break;
default: default:
@@ -1573,29 +1576,42 @@ public class DayDataServiceImpl implements IDayDataService {
} }
} else { } else {
switch (valueType) { switch (valueType) {
case InfluxDbSqlConstant.MAX: case "MAX":
Optional<Double> max = list.stream().filter(Objects::nonNull).max(Double::compare); Optional<Double> max = list.stream().filter(Objects::nonNull).max(Double::compare);
// result = max.orElse(null);
result = max.orElse(0.0); result = max.orElse(0.0);
break; break;
case InfluxDbSqlConstant.MIN: case "MIN":
Optional<Double> min = list.stream().filter(Objects::nonNull).min(Double::compare); Optional<Double> min = list.stream().filter(Objects::nonNull).min(Double::compare);
// result = min.orElse(null);
result = min.orElse(0.0); result = min.orElse(0.0);
break; break;
case InfluxDbSqlConstant.AVG_WEB: case "AVG":
OptionalDouble average = list.stream() OptionalDouble average = list.stream()
.filter(Objects::nonNull) .filter(Objects::nonNull)
.mapToDouble(Double::doubleValue) .mapToDouble(Double::doubleValue)
.average(); .average();
// result = average.isPresent() ? average.getAsDouble() : null;
result = average.isPresent() ? average.getAsDouble() : 0.0; result = average.isPresent() ? average.getAsDouble() : 0.0;
break; break;
case InfluxDbSqlConstant.CP95: case "CP95":
list.sort(Collections.reverseOrder()); if (list == null || list.isEmpty()) {
int discardCount = (int) Math.ceil(list.size() * 0.05); result = 0.0;
List<Double> remainingList = list.subList(discardCount, list.size()); break;
// result = remainingList.isEmpty() ? null : remainingList.get(0); }
// 过滤掉 null 元素
List<Double> filteredList = list.stream()
.filter(Objects::nonNull)
.collect(Collectors.toList());
if (filteredList.isEmpty()) {
result = 0.0;
break;
}
filteredList.sort(Collections.reverseOrder());
int discardCount = (int) Math.ceil(filteredList.size() * 0.05);
if (discardCount >= filteredList.size()) {
result = 0.0;
break;
}
List<Double> remainingList = filteredList.subList(discardCount, filteredList.size());
result = remainingList.isEmpty() ? 0.0 : remainingList.get(0); result = remainingList.isEmpty() ? 0.0 : remainingList.get(0);
break; break;
default: default:
@@ -1610,4 +1626,28 @@ public class DayDataServiceImpl implements IDayDataService {
return result; return result;
} }
/**
* 将平均值赋值给 CP95
*/
public void putCP95ByAvg(List<CommonMinuteDto> list) {
list.forEach(po1->{
List<CommonMinuteDto.PhasicType> phasicTypeList = po1.getPhasicTypeList();
phasicTypeList.forEach(po2 -> {
List<CommonMinuteDto.ValueType> valueTypeList = po2.getValueTypeList();
AtomicReference<List<List<Double>>> valueList = new AtomicReference<>(new ArrayList<>());
valueTypeList.forEach(po3 -> {
if (po3.getValueType().equals(InfluxDbSqlConstant.AVG_WEB)) {
valueList.set(po3.getValueList());
}
if (po3.getValueType().equals(InfluxDbSqlConstant.CP95)) {
po3.setValueList((List<List<Double>>) valueList);
}
});
});
});
}
} }

View File

@@ -46,6 +46,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.concurrent.CompletableFuture;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@@ -108,11 +109,26 @@ public class IDataCrossingServiceImpl implements IDataCrossingService {
List<List<String>> pendingIds = ListUtils.partition(lineIds, 1); List<List<String>> pendingIds = ListUtils.partition(lineIds, 1);
ArrayList<String> phase = ListUtil.toList(PhaseType.PHASE_A, PhaseType.PHASE_B, PhaseType.PHASE_C); ArrayList<String> phase = ListUtil.toList(PhaseType.PHASE_A, PhaseType.PHASE_B, PhaseType.PHASE_C);
MemorySizeUtil.getNowMemory(); MemorySizeUtil.getNowMemory();
List<CompletableFuture<Void>> futures = new ArrayList<>();
for (int i = 0; i < pendingIds.size(); i++) { for (int i = 0; i < pendingIds.size(); i++) {
logger.info(calculatedParam.getDataDate()+" 总分区数据:" + pendingIds.size() + "=====》当前第"+(i + 1)+"小分区"); logger.info(calculatedParam.getDataDate()+" 总分区数据:" + pendingIds.size() + "=====》当前第"+(i + 1)+"小分区");
List<String> list = pendingIds.get(i); List<String> list = pendingIds.get(i);
dataLimitRateAsync.lineDataRate(calculatedParam.getDataDate(), list, phase, overLimitMap, pendingIds.size(), (i + 1), lineParam.getType()); // 获取Future
CompletableFuture<Void> future = dataLimitRateAsync.lineDataRate(
calculatedParam.getDataDate(),
list,
phase,
overLimitMap,
pendingIds.size(),
(i + 1),
lineParam.getType()
);
futures.add(future);
} }
// 等待所有任务完成
CompletableFuture.allOf(futures.toArray(new CompletableFuture[0])).join();
System.gc(); System.gc();
} }

View File

@@ -18,6 +18,7 @@ import com.njcn.influx.pojo.constant.InfluxDBTableConstant;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async; 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;
@@ -25,6 +26,7 @@ import org.springframework.util.CollectionUtils;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.*; import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@@ -52,17 +54,22 @@ public class IDataLimitRateAsyncImpl implements IDataLimitRateAsync {
private DataLimitRateFeignClient dataLimitRateFeignClient; private DataLimitRateFeignClient dataLimitRateFeignClient;
@Resource @Resource
private DataLimitRateDetailFeignClient dataLimitRateDetailFeignClient; private DataLimitRateDetailFeignClient dataLimitRateDetailFeignClient;
/**
* 查询配置 辽宁版本比较特殊没有CP95值采用平均值进行判断
*/
@Value("${version.used:master}")
private String versionUsed;
@Override @Override
@Async("asyncExecutor") @Async("asyncExecutor")
public void lineDataRate(String dataDate, public CompletableFuture<Void> lineDataRate(String dataDate,
List<String> list, List<String> list,
List<String> phase, List<String> phase,
Map<String, Overlimit> overLimitMap, Map<String, Overlimit> overLimitMap,
int size, int size,
int i, int i,
int type) { int type) {
List<DataLimitDetailDto> result = new ArrayList<>(); List<DataLimitDetailDto> result = new ArrayList<>();
LineCountEvaluateParam lineParam = new LineCountEvaluateParam(); LineCountEvaluateParam lineParam = new LineCountEvaluateParam();
lineParam.setStartTime(TimeUtils.getBeginOfDay(dataDate)); lineParam.setStartTime(TimeUtils.getBeginOfDay(dataDate));
@@ -79,6 +86,7 @@ public class IDataLimitRateAsyncImpl implements IDataLimitRateAsync {
List<DataHarmDto> dataVInHarmList = dataInharmVFeignClient.getRawData(lineParam).getData(); List<DataHarmDto> dataVInHarmList = dataInharmVFeignClient.getRawData(lineParam).getData();
//电流数据 //电流数据
List<DataIDto> dataIList = dataIFeignClient.getRawData(lineParam).getData(); List<DataIDto> dataIList = dataIFeignClient.getRawData(lineParam).getData();
/** /**
* 功能描述:获取influxDB -> data_v -> * 功能描述:获取influxDB -> data_v ->
* 总计算次数(用data_v中phasic_type=A,value_type=avg,quality_flag=0来参与统计) * 总计算次数(用data_v中phasic_type=A,value_type=avg,quality_flag=0来参与统计)
@@ -121,53 +129,109 @@ public class IDataLimitRateAsyncImpl implements IDataLimitRateAsync {
*功能描述:获取influxDB -> data_harmrate_v -> *功能描述:获取influxDB -> data_harmrate_v ->
* 2-25次谐波电压含有率 -> A相||B相||C相的日95%概率值 * 2-25次谐波电压含有率 -> A相||B相||C相的日95%概率值
*/ */
Map<String, List<DataHarmDto>> harmRateV = dataVHarmList.stream() Map<String, List<DataHarmDto>> harmRateV;
.filter(x -> phase.contains(x.getPhasicType())) if (Objects.equals(versionUsed, "liaoning")) {
.filter(x -> InfluxDBTableConstant.CP95.equalsIgnoreCase(x.getValueType())) harmRateV = dataVHarmList.stream()
.collect(Collectors.groupingBy(DataHarmDto::getLineId)); .filter(x -> phase.contains(x.getPhasicType()))
.filter(x -> InfluxDBTableConstant.AVG.equalsIgnoreCase(x.getValueType()))
.peek(x -> x.setValueType(InfluxDBTableConstant.CP95))
.collect(Collectors.groupingBy(DataHarmDto::getLineId));
} else {
harmRateV = dataVHarmList.stream()
.filter(x -> phase.contains(x.getPhasicType()))
.filter(x -> InfluxDBTableConstant.CP95.equalsIgnoreCase(x.getValueType()))
.collect(Collectors.groupingBy(DataHarmDto::getLineId));
}
/** /**
* 功能描述:获取influxDB -> data_i -> 2-25次谐波电流 -> 日95%概率值 * 功能描述:获取influxDB -> data_i -> 2-25次谐波电流 -> 日95%概率值
*/ */
Map<String, List<DataIDto>> dataI = dataIList.stream() Map<String, List<DataIDto>> dataI;
.filter(x -> phase.contains(x.getPhasicType())) if (Objects.equals(versionUsed, "liaoning")) {
.filter(x -> InfluxDBTableConstant.CP95.equalsIgnoreCase(x.getValueType())) dataI = dataIList.stream()
.collect(Collectors.groupingBy(DataIDto::getLineId)); .filter(x -> phase.contains(x.getPhasicType()))
.filter(x -> InfluxDBTableConstant.AVG.equalsIgnoreCase(x.getValueType()))
.peek(x -> x.setValueType(InfluxDBTableConstant.CP95))
.collect(Collectors.groupingBy(DataIDto::getLineId));
} else {
dataI = dataIList.stream()
.filter(x -> phase.contains(x.getPhasicType()))
.filter(x -> InfluxDBTableConstant.CP95.equalsIgnoreCase(x.getValueType()))
.collect(Collectors.groupingBy(DataIDto::getLineId));
}
/** /**
* 功能描述:获取influxDB -> data_inharm_v -> 0.5-15.5次间谐波电压含有率 -> 日95%概率值 * 功能描述:获取influxDB -> data_inharm_v -> 0.5-15.5次间谐波电压含有率 -> 日95%概率值
*/ */
Map<String, List<DataHarmDto>> inHarmV = dataVInHarmList.stream() Map<String, List<DataHarmDto>> inHarmV;
.filter(x -> phase.contains(x.getPhasicType())) if (Objects.equals(versionUsed, "liaoning")) {
.filter(x -> InfluxDBTableConstant.CP95.equalsIgnoreCase(x.getValueType())) inHarmV = dataVInHarmList.stream()
.collect(Collectors.groupingBy(DataHarmDto::getLineId)); .filter(x -> phase.contains(x.getPhasicType()))
.filter(x -> InfluxDBTableConstant.AVG.equalsIgnoreCase(x.getValueType()))
.peek(x -> x.setValueType(InfluxDBTableConstant.CP95))
.collect(Collectors.groupingBy(DataHarmDto::getLineId));
} else {
inHarmV = dataVInHarmList.stream()
.filter(x -> phase.contains(x.getPhasicType()))
.filter(x -> InfluxDBTableConstant.CP95.equalsIgnoreCase(x.getValueType()))
.collect(Collectors.groupingBy(DataHarmDto::getLineId));
}
/** /**
* 功能描述:获取influxDB -> data_v -> 电压总谐波畸变率 -> 日95%概率值 * 功能描述:获取influxDB -> data_v -> 电压总谐波畸变率 -> 日95%概率值
*/ */
Map<String, List<DataVDto>> dataVThd = dataVAllTime.stream() Map<String, List<DataVDto>> dataVThd;
.filter(x -> phase.contains(x.getPhasicType())) if (Objects.equals(versionUsed, "liaoning")) {
.filter(x -> InfluxDBTableConstant.CP95.equalsIgnoreCase(x.getValueType())) dataVThd = dataVAllTime.stream()
.collect(Collectors.groupingBy(DataVDto::getLineId)); .filter(x -> phase.contains(x.getPhasicType()))
.filter(x -> InfluxDBTableConstant.AVG.equalsIgnoreCase(x.getValueType()))
.peek(x -> x.setValueType(InfluxDBTableConstant.CP95))
.collect(Collectors.groupingBy(DataVDto::getLineId));
} else {
dataVThd = dataVAllTime.stream()
.filter(x -> phase.contains(x.getPhasicType()))
.filter(x -> InfluxDBTableConstant.CP95.equalsIgnoreCase(x.getValueType()))
.collect(Collectors.groupingBy(DataVDto::getLineId));
}
/** /**
* 功能描述:获取influxDB -> data_v -> 负序电压不平衡度 -> 最大值 && 日95%概率值 * 功能描述:获取influxDB -> data_v -> 负序电压不平衡度 -> 最大值 && 日95%概率值
*/ */
Map<String, List<DataVDto>> dataVUnbalance = dataVAllTime.stream() Map<String, List<DataVDto>> dataVUnbalance;
.filter(x -> InfluxDBTableConstant.PHASE_TYPE_T.equalsIgnoreCase(x.getPhasicType())) if (Objects.equals(versionUsed, "liaoning")) {
.filter(x -> InfluxDBTableConstant.CP95.equalsIgnoreCase(x.getValueType()) || dataVUnbalance = dataVAllTime.stream()
InfluxDBTableConstant.MAX.equalsIgnoreCase(x.getValueType())) .filter(x -> InfluxDBTableConstant.PHASE_TYPE_T.equalsIgnoreCase(x.getPhasicType()))
.collect(Collectors.groupingBy(DataVDto::getLineId)); .filter(x -> InfluxDBTableConstant.AVG.equalsIgnoreCase(x.getValueType()) ||
InfluxDBTableConstant.MAX.equalsIgnoreCase(x.getValueType()))
.peek(x -> x.setValueType(InfluxDBTableConstant.CP95))
.collect(Collectors.groupingBy(DataVDto::getLineId));
} else {
dataVUnbalance = dataVAllTime.stream()
.filter(x -> InfluxDBTableConstant.PHASE_TYPE_T.equalsIgnoreCase(x.getPhasicType()))
.filter(x -> InfluxDBTableConstant.CP95.equalsIgnoreCase(x.getValueType()) ||
InfluxDBTableConstant.MAX.equalsIgnoreCase(x.getValueType()))
.collect(Collectors.groupingBy(DataVDto::getLineId));
}
/** /**
* 功能描述:获取influxDB -> data_i -> 负序电流 -> 最大值 && 日95%概率值 * 功能描述:获取influxDB -> data_i -> 负序电流 -> 最大值 && 日95%概率值
*/ */
Map<String, List<DataIDto>> dataINeg = dataIList.stream()
.filter(x -> InfluxDBTableConstant.PHASE_TYPE_T.equalsIgnoreCase(x.getPhasicType())) Map<String, List<DataIDto>> dataINeg;
.filter(x -> InfluxDBTableConstant.CP95.equalsIgnoreCase(x.getValueType()) || if (Objects.equals(versionUsed, "liaoning")) {
InfluxDBTableConstant.MAX.equalsIgnoreCase(x.getValueType())) dataINeg = dataIList.stream()
.collect(Collectors.groupingBy(DataIDto::getLineId)); .filter(x -> InfluxDBTableConstant.PHASE_TYPE_T.equalsIgnoreCase(x.getPhasicType()))
.filter(x -> InfluxDBTableConstant.AVG.equalsIgnoreCase(x.getValueType()) ||
InfluxDBTableConstant.MAX.equalsIgnoreCase(x.getValueType()))
.peek(x -> x.setValueType(InfluxDBTableConstant.CP95))
.collect(Collectors.groupingBy(DataIDto::getLineId));
} else {
dataINeg = dataIList.stream()
.filter(x -> InfluxDBTableConstant.PHASE_TYPE_T.equalsIgnoreCase(x.getPhasicType()))
.filter(x -> InfluxDBTableConstant.CP95.equalsIgnoreCase(x.getValueType()) ||
InfluxDBTableConstant.MAX.equalsIgnoreCase(x.getValueType()))
.collect(Collectors.groupingBy(DataIDto::getLineId));
}
/** /**
* 功能描述:获取influxDB -> data_v -> 频率偏差 -> 最大值 && 最小值 * 功能描述:获取influxDB -> data_v -> 频率偏差 -> 最大值 && 最小值
@@ -237,6 +301,8 @@ public class IDataLimitRateAsyncImpl implements IDataLimitRateAsync {
MemorySizeUtil.getNowMemory(); MemorySizeUtil.getNowMemory();
} }
System.gc(); System.gc();
return CompletableFuture.completedFuture(null);
} }
/** /**
@@ -304,9 +370,6 @@ public class IDataLimitRateAsyncImpl implements IDataLimitRateAsync {
result.add(c); result.add(c);
result.add(t); result.add(t);
return result; return result;
} }

View File

@@ -27,7 +27,7 @@ import com.njcn.event.api.TransientFeignClient;
import com.njcn.event.file.pojo.dto.WaveDataDTO; import com.njcn.event.file.pojo.dto.WaveDataDTO;
import com.njcn.event.pojo.param.EventCountParam; import com.njcn.event.pojo.param.EventCountParam;
import com.njcn.event.pojo.po.RmpEventDetailPO; import com.njcn.event.pojo.po.RmpEventDetailPO;
import com.njcn.supervision.api.UserLedgerFeignClient; import com.njcn.supervision.api.UserLedgerOldFeignClient;
import com.njcn.supervision.pojo.vo.user.NewUserReportVO; import com.njcn.supervision.pojo.vo.user.NewUserReportVO;
import com.njcn.system.api.DicDataFeignClient; import com.njcn.system.api.DicDataFeignClient;
import com.njcn.system.api.DictTreeFeignClient; import com.njcn.system.api.DictTreeFeignClient;
@@ -84,7 +84,7 @@ public class SpecialAnalysisServiceImpl implements ISpecialAnalysisService {
@Resource @Resource
private CommLineClient commLineClient; private CommLineClient commLineClient;
@Resource @Resource
private UserLedgerFeignClient userLedgerFeignClient; private UserLedgerOldFeignClient userLedgerFeignClient;
@Resource @Resource
private DataLimitRateDetailFeignClient dataLimitRateDetailFeignClient; private DataLimitRateDetailFeignClient dataLimitRateDetailFeignClient;

View File

@@ -0,0 +1,76 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10401
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
compression:
request:
enabled: true
# 配置压缩支持的MIME TYPE
mime-types: text/xml,application/xml,application/json
# 配置压缩数据大小的下限
min-request-size: 1024
response:
# 配置响应GZIP压缩
enabled: true
spring:
application:
name: @artifactId@
cloud:
nacos:
discovery:
server-addr: @nacos.url@
namespace: @nacos.namespace@
config:
username: @nacos.username@
password: @nacos.password@
server-addr: @nacos.url@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
liteflow:
rule-source-ext-data-map:
serverAddr: @nacos.url@
dataId: prepare_liteflow
group: DEFAULT_GROUP
namespace: @nacos.namespace@
username: @nacos.username@
password: @nacos.password@
when-max-wait-time: 3600000
print-banner: false
#项目日志的配置
logging:
config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
com.alibaba.nacos.client: INFO
#mybatis配置信息
mybatis-plus:
#别名扫描
type-aliases-package: com.njcn.harmonic.pojo
line:
num: 20
mqtt:
client-id: @artifactId@${random.value}

View File

@@ -0,0 +1,79 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10401
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
compression:
request:
enabled: true
# 配置压缩支持的MIME TYPE
mime-types: text/xml,application/xml,application/json
# 配置压缩数据大小的下限
min-request-size: 1024
response:
# 配置响应GZIP压缩
enabled: true
spring:
application:
name: @artifactId@
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
namespace: @nacos.namespace@
username: @nacos.username@
password: @nacos.password@
config:
server-addr: @nacos.url@
namespace: @nacos.namespace@
username: @nacos.username@
password: @nacos.password@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-Id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
liteflow:
rule-source-ext-data-map:
serverAddr: @nacos.url@
dataId: prepare_liteflow
group: DEFAULT_GROUP
namespace: @nacos.namespace@
username: @nacos.username@
password: @nacos.password@
when-max-wait-time: 3600000
print-banner: false
#项目日志的配置
logging:
#config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
com.alibaba.nacos.client: INFO
#mybatis配置信息
mybatis-plus:
#别名扫描
type-aliases-package: com.njcn.harmonic.pojo
line:
num: 20
#mqtt:
# client-id: @artifactId@${random.value}

View File

@@ -1,72 +1,3 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10401
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
compression:
request:
enabled: true
# 配置压缩支持的MIME TYPE
mime-types: text/xml,application/xml,application/json
# 配置压缩数据大小的下限
min-request-size: 1024
response:
# 配置响应GZIP压缩
enabled: true
spring: spring:
application: profiles:
name: @artifactId@ active: @spring.profiles.active@
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
namespace: @nacos.namespace@
config:
server-addr: @nacos.url@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-Id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
liteflow:
rule-source-ext-data-map:
serverAddr: @nacos.url@
dataId: prepare_liteflow
group: DEFAULT_GROUP
namespace: @nacos.namespace@
when-max-wait-time: 600000
print-banner: false
#项目日志的配置
logging:
config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: error
#mybatis配置信息
mybatis-plus:
#别名扫描
type-aliases-package: com.njcn.harmonic.pojo
line:
num: 10
mqtt:
client-id: @artifactId@${random.value}

View File

@@ -22,16 +22,20 @@ spring:
ip: @service.server.url@ ip: @service.server.url@
server-addr: @nacos.url@ server-addr: @nacos.url@
namespace: @nacos.namespace@ namespace: @nacos.namespace@
username: @nacos.username@
password: @nacos.password@
config: config:
server-addr: @nacos.url@ server-addr: @nacos.url@
namespace: @nacos.namespace@ namespace: @nacos.namespace@
username: @nacos.username@
password: @nacos.password@
file-extension: yaml file-extension: yaml
shared-configs: shared-configs:
- data-id: share-config.yaml - data-id: share-config.yaml
refresh: true refresh: true
- data-Id: share-config-datasource-db.yaml - data-id: share-config-datasource-db.yaml
refresh: true refresh: true
- data-Id: data-platform.yaml - data-id: data-platform.yaml
refresh: true refresh: true
main: main:
allow-bean-definition-overriding: true allow-bean-definition-overriding: true
@@ -39,7 +43,7 @@ spring:
#项目日志的配置 #项目日志的配置
logging: logging:
config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml #config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level: level:
root: info root: info

View File

@@ -128,7 +128,7 @@ public class InfluxdbDataHarmpowerPImpl extends MppServiceImpl<RStatDataHarmPowe
CommonMinuteDto.ValueType value = new CommonMinuteDto.ValueType(); CommonMinuteDto.ValueType value = new CommonMinuteDto.ValueType();
value.setValueType(valueType); value.setValueType(valueType);
List<List<Double>> lists; List<List<Double>> lists;
if (Objects.equals(phasicType, "T")) { if (Objects.equals(phasicType, "T") && Objects.equals(lineParam.getType(), 2)) {
lists = extractDataLists(valueTypeList, "Tot"); lists = extractDataLists(valueTypeList, "Tot");
} else { } else {
lists = extractDataLists(valueTypeList, ""); lists = extractDataLists(valueTypeList, "");

View File

@@ -127,7 +127,7 @@ public class InfluxdbDataHarmpowerQImpl extends MppServiceImpl<RStatDataHarmPowe
value.setValueType(valueType); value.setValueType(valueType);
List<List<Double>> lists; List<List<Double>> lists;
if (Objects.equals(phasicType, "T")) { if (Objects.equals(phasicType, "T") && Objects.equals(lineParam.getType(), 2)) {
lists = extractDataLists(valueTypeList, "Tot"); lists = extractDataLists(valueTypeList, "Tot");
} else { } else {
lists = extractDataLists(valueTypeList, ""); lists = extractDataLists(valueTypeList, "");

View File

@@ -126,7 +126,7 @@ public class InfluxdbDataHarmpowerSImpl extends MppServiceImpl<RStatDataHarmPowe
CommonMinuteDto.ValueType value = new CommonMinuteDto.ValueType(); CommonMinuteDto.ValueType value = new CommonMinuteDto.ValueType();
value.setValueType(valueType); value.setValueType(valueType);
List<List<Double>> lists; List<List<Double>> lists;
if (Objects.equals(phasicType, "T")) { if (Objects.equals(phasicType, "T") && Objects.equals(lineParam.getType(), 2)) {
lists = extractDataLists(valueTypeList, "Tot"); lists = extractDataLists(valueTypeList, "Tot");
} else { } else {
lists = extractDataLists(valueTypeList, ""); lists = extractDataLists(valueTypeList, "");

View File

@@ -0,0 +1,78 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10405
compression:
enabled: true
mime-types: application/json,application/xml,text/html,text/xml,text/plain
min-response-size: 1024
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
server-addr: @nacos.url@
namespace: @nacos.namespace@
config:
username: @nacos.username@
password: @nacos.password@
server-addr: @nacos.url@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
jackson:
time-zone: GMT+8
#项目日志的配置
logging:
config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: error
mqtt:
client-id: @artifactId@${random.value}
data:
source:
query: Influxdb
# insert: Influxdb
insert: Relation
#mybatis配置信息
mybatis-plus:
configuration:
#配置sql日志输出
log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
# type-aliases-package: com.njcn.harmonic.pojo
# type-handlers-package: com.njcn.db.handler
# global-config:
# db-config:
# date-format: yyyy-MM-dd HH:mm:ss
# global-config:
# enable-sql-runner: true

View File

@@ -0,0 +1,81 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10405
compression:
enabled: true
mime-types: application/json,application/xml,text/html,text/xml,text/plain
min-response-size: 1024
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
namespace: @nacos.namespace@
username: @nacos.username@
password: @nacos.password@
config:
server-addr: @nacos.url@
namespace: @nacos.namespace@
username: @nacos.username@
password: @nacos.password@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
jackson:
time-zone: GMT+8
#项目日志的配置
logging:
#config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: error
#mqtt:
# client-id: @artifactId@${random.value}
data:
source:
query: Influxdb
# insert: Influxdb
insert: Relation
#mybatis配置信息
mybatis-plus:
configuration:
#配置sql日志输出
log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
# type-aliases-package: com.njcn.harmonic.pojo
# type-handlers-package: com.njcn.db.handler
# global-config:
# db-config:
# date-format: yyyy-MM-dd HH:mm:ss
# global-config:
# enable-sql-runner: true

View File

@@ -1,77 +1,3 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10405
compression:
enabled: true
mime-types: application/json,application/xml,text/html,text/xml,text/plain
min-response-size: 1024
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring: spring:
application: profiles:
name: @artifactId@ active: @spring.profiles.active@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
namespace: @nacos.namespace@
config:
server-addr: @nacos.url@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-Id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
jackson:
time-zone: GMT+8
#项目日志的配置
logging:
config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: error
mqtt:
client-id: @artifactId@${random.value}
data:
source:
query: Influxdb
# insert: Influxdb
insert: Relation
#mybatis配置信息
mybatis-plus:
configuration:
#配置sql日志输出
log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
# type-aliases-package: com.njcn.harmonic.pojo
# type-handlers-package: com.njcn.db.handler
# global-config:
# db-config:
# date-format: yyyy-MM-dd HH:mm:ss
# global-config:
# enable-sql-runner: true

View File

@@ -22,16 +22,20 @@ spring:
ip: @service.server.url@ ip: @service.server.url@
server-addr: @nacos.url@ server-addr: @nacos.url@
namespace: @nacos.namespace@ namespace: @nacos.namespace@
username: @nacos.username@
password: @nacos.password@
config: config:
server-addr: @nacos.url@ server-addr: @nacos.url@
namespace: @nacos.namespace@ namespace: @nacos.namespace@
username: @nacos.username@
password: @nacos.password@
file-extension: yaml file-extension: yaml
shared-configs: shared-configs:
- data-id: share-config.yaml - data-id: share-config.yaml
refresh: true refresh: true
- data-Id: share-config-datasource-db.yaml - data-id: share-config-datasource-db.yaml
refresh: true refresh: true
- data-Id: data-platform.yaml - data-id: data-platform.yaml
refresh: true refresh: true
main: main:
allow-bean-definition-overriding: true allow-bean-definition-overriding: true
@@ -39,7 +43,7 @@ spring:
#项目日志的配置 #项目日志的配置
logging: logging:
config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml #config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level: level:
root: info root: info

54
pom.xml
View File

@@ -15,7 +15,7 @@
<module>algorithm</module> <module>algorithm</module>
<module>log</module> <module>log</module>
<module>data-processing</module> <module>data-processing</module>
<module>migration-influxdb</module> <!--<module>migration-influxdb</module>-->
</modules> </modules>
<distributionManagement> <distributionManagement>
@@ -32,47 +32,13 @@
</distributionManagement> </distributionManagement>
<properties> <properties>
<spring.profiles.active>sjzx</spring.profiles.active>
<!--内网--> <!--内网-->
<!-- <middle.server.url>192.168.1.22</middle.server.url>--> <middle.server.url>192.168.1.65</middle.server.url>
<!-- <service.server.url>192.168.1.121</service.server.url>--> <service.server.url>192.168.1.65</service.server.url>
<!-- <docker.server.url>192.168.1.22</docker.server.url>--> <docker.server.url>192.168.1.22</docker.server.url>
<!-- <nacos.url>${middle.server.url}:18848</nacos.url>--> <nacos.url>${middle.server.url}:18848</nacos.url>
<!-- <nacos.namespace>07ec981d-1377-4920-8760-b5a98ff7e668</nacos.namespace>--> <nacos.namespace></nacos.namespace>
<!-- <middle.server.url>192.168.21.129</middle.server.url>-->
<!-- <service.server.url>192.168.21.1</service.server.url>-->
<!-- <docker.server.url>192.168.1.22</docker.server.url>-->
<!-- <nacos.url>${middle.server.url}:18848</nacos.url>-->
<!-- <nacos.namespace>0c19477c-444e-413c-9782-e6ebc2eedac1</nacos.namespace>-->
<!-- <middle.server.url>127.0.0.1</middle.server.url>-->
<!-- &lt;!&ndash;微服务模块发布地址&ndash;&gt;-->
<!-- <service.server.url>127.0.0.1</service.server.url>-->
<!-- &lt;!&ndash;docker仓库地址&ndash;&gt;-->
<!-- <docker.server.url>127.0.0.1</docker.server.url>-->
<!-- &lt;!&ndash;nacos的ip:port&ndash;&gt;-->
<!-- <nacos.url>${middle.server.url}:8848</nacos.url>-->
<!-- <nacos.namespace>37a0e99f-eb96-4d2f-9b47-75bffa765827</nacos.namespace>-->
<!-- <middle.server.url>24.43.102.139</middle.server.url>-->
<!-- <service.server.url>24.43.102.139</service.server.url>-->
<!-- <docker.server.url>24.43.102.139</docker.server.url>-->
<!-- <nacos.url>${middle.server.url}:18848</nacos.url>-->
<!-- <nacos.namespace></nacos.namespace>-->
<middle.server.url>127.0.0.1</middle.server.url>
<service.server.url>127.0.0.1</service.server.url>
<docker.server.url>127.0.0.1</docker.server.url>
<nacos.url>${middle.server.url}:8848</nacos.url>
<nacos.namespace>37a0e99f-eb96-4d2f-9b47-75bffa765827</nacos.namespace>
<!-- <middle.server.url>192.168.21.129</middle.server.url>-->
<!-- &lt;!&ndash;微服务模块发布地址&ndash;&gt;-->
<!-- <service.server.url>192.168.21.1</service.server.url>-->
<!-- &lt;!&ndash;docker仓库地址&ndash;&gt;-->
<!-- <docker.server.url>192.168.1.22</docker.server.url>-->
<!-- <nacos.url>${middle.server.url}:18848</nacos.url>-->
<!-- <nacos.namespace>0c19477c-444e-413c-9782-e6ebc2eedac1</nacos.namespace>-->
<!--sentinel:port--> <!--sentinel:port-->
<sentinel.url>${middle.server.url}:8080</sentinel.url> <sentinel.url>${middle.server.url}:8080</sentinel.url>
<!--网关地址主要用于配置swagger中认证token--> <!--网关地址主要用于配置swagger中认证token-->
@@ -87,6 +53,12 @@
<micro.sdk>common-microservice</micro.sdk> <micro.sdk>common-microservice</micro.sdk>
<!-- <micro.sdk>common-huawei</micro.sdk>--> <!-- <micro.sdk>common-huawei</micro.sdk>-->
<docker.operate>site</docker.operate> <docker.operate>site</docker.operate>
<!--nacos开启鉴权后的用户名-->
<nacos.username>nacos</nacos.username>
<!--nacos的ip:port-->
<nacos.password>njcnpqs</nacos.password>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<maven.compiler.source>8</maven.compiler.source> <maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target> <maven.compiler.target>8</maven.compiler.target>