谐波更改相关功能
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.njcn.harmonic.service.impl;
|
||||
|
||||
import com.njcn.common.utils.PubUtils;
|
||||
import com.njcn.device.api.LineFeignClient;
|
||||
import com.njcn.device.pojo.vo.LineDetailDataVO;
|
||||
import com.njcn.harmonic.constant.Param;
|
||||
@@ -216,7 +217,6 @@ public class NormLimitServiceImpl implements NormLimitService {
|
||||
String time = "";
|
||||
Float aMax = 0.0f, aMin = 0.0f, aAvg = 0.0f, aCp95 = 0.0f, bMax = 0.0f, bMin = 0.0f, bAvg = 0.0f, bCp95 = 0.0f, cMax = 0.0f, cMin = 0.0f, cAvg = 0.0f, cCp95 = 0.0f;
|
||||
for (int i = 0; i < qusery.get(0).getSeries().size(); i++) {
|
||||
List<String> columns = qusery.get(0).getSeries().get(i).getColumns();
|
||||
if (qusery.get(0).getSeries().get(i).getTags().get("phasic_type").equals("A")) {
|
||||
HistoryHarmOverLimitVO historyDataResultVO = new HistoryHarmOverLimitVO();
|
||||
if (!CollectionUtils.isEmpty(qusery.get(0).getSeries().get(i).getValues())) {
|
||||
@@ -256,13 +256,21 @@ public class NormLimitServiceImpl implements NormLimitService {
|
||||
historyDataResultVO.setTargetCode(contion);
|
||||
historyDataResultVO.setTargetName(phaseName);
|
||||
if (Integer.parseInt(contion) == 12 || Integer.parseInt(contion) == 15) {
|
||||
historyDataResultVO.setPhaseType("A");
|
||||
if (PubUtils.ptTypeName(lineDetailDataVO.getPtType()) != 0) {
|
||||
historyDataResultVO.setPhaseType("AB");
|
||||
} else {
|
||||
historyDataResultVO.setPhaseType("A");
|
||||
}
|
||||
historyDataResultVO.setStatisticalType(Math.abs(aMax) > Math.abs(aMin) ? 3 : 2);
|
||||
} else if (Integer.parseInt(contion) == 13 || Integer.parseInt(contion) == 22) {
|
||||
historyDataResultVO.setPhaseType("/");
|
||||
historyDataResultVO.setStatisticalType(Math.abs(aMax) > Math.abs(aCp95) ? 3 : 4);
|
||||
} else {
|
||||
historyDataResultVO.setPhaseType("A");
|
||||
if (PubUtils.ptTypeName(lineDetailDataVO.getPtType()) != 0) {
|
||||
historyDataResultVO.setPhaseType("AB");
|
||||
} else {
|
||||
historyDataResultVO.setPhaseType("A");
|
||||
}
|
||||
historyDataResultVO.setStatisticalType(3);
|
||||
}
|
||||
historyDataResultVO.setScale(lineDetailDataVO.getScale());
|
||||
@@ -309,13 +317,21 @@ public class NormLimitServiceImpl implements NormLimitService {
|
||||
historyDataResultVO.setTargetCode(contion);
|
||||
historyDataResultVO.setTargetName(phaseName);
|
||||
if (Integer.parseInt(contion) == 12 || Integer.parseInt(contion) == 15) {
|
||||
historyDataResultVO.setPhaseType("B");
|
||||
if (PubUtils.ptTypeName(lineDetailDataVO.getPtType()) != 0) {
|
||||
historyDataResultVO.setPhaseType("BC");
|
||||
} else {
|
||||
historyDataResultVO.setPhaseType("B");
|
||||
}
|
||||
historyDataResultVO.setStatisticalType(Math.abs(aMax) > Math.abs(aMin) ? 3 : 2);
|
||||
} else if (Integer.parseInt(contion) == 13 || Integer.parseInt(contion) == 22) {
|
||||
historyDataResultVO.setPhaseType("/");
|
||||
historyDataResultVO.setStatisticalType(Math.abs(aMax) > Math.abs(aCp95) ? 3 : 4);
|
||||
} else {
|
||||
historyDataResultVO.setPhaseType("B");
|
||||
if (PubUtils.ptTypeName(lineDetailDataVO.getPtType()) != 0) {
|
||||
historyDataResultVO.setPhaseType("BC");
|
||||
} else {
|
||||
historyDataResultVO.setPhaseType("B");
|
||||
}
|
||||
historyDataResultVO.setStatisticalType(3);
|
||||
}
|
||||
historyDataResultVO.setScale(lineDetailDataVO.getScale());
|
||||
@@ -359,13 +375,21 @@ public class NormLimitServiceImpl implements NormLimitService {
|
||||
historyDataResultVO.setTargetCode(contion);
|
||||
historyDataResultVO.setTargetName(phaseName);
|
||||
if (Integer.parseInt(contion) == 12 || Integer.parseInt(contion) == 15) {
|
||||
historyDataResultVO.setPhaseType("C");
|
||||
if (PubUtils.ptTypeName(lineDetailDataVO.getPtType()) != 0) {
|
||||
historyDataResultVO.setPhaseType("CA");
|
||||
} else {
|
||||
historyDataResultVO.setPhaseType("C");
|
||||
}
|
||||
historyDataResultVO.setStatisticalType(Math.abs(cMax) > Math.abs(cMin) ? 3 : 2);
|
||||
} else if (Integer.parseInt(contion) == 13 || Integer.parseInt(contion) == 22) {
|
||||
historyDataResultVO.setPhaseType("/");
|
||||
historyDataResultVO.setStatisticalType(Math.abs(cMax) > Math.abs(cCp95) ? 3 : 4);
|
||||
} else {
|
||||
historyDataResultVO.setPhaseType("C");
|
||||
if (PubUtils.ptTypeName(lineDetailDataVO.getPtType()) != 0) {
|
||||
historyDataResultVO.setPhaseType("CA");
|
||||
} else {
|
||||
historyDataResultVO.setPhaseType("C");
|
||||
}
|
||||
historyDataResultVO.setStatisticalType(3);
|
||||
}
|
||||
historyDataResultVO.setScale(lineDetailDataVO.getScale());
|
||||
|
||||
Reference in New Issue
Block a user