修改监测点类别
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
package com.njcn.executor.handler;
|
||||
|
||||
import com.njcn.common.pojo.constant.BizParamConstant;
|
||||
import com.njcn.executor.utils.CommonExecutorUtils;
|
||||
import com.njcn.prepare.harmonic.api.newalgorithm.RStatHarmonicFeignClient;
|
||||
import com.njcn.prepare.harmonic.api.newalgorithm.RStatHarmonicOrgFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.OrgParam;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class RStatHarmonicOrgJob {
|
||||
|
||||
private final RStatHarmonicOrgFeignClient rStatHarmonicOrgFeignClient;
|
||||
|
||||
@XxlJob("rStatHarmonicOrgDay")
|
||||
public void rStatHarmonicDay(){
|
||||
log.info(LocalDateTime.now()+"单位监测点稳态指标日统计调度开始------------------------");
|
||||
OrgParam orgParam = new OrgParam();
|
||||
orgParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_DAY));
|
||||
orgParam.setDataDate(CommonExecutorUtils.prepareTimeDeal(BizParamConstant.STAT_BIZ_DAY));
|
||||
rStatHarmonicOrgFeignClient.handler(orgParam);
|
||||
}
|
||||
|
||||
@XxlJob("rStatHarmonicOrgMonth")
|
||||
public void rStatHarmonicMonth(){
|
||||
log.info(LocalDateTime.now()+"单位监测点稳态指标月统计调度开始------------------------");
|
||||
OrgParam orgParam = new OrgParam();
|
||||
orgParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_MONTH));
|
||||
orgParam.setDataDate(CommonExecutorUtils.prepareTimeDeal(BizParamConstant.STAT_BIZ_MONTH));
|
||||
rStatHarmonicOrgFeignClient.handler(orgParam);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.njcn.prepare.harmonic.api.newalgorithm;
|
||||
|
||||
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.prepare.harmonic.api.newalgorithm.fallback.RStatHarmonicFeignClientFallbackFactory;
|
||||
import com.njcn.prepare.harmonic.api.newalgorithm.fallback.RStatHarmonicOrgFeignClientFallbackFactory;
|
||||
import com.njcn.prepare.harmonic.pojo.param.OrgParam;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@FeignClient(
|
||||
value = ServerInfo.PREPARE_BOOT,//对应模块名
|
||||
path = "/rstatharmonicorg",//对应controller请求类
|
||||
fallbackFactory = RStatHarmonicOrgFeignClientFallbackFactory.class//服务降级处理类
|
||||
)
|
||||
public interface RStatHarmonicOrgFeignClient {
|
||||
|
||||
@PostMapping("/Handler")
|
||||
HttpResult<String> handler(@RequestBody OrgParam orgParam);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.njcn.prepare.harmonic.api.newalgorithm.fallback;
|
||||
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
import com.njcn.prepare.harmonic.api.newalgorithm.RStatHarmonicFeignClient;
|
||||
import com.njcn.prepare.harmonic.api.newalgorithm.RStatHarmonicOrgFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.OrgParam;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class RStatHarmonicOrgFeignClientFallbackFactory implements FallbackFactory<RStatHarmonicOrgFeignClient> {
|
||||
@Override
|
||||
public RStatHarmonicOrgFeignClient create(Throwable throwable) {
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
return new RStatHarmonicOrgFeignClient() {
|
||||
@Override
|
||||
public HttpResult<String> handler(OrgParam orgParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "单位监测点稳态指标统计: ", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -127,7 +127,7 @@ public class RStatHarmonicOrgServiceImpl implements RStatHarmonicOrgService {
|
||||
}
|
||||
queryWrapper.clear();
|
||||
queryWrapper.eq("org_no",temp).
|
||||
eq("harmonic_type",dictData.getCode()).
|
||||
eq("harmonic_type",dictData.getId()).
|
||||
eq("data_type",v.getId()).
|
||||
eq("YEAR( data_date)", orgParam.getDataDate().substring(0,4));
|
||||
List<RStatHarmonicMPO> rStatHarmonicMPOS = rStatHarmonicMPOMapper.selectList(queryWrapper);
|
||||
@@ -222,7 +222,7 @@ public class RStatHarmonicOrgServiceImpl implements RStatHarmonicOrgService {
|
||||
}
|
||||
queryWrapper.clear();
|
||||
queryWrapper.eq("org_no",temp).
|
||||
eq("harmonic_type",dictData.getCode()).
|
||||
eq("harmonic_type",dictData.getId()).
|
||||
eq("data_type",v.getId()).
|
||||
eq("QUARTER( data_date)", PublicUtil.getNowQuarter (orgParam.getDataDate()));
|
||||
List<RStatHarmonicMPO> rStatHarmonicMPOS = rStatHarmonicMPOMapper.selectList(queryWrapper);
|
||||
@@ -315,7 +315,7 @@ public class RStatHarmonicOrgServiceImpl implements RStatHarmonicOrgService {
|
||||
}
|
||||
queryWrapper.clear();
|
||||
queryWrapper.eq("org_no",temp).
|
||||
eq("harmonic_type",dictData.getCode()).
|
||||
eq("harmonic_type",dictData.getId()).
|
||||
eq("data_type",v.getId()).
|
||||
eq("DATE_FORMAT( data_date ,'%Y-%m')",orgParam.getDataDate().substring(0, 7));
|
||||
List<RStatHarmonicMPO> rStatHarmonicMPOS = rStatHarmonicMPOMapper.selectList(queryWrapper);
|
||||
@@ -401,7 +401,7 @@ public class RStatHarmonicOrgServiceImpl implements RStatHarmonicOrgService {
|
||||
queryWrapper.select("over_limit_measurement").
|
||||
eq("org_no",temp).
|
||||
eq("data_type",v.getId()).
|
||||
eq("harmonic_type",dictData.getCode()).
|
||||
eq("harmonic_type",dictData.getId()).
|
||||
eq("DATE_FORMAT( data_date ,'%Y-%m-%d')",orgParam.getDataDate());
|
||||
List<RStatHarmonicDPO> rStatHarmonicDPOList = rStatHarmonicDPOMapper.selectList(queryWrapper);
|
||||
int sumOverLimitMeasurement =0;
|
||||
|
||||
@@ -113,6 +113,7 @@ public class RStatHarmonicServiceImpl implements RStatHarmonicService {
|
||||
Map<String, DictData> dataTypeMap = dataTypeList.stream().collect(Collectors.toMap(DictData::getCode, dictData -> dictData));
|
||||
;
|
||||
/*获取监测点类型类型*/
|
||||
|
||||
List<DictData> lineSortList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.LINE_SORT.getCode()).getData();
|
||||
Map<String, DictData> lineSortMap = lineSortList.stream().collect(Collectors.toMap(DictData::getCode, dictData -> dictData));
|
||||
|
||||
@@ -122,7 +123,7 @@ public class RStatHarmonicServiceImpl implements RStatHarmonicService {
|
||||
/*主网*/
|
||||
if (!CollectionUtils.isEmpty(deptGetChildrenMoreDTO.getLineBaseList())) {
|
||||
List<LineDevGetDTO> lineBaseList = deptGetChildrenMoreDTO.getLineBaseList();
|
||||
Map<Integer, List<LineDevGetDTO>> collect = lineBaseList.stream().collect(Collectors.groupingBy(LineDevGetDTO::getLineType));
|
||||
Map<String, List<LineDevGetDTO>> collect = lineBaseList.stream().collect(Collectors.groupingBy(LineDevGetDTO::getLineTag));
|
||||
collect.forEach((k, v) -> {
|
||||
List<String> collect1 = v.stream().map(LineDevGetDTO::getPointId).collect(Collectors.toList());
|
||||
|
||||
@@ -142,7 +143,7 @@ public class RStatHarmonicServiceImpl implements RStatHarmonicService {
|
||||
rStatOrgYPOQueryWrapper.clear();
|
||||
rStatOrgYPOQueryWrapper.select("effective_measurement_accrued").
|
||||
eq("org_no", deptGetChildrenMoreDTO.getUnitId()).
|
||||
eq("measurement_type_class", getmeasurementType(k, lineSortMap)).
|
||||
eq("measurement_type_class", k).
|
||||
eq("data_type", dataTypeMap.get(DicDataEnum.MAINNET_POINT.getCode()).getId()).
|
||||
eq("YEAR( data_date)", dataDate.substring(0,4));
|
||||
RStatOrgYPO rStatOrgYPO = rStatOrgYMapper.selectOne(rStatOrgYPOQueryWrapper);
|
||||
@@ -158,13 +159,13 @@ public class RStatHarmonicServiceImpl implements RStatHarmonicService {
|
||||
rStatHarmonicYPO.setDataDate(date);
|
||||
rStatHarmonicYPO.setHarmonicType(dictData.getId());
|
||||
rStatHarmonicYPO.setDataType(dataTypeMap.get(DicDataEnum.MAINNET_POINT.getCode()).getId());
|
||||
rStatHarmonicYPO.setMeasurementTypeClass(getmeasurementType(k, lineSortMap));
|
||||
rStatHarmonicYPO.setMeasurementTypeClass(k);
|
||||
/**4、累计超标监测点数*/
|
||||
rStatHarmonicYPO.setOverLimitMeasurementAccrued(getOverLimitMeasurementAccruedTime(dictData, rMpPartHarmonicDetailMS, rMpSurplusHarmonicDetailMS));
|
||||
/*3、日均超标监测点数,6、日均超标监测点数占比*/
|
||||
harmonicMPOQueryWrapper.clear();
|
||||
harmonicMPOQueryWrapper.eq("org_no", deptGetChildrenMoreDTO.getUnitId()).
|
||||
eq("measurement_type_class", getmeasurementType(k, lineSortMap)).
|
||||
eq("measurement_type_class", k).
|
||||
eq("data_type", dataTypeMap.get(DicDataEnum.MAINNET_POINT.getCode()).getId()).
|
||||
eq("harmonic_type", dictData.getId()).
|
||||
eq("QUARTER( data_date)", PublicUtil.getNowQuarter (dataDate));
|
||||
@@ -323,7 +324,7 @@ public class RStatHarmonicServiceImpl implements RStatHarmonicService {
|
||||
/*主网*/
|
||||
if (!CollectionUtils.isEmpty(deptGetChildrenMoreDTO.getLineBaseList())) {
|
||||
List<LineDevGetDTO> lineBaseList = deptGetChildrenMoreDTO.getLineBaseList();
|
||||
Map<Integer, List<LineDevGetDTO>> collect = lineBaseList.stream().collect(Collectors.groupingBy(LineDevGetDTO::getLineType));
|
||||
Map<String, List<LineDevGetDTO>> collect = lineBaseList.stream().collect(Collectors.groupingBy(LineDevGetDTO::getLineTag));
|
||||
collect.forEach((k, v) -> {
|
||||
List<String> collect1 = v.stream().map(LineDevGetDTO::getPointId).collect(Collectors.toList());
|
||||
|
||||
@@ -343,7 +344,7 @@ public class RStatHarmonicServiceImpl implements RStatHarmonicService {
|
||||
rStatOrgQPOQueryWrapper.clear();
|
||||
rStatOrgQPOQueryWrapper.select("effective_measurement_accrued").
|
||||
eq("org_no", deptGetChildrenMoreDTO.getUnitId()).
|
||||
eq("measurement_type_class", getmeasurementType(k, lineSortMap)).
|
||||
eq("measurement_type_class", k).
|
||||
eq("data_type", dataTypeMap.get(DicDataEnum.MAINNET_POINT.getCode()).getId()).
|
||||
eq("QUARTER( data_date)", PublicUtil.getNowQuarter (dataDate));
|
||||
RStatOrgQPO rStatOrgQPO = rStatOrgQMapper.selectOne(rStatOrgQPOQueryWrapper);
|
||||
@@ -359,13 +360,13 @@ public class RStatHarmonicServiceImpl implements RStatHarmonicService {
|
||||
rStatHarmonicQPO.setDataDate(date);
|
||||
rStatHarmonicQPO.setHarmonicType(dictData.getId());
|
||||
rStatHarmonicQPO.setDataType(dataTypeMap.get(DicDataEnum.MAINNET_POINT.getCode()).getId());
|
||||
rStatHarmonicQPO.setMeasurementTypeClass(getmeasurementType(k, lineSortMap));
|
||||
rStatHarmonicQPO.setMeasurementTypeClass(k);
|
||||
/**4、累计超标监测点数*/
|
||||
rStatHarmonicQPO.setOverLimitMeasurementAccrued(getOverLimitMeasurementAccruedTime(dictData, rMpPartHarmonicDetailMS, rMpSurplusHarmonicDetailMS));
|
||||
/*3、日均超标监测点数,6、日均超标监测点数占比*/
|
||||
harmonicMPOQueryWrapper.clear();
|
||||
harmonicMPOQueryWrapper.eq("org_no", deptGetChildrenMoreDTO.getUnitId()).
|
||||
eq("measurement_type_class", getmeasurementType(k, lineSortMap)).
|
||||
eq("measurement_type_class", k).
|
||||
eq("data_type", dataTypeMap.get(DicDataEnum.MAINNET_POINT.getCode()).getId()).
|
||||
eq("harmonic_type", dictData.getId()).
|
||||
eq("QUARTER( data_date)", PublicUtil.getNowQuarter (dataDate));
|
||||
@@ -525,7 +526,7 @@ public class RStatHarmonicServiceImpl implements RStatHarmonicService {
|
||||
/*主网*/
|
||||
if (!CollectionUtils.isEmpty(deptGetChildrenMoreDTO.getLineBaseList())) {
|
||||
List<LineDevGetDTO> lineBaseList = deptGetChildrenMoreDTO.getLineBaseList();
|
||||
Map<Integer, List<LineDevGetDTO>> collect = lineBaseList.stream().collect(Collectors.groupingBy(LineDevGetDTO::getLineType));
|
||||
Map<String, List<LineDevGetDTO>> collect = lineBaseList.stream().collect(Collectors.groupingBy(LineDevGetDTO::getLineTag));
|
||||
collect.forEach((k, v) -> {
|
||||
List<String> collect1 = v.stream().map(LineDevGetDTO::getPointId).collect(Collectors.toList());
|
||||
|
||||
@@ -544,7 +545,7 @@ public class RStatHarmonicServiceImpl implements RStatHarmonicService {
|
||||
rStatOrgMPOQueryWrapper.clear();
|
||||
rStatOrgMPOQueryWrapper.select("effective_measurement_accrued").
|
||||
eq("org_no", deptGetChildrenMoreDTO.getUnitId()).
|
||||
eq("measurement_type_class", getmeasurementType(k, lineSortMap)).
|
||||
eq("measurement_type_class", k).
|
||||
eq("data_type", dataTypeMap.get(DicDataEnum.MAINNET_POINT.getCode()).getId()).
|
||||
eq("DATE_FORMAT( data_date ,'%Y-%m')",dataDate.substring(0, 7));
|
||||
RStatOrgMPO rStatOrgMPO = rStatOrgMMapper.selectOne(rStatOrgMPOQueryWrapper);
|
||||
@@ -560,13 +561,13 @@ public class RStatHarmonicServiceImpl implements RStatHarmonicService {
|
||||
rStatHarmonicMPO.setDataDate(date);
|
||||
rStatHarmonicMPO.setHarmonicType(dictData.getId());
|
||||
rStatHarmonicMPO.setDataType(dataTypeMap.get(DicDataEnum.MAINNET_POINT.getCode()).getId());
|
||||
rStatHarmonicMPO.setMeasurementTypeClass(getmeasurementType(k, lineSortMap));
|
||||
rStatHarmonicMPO.setMeasurementTypeClass(k);
|
||||
/**4、累计超标监测点数*/
|
||||
rStatHarmonicMPO.setOverLimitMeasurementAccrued(getOverLimitMeasurementAccruedTime(dictData, rMpPartHarmonicDetailMS, rMpSurplusHarmonicDetailMS));
|
||||
/*3、日均超标监测点数,6、日均超标监测点数占比*/
|
||||
harmonicDPOQueryWrapper.clear();
|
||||
harmonicDPOQueryWrapper.eq("org_no", deptGetChildrenMoreDTO.getUnitId()).
|
||||
eq("measurement_type_class", getmeasurementType(k, lineSortMap)).
|
||||
eq("measurement_type_class", k).
|
||||
eq("data_type", dataTypeMap.get(DicDataEnum.MAINNET_POINT.getCode()).getId()).
|
||||
eq("harmonic_type", dictData.getId()).
|
||||
eq("DATE_FORMAT( data_date ,'%Y-%m')",dataDate.substring(0, 7));
|
||||
@@ -739,7 +740,7 @@ public class RStatHarmonicServiceImpl implements RStatHarmonicService {
|
||||
/*主网*/
|
||||
if(!CollectionUtils.isEmpty(deptGetChildrenMoreDTO.getLineBaseList())){
|
||||
List<LineDevGetDTO> lineBaseList = deptGetChildrenMoreDTO.getLineBaseList();
|
||||
Map<Integer, List<LineDevGetDTO>> collect = lineBaseList.stream().collect(Collectors.groupingBy(LineDevGetDTO::getLineType));
|
||||
Map<String, List<LineDevGetDTO>> collect = lineBaseList.stream().collect(Collectors.groupingBy(LineDevGetDTO::getLineTag));
|
||||
collect.forEach((k, v)->{
|
||||
List<String> collect1 = v.stream().map(LineDevGetDTO::getPointId).collect(Collectors.toList());
|
||||
|
||||
@@ -758,7 +759,7 @@ public class RStatHarmonicServiceImpl implements RStatHarmonicService {
|
||||
rStatOrgDPOQueryWrapper.clear();
|
||||
rStatOrgDPOQueryWrapper.select("effective_measurement").
|
||||
eq("org_no",deptGetChildrenMoreDTO.getUnitId()).
|
||||
eq("measurement_type_class",getmeasurementType(k,lineSortMap)).
|
||||
eq("measurement_type_class",k).
|
||||
eq("data_type",dataTypeMap.get(DicDataEnum.MAINNET_POINT.getCode()).getId()).
|
||||
eq("DATE_FORMAT( data_date ,'%Y-%m-%d')",dataDate);
|
||||
RStatOrgDPO rStatOrgDPO = rStatOrgDMapper.selectOne(rStatOrgDPOQueryWrapper);
|
||||
@@ -772,7 +773,7 @@ public class RStatHarmonicServiceImpl implements RStatHarmonicService {
|
||||
rStatHarmonicDPO.setDataDate(date);
|
||||
rStatHarmonicDPO.setHarmonicType(dictData.getId());
|
||||
rStatHarmonicDPO.setDataType(dataTypeMap.get(DicDataEnum.MAINNET_POINT.getCode()).getId());
|
||||
rStatHarmonicDPO.setMeasurementTypeClass(getmeasurementType(k,lineSortMap));
|
||||
rStatHarmonicDPO.setMeasurementTypeClass(k);
|
||||
rStatHarmonicDPO.setOverLimitMeasurement(getSteadyStatisData(dictData,rMpPartHarmonicDetailDS,rMpSurplusHarmonicDetailDS));
|
||||
if(rStatOrgDPO.getEffectiveMeasurement()==0){
|
||||
rStatHarmonicDPO.setOverLimitMeasurementRatio(1.00);
|
||||
|
||||
@@ -108,7 +108,7 @@ public class RStatHarmonicVoltageServiceImpl implements RStatHarmonicVoltageServ
|
||||
/*主网*/
|
||||
if (!CollectionUtils.isEmpty(deptGetChildrenMoreDTO.getLineBaseList())) {
|
||||
List<LineDevGetDTO> lineBaseList = deptGetChildrenMoreDTO.getLineBaseList();
|
||||
Map<Integer, List<LineDevGetDTO>> collect = lineBaseList.stream().collect(Collectors.groupingBy(LineDevGetDTO::getLineType));
|
||||
Map<String, List<LineDevGetDTO>> collect = lineBaseList.stream().collect(Collectors.groupingBy(LineDevGetDTO::getLineTag));
|
||||
collect.forEach((k, v) -> {
|
||||
List<String> collect1 = v.stream().map(LineDevGetDTO::getPointId).collect(Collectors.toList());
|
||||
Map<String, List<LineDevGetDTO>> collect2 = v.stream().collect(Collectors.groupingBy(LineDevGetDTO::getVoltageLevel));
|
||||
@@ -128,7 +128,7 @@ public class RStatHarmonicVoltageServiceImpl implements RStatHarmonicVoltageServ
|
||||
rStatOrgMPOQueryWrapper.clear();
|
||||
rStatOrgMPOQueryWrapper.select("effective_measurement_accrued").
|
||||
eq("org_no", deptGetChildrenMoreDTO.getUnitId()).
|
||||
eq("measurement_type_class", getmeasurementType(k, lineSortMap)).
|
||||
eq("measurement_type_class", k).
|
||||
eq("data_type", dataTypeMap.get(DicDataEnum.MAINNET_POINT.getCode()).getId()).
|
||||
eq("DATE_FORMAT( data_date ,'%Y-%m')",dataDate.substring(0, 7));
|
||||
RStatOrgMPO rStatOrgMPO = rStatOrgMMapper.selectOne(rStatOrgMPOQueryWrapper);
|
||||
@@ -144,7 +144,7 @@ public class RStatHarmonicVoltageServiceImpl implements RStatHarmonicVoltageServ
|
||||
rStatHarmonicVoltageMPO.setDataDate(date);
|
||||
rStatHarmonicVoltageMPO.setHarmonicType(dictData.getId());
|
||||
rStatHarmonicVoltageMPO.setDataType(dataTypeMap.get(DicDataEnum.MAINNET_POINT.getCode()).getId());
|
||||
rStatHarmonicVoltageMPO.setMeasurementTypeClass(getmeasurementType(k, lineSortMap));
|
||||
rStatHarmonicVoltageMPO.setMeasurementTypeClass(k);
|
||||
rStatHarmonicVoltageMPO.setVoltageType(k1);
|
||||
|
||||
/**4、累计超标监测点数*/
|
||||
@@ -152,7 +152,7 @@ public class RStatHarmonicVoltageServiceImpl implements RStatHarmonicVoltageServ
|
||||
/*3、日均超标监测点数,6、日均超标监测点数占比*/
|
||||
harmonicVoltageDPOQueryWrapper.clear();
|
||||
harmonicVoltageDPOQueryWrapper.eq("org_no", deptGetChildrenMoreDTO.getUnitId()).
|
||||
eq("measurement_type_class", getmeasurementType(k, lineSortMap)).
|
||||
eq("measurement_type_class", k).
|
||||
eq("data_type", dataTypeMap.get(DicDataEnum.MAINNET_POINT.getCode()).getId()).
|
||||
eq("harmonic_type", dictData.getId()).
|
||||
eq("voltageType",k1).
|
||||
@@ -229,7 +229,7 @@ public class RStatHarmonicVoltageServiceImpl implements RStatHarmonicVoltageServ
|
||||
/*主网*/
|
||||
if(!CollectionUtils.isEmpty(deptGetChildrenMoreDTO.getLineBaseList())){
|
||||
List<LineDevGetDTO> lineBaseList = deptGetChildrenMoreDTO.getLineBaseList();
|
||||
Map<Integer, List<LineDevGetDTO>> collect = lineBaseList.stream().collect(Collectors.groupingBy(LineDevGetDTO::getLineType));
|
||||
Map<String, List<LineDevGetDTO>> collect = lineBaseList.stream().collect(Collectors.groupingBy(LineDevGetDTO::getLineTag));
|
||||
collect.forEach((k, v)->{
|
||||
Map<String, List<LineDevGetDTO>> collect2 = v.stream().collect(Collectors.groupingBy(LineDevGetDTO::getVoltageLevel));
|
||||
collect2.forEach((k1, v1) -> {
|
||||
@@ -252,7 +252,7 @@ public class RStatHarmonicVoltageServiceImpl implements RStatHarmonicVoltageServ
|
||||
rStatOrgDPOQueryWrapper.clear();
|
||||
rStatOrgDPOQueryWrapper.select("effective_measurement").
|
||||
eq("org_no",deptGetChildrenMoreDTO.getUnitId()).
|
||||
eq("measurement_type_class",getmeasurementType(k,lineSortMap)).
|
||||
eq("measurement_type_class",k).
|
||||
eq("data_type",dataTypeMap.get(DicDataEnum.MAINNET_POINT.getCode()).getId()).
|
||||
eq("DATE_FORMAT( data_date ,'%Y-%m-%d')",dataDate);
|
||||
RStatOrgDPO rStatOrgDPO = rStatOrgDMapper.selectOne(rStatOrgDPOQueryWrapper);
|
||||
@@ -265,7 +265,7 @@ public class RStatHarmonicVoltageServiceImpl implements RStatHarmonicVoltageServ
|
||||
rStatHarmonicVoltageDPO.setDataDate(date);
|
||||
rStatHarmonicVoltageDPO.setHarmonicType(dictData.getId());
|
||||
rStatHarmonicVoltageDPO.setDataType(dataTypeMap.get(DicDataEnum.MAINNET_POINT.getCode()).getId());
|
||||
rStatHarmonicVoltageDPO.setMeasurementTypeClass(getmeasurementType(k,lineSortMap));
|
||||
rStatHarmonicVoltageDPO.setMeasurementTypeClass(k);
|
||||
rStatHarmonicVoltageDPO.setVoltageType(k1);
|
||||
rStatHarmonicVoltageDPO.setOverLimitMeasurementAverage(getSteadyStatisData(dictData,rMpPartHarmonicDetailDS,rMpSurplusHarmonicDetailDS));
|
||||
if(rStatOrgDPO.getEffectiveMeasurement()==0){
|
||||
|
||||
@@ -120,7 +120,7 @@ public class RStatOrgServiceImpl implements RStatOrgService {
|
||||
/*主网*/
|
||||
if(!CollectionUtils.isEmpty(deptGetChildrenMoreDTO.getLineBaseList())){
|
||||
List<LineDevGetDTO> lineBaseList = deptGetChildrenMoreDTO.getLineBaseList();
|
||||
Map<Integer, List<LineDevGetDTO>> collect = lineBaseList.stream().collect(Collectors.groupingBy(LineDevGetDTO::getLineType));
|
||||
Map<String, List<LineDevGetDTO>> collect = lineBaseList.stream().collect(Collectors.groupingBy(LineDevGetDTO::getLineTag));
|
||||
collect.forEach((k, v)->{
|
||||
|
||||
List<String> collect1 = v.stream().map(LineDevGetDTO::getPointId).collect(Collectors.toList());
|
||||
@@ -128,7 +128,7 @@ public class RStatOrgServiceImpl implements RStatOrgService {
|
||||
rStatOrgYPO.setOrgNo(deptGetChildrenMoreDTO.getUnitId());
|
||||
rStatOrgYPO.setDataDate(date);
|
||||
rStatOrgYPO.setDataType(dataTypeMap.get(DicDataEnum.MAINNET_POINT.getCode()).getId());
|
||||
rStatOrgYPO.setMeasurementTypeClass(getmeasurementType(k,lineSortMap));
|
||||
rStatOrgYPO.setMeasurementTypeClass(k);
|
||||
rStatOrgYPO.setAllCount(v.size());
|
||||
/*2、2、日均有效接入监测点数2、日均有效接入监测点数*/
|
||||
rOperatingMonitorDPOQueryWrapper.clear();
|
||||
@@ -398,7 +398,7 @@ public class RStatOrgServiceImpl implements RStatOrgService {
|
||||
/*主网*/
|
||||
if(!CollectionUtils.isEmpty(deptGetChildrenMoreDTO.getLineBaseList())){
|
||||
List<LineDevGetDTO> lineBaseList = deptGetChildrenMoreDTO.getLineBaseList();
|
||||
Map<Integer, List<LineDevGetDTO>> collect = lineBaseList.stream().collect(Collectors.groupingBy(LineDevGetDTO::getLineType));
|
||||
Map<String, List<LineDevGetDTO>> collect = lineBaseList.stream().collect(Collectors.groupingBy(LineDevGetDTO::getLineTag));
|
||||
collect.forEach((k, v)->{
|
||||
|
||||
List<String> collect1 = v.stream().map(LineDevGetDTO::getPointId).collect(Collectors.toList());
|
||||
@@ -406,7 +406,7 @@ public class RStatOrgServiceImpl implements RStatOrgService {
|
||||
rStatOrgQPO.setOrgNo(deptGetChildrenMoreDTO.getUnitId());
|
||||
rStatOrgQPO.setDataDate(date);
|
||||
rStatOrgQPO.setDataType(dataTypeMap.get(DicDataEnum.MAINNET_POINT.getCode()).getId());
|
||||
rStatOrgQPO.setMeasurementTypeClass(getmeasurementType(k,lineSortMap));
|
||||
rStatOrgQPO.setMeasurementTypeClass(k);
|
||||
rStatOrgQPO.setAllCount(v.size());
|
||||
/*2、2、日均有效接入监测点数2、日均有效接入监测点数*/
|
||||
rOperatingMonitorDPOQueryWrapper.clear();
|
||||
@@ -677,7 +677,7 @@ public class RStatOrgServiceImpl implements RStatOrgService {
|
||||
/*主网*/
|
||||
if(!CollectionUtils.isEmpty(deptGetChildrenMoreDTO.getLineBaseList())){
|
||||
List<LineDevGetDTO> lineBaseList = deptGetChildrenMoreDTO.getLineBaseList();
|
||||
Map<Integer, List<LineDevGetDTO>> collect = lineBaseList.stream().collect(Collectors.groupingBy(LineDevGetDTO::getLineType));
|
||||
Map<String, List<LineDevGetDTO>> collect = lineBaseList.stream().collect(Collectors.groupingBy(LineDevGetDTO::getLineTag));
|
||||
collect.forEach((k, v)->{
|
||||
|
||||
List<String> collect1 = v.stream().map(LineDevGetDTO::getPointId).collect(Collectors.toList());
|
||||
@@ -685,7 +685,7 @@ public class RStatOrgServiceImpl implements RStatOrgService {
|
||||
rStatOrgMPO.setOrgNo(deptGetChildrenMoreDTO.getUnitId());
|
||||
rStatOrgMPO.setDataDate(date);
|
||||
rStatOrgMPO.setDataType(dataTypeMap.get(DicDataEnum.MAINNET_POINT.getCode()).getId());
|
||||
rStatOrgMPO.setMeasurementTypeClass(getmeasurementType(k,lineSortMap));
|
||||
rStatOrgMPO.setMeasurementTypeClass(k);
|
||||
rStatOrgMPO.setAllCount(v.size());
|
||||
/*2、2、日均有效接入监测点数2、日均有效接入监测点数*/
|
||||
rOperatingMonitorDPOQueryWrapper.clear();
|
||||
@@ -934,7 +934,7 @@ public class RStatOrgServiceImpl implements RStatOrgService {
|
||||
/*主网*/
|
||||
if(!CollectionUtils.isEmpty(deptGetChildrenMoreDTO.getLineBaseList())){
|
||||
List<LineDevGetDTO> lineBaseList = deptGetChildrenMoreDTO.getLineBaseList();
|
||||
Map<Integer, List<LineDevGetDTO>> collect = lineBaseList.stream().collect(Collectors.groupingBy(LineDevGetDTO::getLineType));
|
||||
Map<String, List<LineDevGetDTO>> collect = lineBaseList.stream().collect(Collectors.groupingBy(LineDevGetDTO::getLineTag));
|
||||
collect.forEach((k, v)->{
|
||||
|
||||
List<String> collect1 = v.stream().map(LineDevGetDTO::getPointId).collect(Collectors.toList());
|
||||
@@ -942,7 +942,7 @@ public class RStatOrgServiceImpl implements RStatOrgService {
|
||||
rStatOrgDPO.setOrgNo(deptGetChildrenMoreDTO.getUnitId());
|
||||
rStatOrgDPO.setDataDate(date);
|
||||
rStatOrgDPO.setDataType(dataTypeMap.get(DicDataEnum.MAINNET_POINT.getCode()).getId());
|
||||
rStatOrgDPO.setMeasurementTypeClass(getmeasurementType(k,lineSortMap));
|
||||
rStatOrgDPO.setMeasurementTypeClass(k);
|
||||
rStatOrgDPO.setAllCount(v.size());
|
||||
/*2、接入有效监测点数*/
|
||||
rOperatingMonitorDPOQueryWrapper.clear();
|
||||
|
||||
Reference in New Issue
Block a user