配网趋势图代码调整
This commit is contained in:
@@ -745,19 +745,12 @@ public class OracleResultServiceImpl implements OracleResultService {
|
||||
break;
|
||||
case 50:
|
||||
//谐波有功功率
|
||||
if(type==0) {
|
||||
harmonicHistoryData = HistoryDataMapper.getDataHarmpowerP_p(historyParam, number);
|
||||
}else{
|
||||
harmonicHistoryData =ztHarmonicHistoryP(historyParam,1);
|
||||
}
|
||||
harmonicHistoryData = HistoryDataMapper.getDataHarmpowerP_p(historyParam, number);
|
||||
break;
|
||||
case 51:
|
||||
//谐波无功功率
|
||||
if(type==0) {
|
||||
harmonicHistoryData=HistoryDataMapper.getDataHarmpowerQ_q(historyParam,number);
|
||||
}else{
|
||||
harmonicHistoryData =ztHarmonicHistoryP(historyParam,0);
|
||||
}
|
||||
harmonicHistoryData=HistoryDataMapper.getDataHarmpowerQ_q(historyParam,number);
|
||||
|
||||
break;
|
||||
case 52:
|
||||
//谐波视在功率
|
||||
@@ -765,11 +758,19 @@ public class OracleResultServiceImpl implements OracleResultService {
|
||||
break;
|
||||
case 53:
|
||||
//三相有功功率
|
||||
harmonicHistoryData=HistoryDataMapper.getDataHarmpowerP(historyParam);
|
||||
if(type==0) {
|
||||
harmonicHistoryData=HistoryDataMapper.getDataHarmpowerP(historyParam);
|
||||
}else{
|
||||
harmonicHistoryData =ztHarmonicHistoryP(historyParam,1);
|
||||
}
|
||||
break;
|
||||
case 54:
|
||||
//三相无功功率
|
||||
harmonicHistoryData=HistoryDataMapper.getDataHarmpowerQ(historyParam);
|
||||
if(type==0) {
|
||||
harmonicHistoryData=HistoryDataMapper.getDataHarmpowerQ(historyParam);
|
||||
}else{
|
||||
harmonicHistoryData =ztHarmonicHistoryP(historyParam,2);
|
||||
}
|
||||
break;
|
||||
case 55:
|
||||
//三相视在功率
|
||||
@@ -781,18 +782,26 @@ public class OracleResultServiceImpl implements OracleResultService {
|
||||
break;
|
||||
case 57:
|
||||
//三相总无功功率
|
||||
if(type==0) {
|
||||
harmonicHistoryData=HistoryDataMapper.getDataHarmpowerQ_t(historyParam);
|
||||
}else{
|
||||
harmonicHistoryData =ztHarmonicHistoryP(historyParam,3);
|
||||
}
|
||||
break;
|
||||
case 58:
|
||||
//三相总视在功率
|
||||
harmonicHistoryData=HistoryDataMapper.getDataHarmpowerS_t(historyParam);
|
||||
if(type==0) {
|
||||
harmonicHistoryData=HistoryDataMapper.getDataHarmpowerS_t(historyParam);
|
||||
}else{
|
||||
harmonicHistoryData =ztHarmonicHistoryP(historyParam,4);
|
||||
}
|
||||
break;
|
||||
case 59:
|
||||
//视在功率因数
|
||||
if(type==0) {
|
||||
harmonicHistoryData=HistoryDataMapper.getDataHarmpowerP_pf(historyParam);
|
||||
}else{
|
||||
harmonicHistoryData =ztHarmonicHistoryC(historyParam);
|
||||
harmonicHistoryData =ztHarmonicHistoryC(historyParam,1);
|
||||
}
|
||||
break;
|
||||
case 591:
|
||||
@@ -801,7 +810,11 @@ public class OracleResultServiceImpl implements OracleResultService {
|
||||
break;
|
||||
case 592:
|
||||
//总视在功率因数
|
||||
harmonicHistoryData=HistoryDataMapper.getDataHarmpowerP_pf_T(historyParam);
|
||||
if(type==0) {
|
||||
harmonicHistoryData=HistoryDataMapper.getDataHarmpowerP_pf_T(historyParam);
|
||||
}else{
|
||||
harmonicHistoryData =ztHarmonicHistoryC(historyParam,2);
|
||||
}
|
||||
break;
|
||||
case 593:
|
||||
//总位移功率因数
|
||||
@@ -871,7 +884,7 @@ public class OracleResultServiceImpl implements OracleResultService {
|
||||
return ztDataP(harmonicHistory,type);
|
||||
}
|
||||
//功率因数
|
||||
private List<HarmonicHistoryData> ztHarmonicHistoryC(HarmonicHistoryParam historyParam) {
|
||||
private List<HarmonicHistoryData> ztHarmonicHistoryC(HarmonicHistoryParam historyParam,Integer type) {
|
||||
String id = historyParam.getLineId();
|
||||
String starTime = historyParam.getStartTime();
|
||||
String endTime = historyParam.getEndTime();
|
||||
@@ -881,7 +894,7 @@ public class OracleResultServiceImpl implements OracleResultService {
|
||||
String apiId = "9c3ebd9c19dc0eb8e24385e40bd50a53";
|
||||
String apiName = "get_电能质量谐波监测系统_分布式光伏台区功率因数日数据_e_mp_TGfactor_zl_时间";
|
||||
List<HarmonicHistoryC> harmonicHistory = adsDiList(HarmonicHistoryC.class, id, starTime, endTime, key, secret, url, apiId, apiName);
|
||||
return ztDataC(harmonicHistory);
|
||||
return ztDataC(harmonicHistory,type);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1064,21 +1077,32 @@ public class OracleResultServiceImpl implements OracleResultService {
|
||||
List<HarmonicHistoryData> info=new ArrayList<>();
|
||||
HarmonicHistoryData d;
|
||||
//a
|
||||
List<HarmonicHistoryP> a;
|
||||
List<HarmonicHistoryP> a= new ArrayList<>();
|
||||
//b
|
||||
List<HarmonicHistoryP> b;
|
||||
List<HarmonicHistoryP> b= new ArrayList<>();
|
||||
//c
|
||||
List<HarmonicHistoryP> c;
|
||||
//1:有功 0:无功
|
||||
List<HarmonicHistoryP> c = new ArrayList<>();
|
||||
//1:三相有功
|
||||
if(type==1){
|
||||
a = value.stream().filter(x -> x.getData_type() == 2).distinct().collect(Collectors.toList());
|
||||
b = value.stream().filter(x -> x.getData_type() == 3).distinct().collect(Collectors.toList());
|
||||
c = value.stream().filter(x -> x.getData_type() == 4).distinct().collect(Collectors.toList());
|
||||
}else{
|
||||
}
|
||||
//2:三相无功
|
||||
if(type==2){
|
||||
a = value.stream().filter(x -> x.getData_type() == 6).distinct().collect(Collectors.toList());
|
||||
b = value.stream().filter(x -> x.getData_type() == 7).distinct().collect(Collectors.toList());
|
||||
c = value.stream().filter(x -> x.getData_type() == 8).distinct().collect(Collectors.toList());
|
||||
}
|
||||
//3:总有功
|
||||
if(type==3){
|
||||
a = value.stream().filter(x -> x.getData_type() == 1).distinct().collect(Collectors.toList());
|
||||
}
|
||||
//4:总无功
|
||||
if(type==4){
|
||||
a = value.stream().filter(x -> x.getData_type() == 5).distinct().collect(Collectors.toList());
|
||||
}
|
||||
|
||||
Integer num=97;
|
||||
//15分钟增加信息
|
||||
Duration duration = Duration.ofMinutes(15);
|
||||
@@ -1096,7 +1120,7 @@ public class OracleResultServiceImpl implements OracleResultService {
|
||||
}
|
||||
d.setTimeId(parse.toInstant(ZoneOffset.UTC));
|
||||
d.setPhasicType("A");
|
||||
d.setAValue(reflectDataP(harmonicHistoryP,"u"+i));
|
||||
d.setAValue(reflectDataP(harmonicHistoryP,"p"+i));
|
||||
info.add(d);
|
||||
}
|
||||
}
|
||||
@@ -1113,7 +1137,7 @@ public class OracleResultServiceImpl implements OracleResultService {
|
||||
}
|
||||
d.setTimeId(parse.toInstant(ZoneOffset.UTC));
|
||||
d.setPhasicType("B");
|
||||
d.setAValue(reflectDataP(harmonicHistoryP,"u"+i));
|
||||
d.setAValue(reflectDataP(harmonicHistoryP,"p"+i));
|
||||
info.add(d);
|
||||
}
|
||||
|
||||
@@ -1131,7 +1155,7 @@ public class OracleResultServiceImpl implements OracleResultService {
|
||||
}
|
||||
d.setTimeId(parse.toInstant(ZoneOffset.UTC));
|
||||
d.setPhasicType("C");
|
||||
d.setAValue(reflectDataP(harmonicHistoryP,"u"+i));
|
||||
d.setAValue(reflectDataP(harmonicHistoryP,"p"+i));
|
||||
info.add(d);
|
||||
}
|
||||
|
||||
@@ -1161,15 +1185,25 @@ public class OracleResultServiceImpl implements OracleResultService {
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
private List<HarmonicHistoryData> ztDataC(List<HarmonicHistoryC> value) {
|
||||
private List<HarmonicHistoryData> ztDataC(List<HarmonicHistoryC> value,Integer type) {
|
||||
List<HarmonicHistoryData> info=new ArrayList<>();
|
||||
HarmonicHistoryData d;
|
||||
//a
|
||||
List<HarmonicHistoryC> a= value.stream().filter(x -> x.getPhase_flag() == 1).collect(Collectors.toList());
|
||||
List<HarmonicHistoryC> a= new ArrayList<>();
|
||||
//b
|
||||
List<HarmonicHistoryC> b= value.stream().filter(x -> x.getPhase_flag() == 2).distinct().collect(Collectors.toList());
|
||||
List<HarmonicHistoryC> b= new ArrayList<>();
|
||||
//c
|
||||
List<HarmonicHistoryC> c= value.stream().filter(x -> x.getPhase_flag() == 3).distinct().collect(Collectors.toList());
|
||||
List<HarmonicHistoryC> c = new ArrayList<>();
|
||||
//1:视在功率因数
|
||||
if(type==1){
|
||||
a = value.stream().filter(x -> x.getPhase_flag() == 1).distinct().collect(Collectors.toList());
|
||||
b = value.stream().filter(x -> x.getPhase_flag() == 2).distinct().collect(Collectors.toList());
|
||||
c = value.stream().filter(x -> x.getPhase_flag() == 3).distinct().collect(Collectors.toList());
|
||||
}
|
||||
//2:总视在功率因数
|
||||
if(type==2){
|
||||
a = value.stream().filter(x -> x.getPhase_flag() == 0).distinct().collect(Collectors.toList());
|
||||
}
|
||||
|
||||
Integer num=97;
|
||||
//15分钟增加信息
|
||||
@@ -1188,7 +1222,7 @@ public class OracleResultServiceImpl implements OracleResultService {
|
||||
}
|
||||
d.setTimeId(parse.toInstant(ZoneOffset.UTC));
|
||||
d.setPhasicType("A");
|
||||
d.setAValue(reflectDataC(harmonicHistoryC,"u"+i));
|
||||
d.setAValue(reflectDataC(harmonicHistoryC,"c"+i));
|
||||
info.add(d);
|
||||
}
|
||||
}
|
||||
@@ -1205,7 +1239,7 @@ public class OracleResultServiceImpl implements OracleResultService {
|
||||
}
|
||||
d.setTimeId(parse.toInstant(ZoneOffset.UTC));
|
||||
d.setPhasicType("B");
|
||||
d.setAValue(reflectDataC(harmonicHistoryC,"u"+i));
|
||||
d.setAValue(reflectDataC(harmonicHistoryC,"c"+i));
|
||||
info.add(d);
|
||||
}
|
||||
|
||||
@@ -1223,7 +1257,7 @@ public class OracleResultServiceImpl implements OracleResultService {
|
||||
}
|
||||
d.setTimeId(parse.toInstant(ZoneOffset.UTC));
|
||||
d.setPhasicType("C");
|
||||
d.setAValue(reflectDataC(harmonicHistoryC,"u"+i));
|
||||
d.setAValue(reflectDataC(harmonicHistoryC,"c"+i));
|
||||
info.add(d);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user