1.添加终端周期检测功能
This commit is contained in:
@@ -25,6 +25,8 @@ import com.njcn.harmonic.utils.PubUtils;
|
||||
import com.njcn.supervision.pojo.param.user.UserReportParam;
|
||||
import com.njcn.supervision.pojo.vo.user.UserLedgerVO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
@@ -38,7 +40,7 @@ import java.util.stream.Collectors;
|
||||
* @Description: <描述>
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
@RequiredArgsConstructor
|
||||
public class SteadyQualifyServiceImpl implements SteadyQualifyService {
|
||||
|
||||
private final GeneralDeviceInfoClient generalDeviceInfoClient;
|
||||
@@ -51,6 +53,13 @@ public class SteadyQualifyServiceImpl implements SteadyQualifyService {
|
||||
|
||||
private final LineFeignClient lineFeignClient;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Value("${version.used:master}")
|
||||
private String versionUsed;
|
||||
|
||||
|
||||
@Override
|
||||
public List<SteadyQualifyVO> getSteadyQualifyData(DeviceInfoParam.BusinessParam steadyParam) {
|
||||
List<SteadyQualifyVO> steadyQualifyList = new ArrayList<>();
|
||||
@@ -304,8 +313,13 @@ public class SteadyQualifyServiceImpl implements SteadyQualifyService {
|
||||
//供电公司集合
|
||||
List<SteadyQualifyVO> powerCompanyList = steadyQualifyMapper.getLineInfoByList(generalDeviceDTO.getGdIndexes());
|
||||
dealChildrenData(substationList, otherLineList, temMap, true);
|
||||
dealChildrenData(powerCompanyList, substationList, temMap, false);
|
||||
return powerCompanyList;
|
||||
|
||||
if("liaoning".equals(versionUsed)){
|
||||
return substationList;
|
||||
}else {
|
||||
dealChildrenData(powerCompanyList, substationList, temMap, false);
|
||||
return powerCompanyList;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,7 +29,9 @@ import com.njcn.harmonic.utils.PubUtils;
|
||||
import com.njcn.supervision.pojo.param.user.UserReportParam;
|
||||
import com.njcn.supervision.pojo.vo.user.UserLedgerVO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
@@ -44,7 +46,7 @@ import java.util.stream.Collectors;
|
||||
* @Description: <描述>
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
@RequiredArgsConstructor
|
||||
public class THDistortionServiceImpl implements THDistortionService {
|
||||
|
||||
private final GeneralInfo generalInfo;
|
||||
@@ -53,6 +55,11 @@ public class THDistortionServiceImpl implements THDistortionService {
|
||||
private final RMpVThdMapper rMpVThdMapper;
|
||||
private final LineFeignClient lineFeignClient;
|
||||
private final UserLedgerFeignClient userLedgerFeignClient;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Value("${version.used:master}")
|
||||
private String versionUsed;
|
||||
|
||||
@Override
|
||||
public List<THDistortionVO> getTHDistortionData(DeviceInfoParam.BusinessParam thDistortionParam, Integer nodeType) {
|
||||
@@ -83,15 +90,14 @@ public class THDistortionServiceImpl implements THDistortionService {
|
||||
//组装父级数据树
|
||||
List<THDistortionVO> treeList = getTreeData(lineIndexes, condition, userLedgerVOMap, thDistortionParam.getPowerFlag());
|
||||
thDistortionVO.setChildren(treeList);
|
||||
|
||||
thDistortionVOS.add(thDistortionVO);
|
||||
}
|
||||
if (nodeType == 1) {
|
||||
thDistortionVOS.stream().forEach(data -> {
|
||||
thDistortionVOS.forEach(data -> {
|
||||
if (CollUtil.isNotEmpty(data.getChildren())) {
|
||||
//市
|
||||
List<THDistortionVO> sub = data.getChildren().stream().flatMap(dto -> dto.getChildren().stream()).collect(Collectors.toList());
|
||||
sub.stream().forEach(x -> {
|
||||
sub.forEach(x -> {
|
||||
x.setChildren(new ArrayList<>());
|
||||
});
|
||||
data.setChildren(sub);
|
||||
@@ -117,7 +123,7 @@ public class THDistortionServiceImpl implements THDistortionService {
|
||||
// continue;
|
||||
// }
|
||||
// type.add(thDistortionVO.getName() + "\n(" + seekLineNum(thDistortionVO) + ")");
|
||||
type.add(thDistortionVO.getName() );
|
||||
type.add(thDistortionVO.getName());
|
||||
// List<PublicDTO> condition = getCondition(lineIndexes, thDistortionCensusParam.getSearchBeginTime(), thDistortionCensusParam.getSearchEndTime());
|
||||
single.add(thDistortionVO.getDistortion());
|
||||
}
|
||||
@@ -359,17 +365,20 @@ public class THDistortionServiceImpl implements THDistortionService {
|
||||
//List<THDistortionVO> deviceList = thDistortionMapper.getLineInfoByList(busBarList.stream().map(THDistortionVO::getPid).distinct().collect(Collectors.toList()));
|
||||
//变电站集合
|
||||
List<THDistortionVO> substationList = thDistortionMapper.getLineInfoByList(monitorList.stream().map(it -> it.getPidS().split(StrUtil.COMMA)[LineBaseEnum.SUB_LEVEL.getCode()]).distinct().collect(Collectors.toList()));
|
||||
//供电公司集合
|
||||
List<THDistortionVO> powerCompanyList = thDistortionMapper.getLineInfoByList(monitorList.stream().map(it -> it.getPidS().split(StrUtil.COMMA)[LineBaseEnum.GD_LEVEL.getCode()]).distinct().collect(Collectors.toList()));
|
||||
|
||||
if (!CollectionUtils.isEmpty(monitorList)) {
|
||||
setChildesList(substationList, powerLedgerList, userTemList);
|
||||
setFatherDistortion(substationList);
|
||||
powerCompanyList = powerCompanyList.stream().peek(item -> item.setChildren(getChildCategoryList(item, substationList))).collect(Collectors.toList());
|
||||
// setFatherDistortion(powerCompanyList);
|
||||
setPowerDistortion(powerCompanyList);
|
||||
if ("liaoning".equals(versionUsed)) {
|
||||
return substationList;
|
||||
} else {
|
||||
//供电公司集合
|
||||
List<THDistortionVO> powerCompanyList = thDistortionMapper.getLineInfoByList(monitorList.stream().map(it -> it.getPidS().split(StrUtil.COMMA)[LineBaseEnum.GD_LEVEL.getCode()]).distinct().collect(Collectors.toList()));
|
||||
powerCompanyList = powerCompanyList.stream().peek(item -> item.setChildren(getChildCategoryList(item, substationList))).collect(Collectors.toList());
|
||||
setPowerDistortion(powerCompanyList);
|
||||
return powerCompanyList;
|
||||
}
|
||||
}
|
||||
return powerCompanyList;
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user