微调
This commit is contained in:
@@ -104,6 +104,21 @@
|
|||||||
<artifactId>pq-device-api</artifactId>
|
<artifactId>pq-device-api</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.njcn</groupId>
|
||||||
|
<artifactId>common-event</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.njcn</groupId>
|
||||||
|
<artifactId>event-api</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.njcn</groupId>
|
||||||
|
<artifactId>supervision-api</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@@ -242,11 +242,11 @@ public class SpecialAnalysisServiceImpl implements ISpecialAnalysisService {
|
|||||||
minTime.set(dto, "[]");
|
minTime.set(dto, "[]");
|
||||||
} else {
|
} else {
|
||||||
List<String> mins = min[i].stream().distinct().collect(Collectors.toList());
|
List<String> mins = min[i].stream().distinct().collect(Collectors.toList());
|
||||||
minTime.set(dto, JSON.toJSONString(mins));
|
|
||||||
List<String> limitTime = dataLimitRateDetailFeignClient.getLimitRateDetailTime(lineId, calculatedParam.getDataDate()).getData();
|
List<String> limitTime = dataLimitRateDetailFeignClient.getLimitRateDetailTime(lineId, calculatedParam.getDataDate()).getData();
|
||||||
if (CollUtil.isNotEmpty(limitTime)) {
|
if (CollUtil.isNotEmpty(limitTime)) {
|
||||||
List<String> collect = mins.stream().filter(x -> limitTime.contains(x)).collect(Collectors.toList());
|
List<String> collect = mins.stream().filter(x -> limitTime.contains(x)).sorted().collect(Collectors.toList());
|
||||||
if (CollUtil.isNotEmpty(collect)) {
|
if (CollUtil.isNotEmpty(collect)) {
|
||||||
|
minTime.set(dto, JSON.toJSONString(collect));
|
||||||
isOrNot.set(dto, 1);
|
isOrNot.set(dto, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import com.njcn.dataProcess.dao.relation.mapper.RStatDataHarmRateVRelationMapper
|
|||||||
import com.njcn.dataProcess.dto.DataHarmrateVDTO;
|
import com.njcn.dataProcess.dto.DataHarmrateVDTO;
|
||||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||||
import com.njcn.dataProcess.po.influx.DataHarmrateV;
|
import com.njcn.dataProcess.po.influx.DataHarmrateV;
|
||||||
import com.njcn.dataProcess.po.influx.DataV;
|
|
||||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||||
import com.njcn.dataProcess.pojo.dto.DataHarmDto;
|
import com.njcn.dataProcess.pojo.dto.DataHarmDto;
|
||||||
import com.njcn.dataProcess.pojo.dto.DataHarmRateVDto;
|
import com.njcn.dataProcess.pojo.dto.DataHarmRateVDto;
|
||||||
@@ -215,7 +214,7 @@ public class InfluxdbDataHarmRateVImpl extends MppServiceImpl<RStatDataHarmRateV
|
|||||||
.between(DataHarmrateV::getTime, lineParam.getStartTime(), lineParam.getEndTime())
|
.between(DataHarmrateV::getTime, lineParam.getStartTime(), lineParam.getEndTime())
|
||||||
.eq(DataHarmrateV::getQualityFlag,"0");
|
.eq(DataHarmrateV::getQualityFlag,"0");
|
||||||
if(CollUtil.isNotEmpty(lineParam.getPhasicType())){
|
if(CollUtil.isNotEmpty(lineParam.getPhasicType())){
|
||||||
influxQueryWrapper.regular(DataV::getPhasicType,lineParam.getPhasicType());
|
influxQueryWrapper.regular(DataHarmrateV::getPhasicType,lineParam.getPhasicType());
|
||||||
}
|
}
|
||||||
List<DataHarmrateV> list = dataHarmRateVMapper.selectByQueryWrapper(influxQueryWrapper);
|
List<DataHarmrateV> list = dataHarmRateVMapper.selectByQueryWrapper(influxQueryWrapper);
|
||||||
Map<String,List<DataHarmrateV>> lineMap = list.stream().collect(Collectors.groupingBy(DataHarmrateV::getLineId));
|
Map<String,List<DataHarmrateV>> lineMap = list.stream().collect(Collectors.groupingBy(DataHarmrateV::getLineId));
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import com.njcn.dataProcess.dao.relation.mapper.RStatDataIRelationMapper;
|
|||||||
import com.njcn.dataProcess.dto.DataIDTO;
|
import com.njcn.dataProcess.dto.DataIDTO;
|
||||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||||
import com.njcn.dataProcess.po.influx.DataI;
|
import com.njcn.dataProcess.po.influx.DataI;
|
||||||
import com.njcn.dataProcess.po.influx.DataV;
|
|
||||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||||
import com.njcn.dataProcess.pojo.dto.DataIDto;
|
import com.njcn.dataProcess.pojo.dto.DataIDto;
|
||||||
import com.njcn.dataProcess.pojo.po.RStatDataID;
|
import com.njcn.dataProcess.pojo.po.RStatDataID;
|
||||||
@@ -214,7 +213,7 @@ public class InfluxdbDataIImpl extends MppServiceImpl<RStatDataIRelationMapper,
|
|||||||
.between(DataI::getTime, lineParam.getStartTime(), lineParam.getEndTime())
|
.between(DataI::getTime, lineParam.getStartTime(), lineParam.getEndTime())
|
||||||
.eq(DataI::getQualityFlag,"0");
|
.eq(DataI::getQualityFlag,"0");
|
||||||
if(CollUtil.isNotEmpty(lineParam.getPhasicType())){
|
if(CollUtil.isNotEmpty(lineParam.getPhasicType())){
|
||||||
influxQueryWrapper.regular(DataV::getPhasicType,lineParam.getPhasicType());
|
influxQueryWrapper.regular(DataI::getPhasicType,lineParam.getPhasicType());
|
||||||
}
|
}
|
||||||
List<DataI> list = dataIMapper.selectByQueryWrapper(influxQueryWrapper);
|
List<DataI> list = dataIMapper.selectByQueryWrapper(influxQueryWrapper);
|
||||||
Map<String,List<DataI>> lineMap = list.stream().collect(Collectors.groupingBy(DataI::getLineId));
|
Map<String,List<DataI>> lineMap = list.stream().collect(Collectors.groupingBy(DataI::getLineId));
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import com.njcn.dataProcess.dto.DataInharmVDTO;
|
|||||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||||
import com.njcn.dataProcess.po.influx.DataI;
|
import com.njcn.dataProcess.po.influx.DataI;
|
||||||
import com.njcn.dataProcess.po.influx.DataInharmV;
|
import com.njcn.dataProcess.po.influx.DataInharmV;
|
||||||
import com.njcn.dataProcess.po.influx.DataV;
|
|
||||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||||
import com.njcn.dataProcess.pojo.dto.DataHarmDto;
|
import com.njcn.dataProcess.pojo.dto.DataHarmDto;
|
||||||
import com.njcn.dataProcess.pojo.dto.DataInHarmVDto;
|
import com.njcn.dataProcess.pojo.dto.DataInHarmVDto;
|
||||||
@@ -198,10 +197,10 @@ public class InfluxdbDataInharmVImpl extends MppServiceImpl<RStatDataInHarmVRela
|
|||||||
.select(DataInharmV::getPhasicType)
|
.select(DataInharmV::getPhasicType)
|
||||||
.select(DataInharmV::getValueType)
|
.select(DataInharmV::getValueType)
|
||||||
.select(DataInharmV::getQualityFlag)
|
.select(DataInharmV::getQualityFlag)
|
||||||
.between(DataI::getTime, lineParam.getStartTime(), lineParam.getEndTime())
|
.between(DataInharmV::getTime, lineParam.getStartTime(), lineParam.getEndTime())
|
||||||
.eq(DataI::getQualityFlag,"0");
|
.eq(DataI::getQualityFlag,"0");
|
||||||
if(CollUtil.isNotEmpty(lineParam.getPhasicType())){
|
if(CollUtil.isNotEmpty(lineParam.getPhasicType())){
|
||||||
influxQueryWrapper.regular(DataV::getPhasicType,lineParam.getPhasicType());
|
influxQueryWrapper.regular(DataInharmV::getPhasicType,lineParam.getPhasicType());
|
||||||
}
|
}
|
||||||
List<DataInharmV> list = dataInharmVMapper.selectByQueryWrapper(influxQueryWrapper);
|
List<DataInharmV> list = dataInharmVMapper.selectByQueryWrapper(influxQueryWrapper);
|
||||||
Map<String,List<DataInharmV>> lineMap = list.stream().collect(Collectors.groupingBy(DataInharmV::getLineId));
|
Map<String,List<DataInharmV>> lineMap = list.stream().collect(Collectors.groupingBy(DataInharmV::getLineId));
|
||||||
|
|||||||
@@ -120,23 +120,6 @@ public class InfluxdbDataVImpl extends MppServiceImpl<RStatDataVRelationMapper,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DataVDto> getRawData(LineCountEvaluateParam lineParam) {
|
public List<DataVDto> getRawData(LineCountEvaluateParam lineParam) {
|
||||||
|
|
||||||
Runtime runtime = Runtime.getRuntime();
|
|
||||||
// 获取 JVM 最大可用内存(以字节为单位)
|
|
||||||
long maxMemory = runtime.maxMemory();
|
|
||||||
// 获取 JVM 当前已分配的内存(以字节为单位)
|
|
||||||
long totalMemory = runtime.totalMemory();
|
|
||||||
// 获取 JVM 当前空闲内存(以字节为单位)
|
|
||||||
long freeMemory = runtime.freeMemory();
|
|
||||||
// 计算已使用的内存
|
|
||||||
long usedMemory = totalMemory - freeMemory;
|
|
||||||
|
|
||||||
System.out.println("最大可用内存: " + maxMemory / (1024 * 1024) + " MB");
|
|
||||||
System.out.println("当前已分配的内存: " + totalMemory / (1024 * 1024) + " MB");
|
|
||||||
System.out.println("当前空闲内存: " + freeMemory / (1024 * 1024) + " MB");
|
|
||||||
System.out.println("已使用的内存: " + usedMemory / (1024 * 1024) + " MB");
|
|
||||||
System.out.println("dataprocess第一次分析结束-----------------------------------------");
|
|
||||||
|
|
||||||
List<DataVDto> result = new ArrayList<>();
|
List<DataVDto> result = new ArrayList<>();
|
||||||
List<DataV> list = getMinuteDataV(lineParam);
|
List<DataV> list = getMinuteDataV(lineParam);
|
||||||
list.forEach(item -> {
|
list.forEach(item -> {
|
||||||
@@ -437,21 +420,6 @@ public class InfluxdbDataVImpl extends MppServiceImpl<RStatDataVRelationMapper,
|
|||||||
private void quality(List<DataV> result, InfluxQueryWrapper influxQueryWrapper, LineCountEvaluateParam
|
private void quality(List<DataV> result, InfluxQueryWrapper influxQueryWrapper, LineCountEvaluateParam
|
||||||
lineParam) {
|
lineParam) {
|
||||||
List<DataV> list = dataVMapper.selectByQueryWrapper(influxQueryWrapper);
|
List<DataV> list = dataVMapper.selectByQueryWrapper(influxQueryWrapper);
|
||||||
Runtime runtime = Runtime.getRuntime();
|
|
||||||
// 获取 JVM 最大可用内存(以字节为单位)
|
|
||||||
long maxMemory = runtime.maxMemory();
|
|
||||||
// 获取 JVM 当前已分配的内存(以字节为单位)
|
|
||||||
long totalMemory = runtime.totalMemory();
|
|
||||||
// 获取 JVM 当前空闲内存(以字节为单位)
|
|
||||||
long freeMemory = runtime.freeMemory();
|
|
||||||
// 计算已使用的内存
|
|
||||||
long usedMemory = totalMemory - freeMemory;
|
|
||||||
|
|
||||||
System.out.println("最大可用内存: " + maxMemory / (1024 * 1024) + " MB");
|
|
||||||
System.out.println("当前已分配的内存: " + totalMemory / (1024 * 1024) + " MB");
|
|
||||||
System.out.println("当前空闲内存: " + freeMemory / (1024 * 1024) + " MB");
|
|
||||||
System.out.println("已使用的内存: " + usedMemory / (1024 * 1024) + " MB");
|
|
||||||
System.out.println("dataprocess第二次分析结束-----------------------------------------");
|
|
||||||
|
|
||||||
if (CollUtil.isNotEmpty(list)) {
|
if (CollUtil.isNotEmpty(list)) {
|
||||||
Map<String, List<DataV>> lineMap = list.stream().collect(Collectors.groupingBy(DataV::getLineId));
|
Map<String, List<DataV>> lineMap = list.stream().collect(Collectors.groupingBy(DataV::getLineId));
|
||||||
|
|||||||
Reference in New Issue
Block a user