1.监测评分权重,新增字段添加
2.企业概览页面接口 在线率、畸变率和暂降次数
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package com.njcn.harmonic.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 通用树
|
||||
* @Author: wr
|
||||
* @Date: 2023/8/30 9:41
|
||||
*/
|
||||
@Data
|
||||
public class NodeVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("父级id")
|
||||
private String pid;
|
||||
|
||||
@ApiModelProperty("名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("次数")
|
||||
private Integer data = 0;
|
||||
|
||||
@ApiModelProperty("子级")
|
||||
private List<NodeVO> children;
|
||||
|
||||
}
|
||||
@@ -44,7 +44,17 @@ public class THDController extends BaseController {
|
||||
@ApiImplicitParam(name = "thDistortionParam", value = "谐波总畸变率参数", required = true)
|
||||
public HttpResult<List<THDistortionVO>> getTHDistortionData(@RequestBody @Validated DeviceInfoParam.BusinessParam thDistortionParam){
|
||||
String methodDescribe = getMethodDescribe("getTHDistortionData");
|
||||
List<THDistortionVO> list = thDistortionService.getTHDistortionData(thDistortionParam);
|
||||
List<THDistortionVO> list = thDistortionService.getTHDistortionData(thDistortionParam,0);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getNodeTHDistortionData")
|
||||
@ApiOperation("谐波总畸变率节点图")
|
||||
@ApiImplicitParam(name = "thDistortionParam", value = "谐波总畸变率参数", required = true)
|
||||
public HttpResult<List<THDistortionVO>> getNodeTHDistortionData(@RequestBody @Validated DeviceInfoParam.BusinessParam thDistortionParam){
|
||||
String methodDescribe = getMethodDescribe("getNodeTHDistortionData");
|
||||
List<THDistortionVO> list = thDistortionService.getTHDistortionData(thDistortionParam,1);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ public interface THDistortionService {
|
||||
* @return
|
||||
*/
|
||||
|
||||
List<THDistortionVO> getTHDistortionData(DeviceInfoParam.BusinessParam thDistortionParam);
|
||||
List<THDistortionVO> getTHDistortionData(DeviceInfoParam.BusinessParam thDistortionParam,Integer nodeType);
|
||||
|
||||
/**
|
||||
* 功能描述: 获取总畸变率图表
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.njcn.device.pq.enums.LineBaseEnum;
|
||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.device.pq.pojo.vo.LineDetailDataVO;
|
||||
import com.njcn.device.pq.pojo.vo.TerminalOnlineRateDataVO;
|
||||
import com.njcn.harmonic.mapper.RMpVThdMapper;
|
||||
import com.njcn.harmonic.mapper.THDistortionMapper;
|
||||
import com.njcn.harmonic.pojo.dto.PublicDTO;
|
||||
@@ -55,7 +56,7 @@ public class THDistortionServiceImpl implements THDistortionService {
|
||||
private final IRStatDataVDService statDataVDService;
|
||||
|
||||
@Override
|
||||
public List<THDistortionVO> getTHDistortionData(DeviceInfoParam.BusinessParam thDistortionParam) {
|
||||
public List<THDistortionVO> getTHDistortionData(DeviceInfoParam.BusinessParam thDistortionParam,Integer nodeType) {
|
||||
List<THDistortionVO> thDistortionVOS = new ArrayList<>();
|
||||
|
||||
//按照条件获取实际运行终端综合信息
|
||||
@@ -80,7 +81,18 @@ public class THDistortionServiceImpl implements THDistortionService {
|
||||
|
||||
thDistortionVOS.add(thDistortionVO);
|
||||
}
|
||||
|
||||
if(nodeType==1){
|
||||
thDistortionVOS.stream().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->{
|
||||
x.setChildren(new ArrayList<>());
|
||||
});
|
||||
data.setChildren(sub);
|
||||
}
|
||||
});
|
||||
}
|
||||
return thDistortionVOS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user