Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -104,4 +104,9 @@ public class PollutionLineInfoDTO {
|
||||
* 实际安装位置
|
||||
*/
|
||||
private String actualArea;
|
||||
|
||||
/**
|
||||
* 监测点运行状态
|
||||
*/
|
||||
private String runFlag;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,8 @@ public class DeviceInfo {
|
||||
private String ip;
|
||||
//终端型号
|
||||
private String devType;
|
||||
//前置类型
|
||||
private String comType;
|
||||
//挂载单位
|
||||
private String org_name;
|
||||
//组织名称
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.njcn.device.pq.pojo.param;
|
||||
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
@@ -12,6 +13,7 @@ import java.time.format.DateTimeFormatter;
|
||||
* @CreateTime: 2026-07-06
|
||||
* @Description:
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class TerminalCheckParam extends BaseParam {
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
@@ -26,4 +27,7 @@ public class LoadTypeVO implements Serializable {
|
||||
*/
|
||||
@ApiModelProperty("干扰源暂降次数")
|
||||
private Integer count;
|
||||
|
||||
|
||||
private List<String> loadTypeList;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ public class RunManageVO {
|
||||
private Integer runNo;
|
||||
|
||||
@ApiModelProperty(name = "id",value = "监测点序号")
|
||||
private Integer id;
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(name = "lineName",value = "监测点名称")
|
||||
private String lineName;
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||
import com.njcn.device.pq.pojo.po.RStatOnlinerateD;
|
||||
import com.njcn.device.pq.pojo.vo.GridDiagramProVO;
|
||||
import com.njcn.device.pq.pojo.vo.GridDiagramVO;
|
||||
import com.njcn.device.pq.pojo.vo.LoadTypeVO;
|
||||
import com.njcn.device.pq.service.GridDiagramService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -135,4 +136,13 @@ public class GridDiagramController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, gridDiagramOnLineRateD, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/loadTypeVOList")
|
||||
@ApiOperation("干扰源类型统计")
|
||||
public HttpResult<List<LoadTypeVO>> loadTypeVOList(@RequestBody GridDiagramParam param){
|
||||
String methodDescribe = getMethodDescribe("loadTypeVOList");
|
||||
List<LoadTypeVO> loadTypeVOList = gridDiagramService.loadTypeVOList(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, loadTypeVOList, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,9 +97,9 @@ public class TerminalAlarmController extends BaseController {
|
||||
@PostMapping("/terminalCheckPage")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("终端检测告警")
|
||||
@ApiImplicitParam(name = "alarmParam", value = "告警类型")
|
||||
@ApiImplicitParam(name = "terminalCheckParam", value = "告警类型")
|
||||
public HttpResult<Page<TerminalCheckVO>> terminalCheckPage(@RequestBody @Validated TerminalCheckParam terminalCheckParam){
|
||||
String methodDescribe = getMethodDescribe("alarmInfoList");
|
||||
String methodDescribe = getMethodDescribe("terminalCheckPage");
|
||||
Page<TerminalCheckVO> res = terminalAlarmService.terminalCheckPage(terminalCheckParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||
import com.njcn.device.pq.pojo.po.RStatOnlinerateD;
|
||||
import com.njcn.device.pq.pojo.vo.GridDiagramProVO;
|
||||
import com.njcn.device.pq.pojo.vo.GridDiagramVO;
|
||||
import com.njcn.device.pq.pojo.vo.LoadTypeVO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -90,4 +91,12 @@ public interface GridDiagramService {
|
||||
* @Date: 2024/5/4 18:35
|
||||
*/
|
||||
List<RStatOnlinerateD> getGridDiagramOnLineRateD(StatisticsBizBaseParam param);
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 根据干扰源进行分组
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<LoadTypeVO> loadTypeVOList(GridDiagramParam param);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
||||
import com.njcn.device.biz.enums.RunFlagEnum;
|
||||
import com.njcn.device.biz.pojo.dto.DeptGetChildrenMoreDTO;
|
||||
import com.njcn.device.biz.pojo.dto.LineDevGetDTO;
|
||||
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
||||
@@ -24,9 +25,11 @@ import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||
import com.njcn.device.pq.pojo.param.GridDiagramParam;
|
||||
import com.njcn.device.pq.pojo.param.LineBaseQueryParam;
|
||||
import com.njcn.device.pq.pojo.param.OnlineRateParam;
|
||||
import com.njcn.device.pq.pojo.param.dataClean.MonitorBaseParam;
|
||||
import com.njcn.device.pq.pojo.po.*;
|
||||
import com.njcn.device.pq.pojo.vo.GridDiagramProVO;
|
||||
import com.njcn.device.pq.pojo.vo.GridDiagramVO;
|
||||
import com.njcn.device.pq.pojo.vo.LoadTypeVO;
|
||||
import com.njcn.device.pq.pojo.vo.RStatOnlineRateVO;
|
||||
import com.njcn.device.pq.service.*;
|
||||
import com.njcn.device.rstatintegrity.mapper.RStatIntegrityDMapper;
|
||||
@@ -45,6 +48,7 @@ import java.util.stream.Stream;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
@@ -569,6 +573,27 @@ public class GridDiagramServiceImpl implements GridDiagramService {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LoadTypeVO> loadTypeVOList(@NotNull GridDiagramParam param) {
|
||||
List<LoadTypeVO> returnList = new ArrayList<>();
|
||||
MonitorBaseParam monitorBaseParam = new MonitorBaseParam();
|
||||
monitorBaseParam.setDeptId(param.getOrgId());
|
||||
monitorBaseParam.setLineRunFlag(RunFlagEnum.RUNNING.getStatus());
|
||||
List<String> list = commTerminalService.getRunMonitorByDept(monitorBaseParam);
|
||||
if(CollUtil.isNotEmpty(list)) {
|
||||
List<LineDetail> lineDetailList =lineDetailMapper.selectList(new LambdaQueryWrapper<LineDetail>().select(LineDetail::getLoadType, LineDetail::getId).in(LineDetail::getId, list));
|
||||
Map<String,List<String>> map = lineDetailList.stream().collect(Collectors.groupingBy(LineDetail::getLoadType,Collectors.mapping(LineDetail::getId, Collectors.toList())));
|
||||
map.forEach((k,v)->{
|
||||
LoadTypeVO loadTypeVO = new LoadTypeVO();
|
||||
loadTypeVO.setName(k);
|
||||
loadTypeVO.setCount(v.size());
|
||||
loadTypeVO.setLoadTypeList(v);
|
||||
returnList.add(loadTypeVO);
|
||||
});
|
||||
}
|
||||
return returnList;
|
||||
}
|
||||
|
||||
|
||||
private void getDevStatisticsData(List<GridDiagramVO.StatisticsData> statisticsData, List<GridDiagramVO.StatisticsData> gwStatisticsData, List<LineDevGetDTO> lineBaseList, List<String> voltageIds) {
|
||||
GridDiagramVO.StatisticsData data;
|
||||
|
||||
@@ -32,6 +32,8 @@ import com.njcn.system.pojo.po.Area;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.web.utils.RequestUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
@@ -48,7 +50,7 @@ import java.util.stream.Stream;
|
||||
* @date 2021/7/19
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
@RequiredArgsConstructor
|
||||
public class TerminalTreeServiceImpl implements TerminalTreeService {
|
||||
|
||||
private final LineMapper lineMapper;
|
||||
@@ -67,6 +69,8 @@ public class TerminalTreeServiceImpl implements TerminalTreeService {
|
||||
|
||||
private final UserLedgerService userLedgerService;
|
||||
|
||||
@Value("${version.used:master}")
|
||||
private String versionUsed;
|
||||
/**
|
||||
* 台账页面终端树
|
||||
*
|
||||
@@ -126,16 +130,7 @@ public class TerminalTreeServiceImpl implements TerminalTreeService {
|
||||
provinceList.forEach(province -> province.setChildren(getChildren(province, gdList)));
|
||||
projectList.forEach(project -> project.setChildren(getChildren(project, provinceList)));
|
||||
|
||||
/* if (CollectionUtil.isNotEmpty(allList)) {
|
||||
TerminalTree terminalTree = new TerminalTree();
|
||||
terminalTree.setId("9999999");
|
||||
terminalTree.setLevel(0);
|
||||
terminalTree.setName("台账管理");
|
||||
if (CollectionUtil.isNotEmpty(projectList)) {
|
||||
terminalTree.setChildren(projectList);
|
||||
}
|
||||
taiZhang.add(terminalTree);
|
||||
}*/
|
||||
|
||||
return projectList;
|
||||
}
|
||||
|
||||
@@ -323,8 +318,6 @@ public class TerminalTreeServiceImpl implements TerminalTreeService {
|
||||
});
|
||||
temMap = temList.stream().collect(Collectors.groupingBy(TerminalTree::getPid));
|
||||
}
|
||||
|
||||
|
||||
//处理变电站
|
||||
dealChildrenData(subList, otherLineList, temMap, true);
|
||||
|
||||
@@ -332,11 +325,18 @@ public class TerminalTreeServiceImpl implements TerminalTreeService {
|
||||
//Integer[] arr = {1};
|
||||
//subList.forEach(item->item.getChildren().forEach(it->it.setName((arr[0]++ +"_"+it.getName()))));
|
||||
//处理供电公司
|
||||
dealChildrenData(gdList, subList, null, false);
|
||||
|
||||
|
||||
|
||||
if (deviceInfoParam.getStatisticalType().getCode().equalsIgnoreCase(StatisticsEnum.POWER_NETWORK.getCode())) {
|
||||
terminalTree.setChildren(gdList);
|
||||
if("liaoning".equals(versionUsed)){
|
||||
terminalTree.setChildren(subList);
|
||||
}else {
|
||||
dealChildrenData(gdList, subList, null, false);
|
||||
terminalTree.setChildren(gdList);
|
||||
}
|
||||
} else {
|
||||
dealChildrenData(gdList, subList, null, false);
|
||||
//还需要额外处理省会
|
||||
dealChildrenData(proList, gdList, null, false);
|
||||
terminalTree.setChildren(proList);
|
||||
|
||||
@@ -497,13 +497,13 @@ public class GeneralDeviceService {
|
||||
}
|
||||
List<Line> lines = terminalBaseService.getLineById(lineIds);
|
||||
for (SimpleDTO simpleDTO : scales) {
|
||||
if(ObjectUtil.isNull(type)){
|
||||
/* if(ObjectUtil.isNull(type)){
|
||||
List<String> voltageScaleIds = terminalBaseService.getSubIdByScale(subIds, simpleDTO.getId());
|
||||
generalDeviceDTOS.add(assembleDataByLine(simpleDTO, lines, voltageScaleIds, LineBaseEnum.SUB_LEVEL.getCode()));
|
||||
}else{
|
||||
}else{*/
|
||||
List<String> voltageScaleIds = terminalBaseService.getVoltageIdByScale(subVIds, simpleDTO.getId());
|
||||
generalDeviceDTOS.add(assembleDataByLine(simpleDTO, lines, voltageScaleIds, LineBaseEnum.SUB_V_LEVEL.getCode()));
|
||||
}
|
||||
// }
|
||||
}
|
||||
return generalDeviceDTOS;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
|
||||
<select id="getRunManageCommList" resultType="com.njcn.device.pq.pojo.vo.RunManageVO">
|
||||
SELECT
|
||||
linedetail.Num AS id,
|
||||
linedetail.id AS id,
|
||||
linedetail.Num AS runNo,
|
||||
line.NAME AS lineName,
|
||||
area.NAME AS areaName,
|
||||
gd.NAME AS gdName,
|
||||
@@ -144,7 +145,8 @@
|
||||
|
||||
<select id="getRunManageList" resultType="com.njcn.device.pq.pojo.vo.RunManageVO">
|
||||
SELECT
|
||||
linedetail.Num AS id,
|
||||
linedetail.id AS id,
|
||||
linedetail.Num AS runNo,
|
||||
line.NAME AS lineName,
|
||||
area.NAME AS areaName,
|
||||
gd.NAME AS gdName,
|
||||
@@ -514,7 +516,14 @@
|
||||
pv.scale lineVoltage,
|
||||
pqsub.scale subVoltage,
|
||||
lineDetail.monitor_id monitorId,
|
||||
lineDetail.Actual_Area actualArea
|
||||
lineDetail.Actual_Area actualArea,
|
||||
CASE lineDetail.Run_Flag
|
||||
WHEN 0 THEN'投运'
|
||||
WHEN 1 THEN'检修'
|
||||
WHEN 2 THEN'停运'
|
||||
WHEN 3 THEN'调试'
|
||||
WHEN 4 THEN'退运'
|
||||
END AS runFlag
|
||||
FROM
|
||||
pq_line line,
|
||||
pq_line_detail lineDetail,
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
pq_device.Id id,
|
||||
pq_device.IP ip,
|
||||
s1.Name devType,
|
||||
S3.Name comType,
|
||||
pq_device.Port port,
|
||||
pq_line.Name name,
|
||||
sub.Name subName,
|
||||
@@ -25,15 +26,16 @@
|
||||
LEFT JOIN pq_line sub on pq_line.pid = sub.id
|
||||
LEFT JOIN pq_device_process on pq_device_process.id = pq_device.id
|
||||
LEFT JOIN pq_dev_type s1 ON pq_device.Dev_Type = s1.id
|
||||
LEFT JOIN sys_dict_data s3 ON pq_device.Front_Type = s3.id
|
||||
LEFT JOIN sys_dict_data s2 ON pq_device.Manufacturer = s2.id
|
||||
<where>
|
||||
<if test="nodeDeviceParam.ip!=null and nodeDeviceParam.ip != ''">
|
||||
pq_node.ip=#{nodeDeviceParam.ip}
|
||||
</if>
|
||||
<if test="nodeDeviceParam.devId!=null and nodeDeviceParam.devId != ''">
|
||||
pq_device.id=#{nodeDeviceParam.devId}
|
||||
</if>
|
||||
<if test="nodeDeviceParam.runFlag!=null and nodeDeviceParam.runFlag.size()!=0">
|
||||
pq_node.ip=#{nodeDeviceParam.ip}
|
||||
</if>
|
||||
<if test="nodeDeviceParam.devId!=null and nodeDeviceParam.devId != ''">
|
||||
pq_device.id=#{nodeDeviceParam.devId}
|
||||
</if>
|
||||
<if test="nodeDeviceParam.runFlag!=null and nodeDeviceParam.runFlag.size()!=0">
|
||||
AND pq_device.Run_Flag in
|
||||
<foreach collection="nodeDeviceParam.runFlag" open="(" close=")" item="item" separator=",">
|
||||
#{item}
|
||||
|
||||
@@ -152,9 +152,9 @@ public class UserLedgerController extends BaseController {
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPLOAD)
|
||||
@PostMapping("/userCheckUpload")
|
||||
@ApiOperation("周期检测")
|
||||
@ApiImplicitParam(name = "userReportParam", value = "实体参数", required = true)
|
||||
@ApiImplicitParam(name = "terminalCheckParam", value = "实体参数", required = true)
|
||||
public HttpResult<Boolean> userCheckUpload(@RequestBody @Validated TerminalCheckParam terminalCheckParam) {
|
||||
String methodDescribe = getMethodDescribe("addUserReport");
|
||||
String methodDescribe = getMethodDescribe("userCheckUpload");
|
||||
Boolean f = userReportPOService.userCheckUpload(terminalCheckParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, f, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -70,8 +70,8 @@ public class LinePollution implements Serializable {
|
||||
/**
|
||||
* 位置,电网侧&非电网侧
|
||||
*/
|
||||
@Excel(name = "监测位置", width = 30)
|
||||
@ApiModelProperty("监测位置")
|
||||
@Excel(name = "用户性质", width = 30)
|
||||
@ApiModelProperty("用户性质")
|
||||
private String powerFlag;
|
||||
|
||||
/**
|
||||
@@ -84,7 +84,7 @@ public class LinePollution implements Serializable {
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* 监测点电压等级
|
||||
* 变电站电压等级
|
||||
*/
|
||||
@Excel(name = "变电站电压等级", width = 30)
|
||||
@ApiModelProperty("变电站电压等级")
|
||||
@@ -112,7 +112,7 @@ public class LinePollution implements Serializable {
|
||||
private Integer interval;
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* 在线率
|
||||
*/
|
||||
@Excel(name = "在线率(%)",type = 10, width = 30)
|
||||
@@ -120,7 +120,7 @@ public class LinePollution implements Serializable {
|
||||
private Float onlineRate;
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* 完整性
|
||||
*/
|
||||
@Excel(name = "完整率(%)",type = 10, width = 30)
|
||||
@@ -134,42 +134,47 @@ public class LinePollution implements Serializable {
|
||||
@ApiModelProperty("谐波污染值")
|
||||
private Double HarmonicValue;
|
||||
|
||||
/**
|
||||
* 暂升次数 1.1~1.8
|
||||
* 10ms ~ 1min
|
||||
*/
|
||||
@Excel(name = "暂升次数(次)",type = 10, width = 20)
|
||||
@ApiModelProperty("暂升次数(次)")
|
||||
private Integer upCounts;
|
||||
// /**
|
||||
// * 暂升次数 1.1~1.8
|
||||
// * 10ms ~ 1min
|
||||
// */
|
||||
// @Excel(name = "暂升次数(次)",type = 10, width = 20)
|
||||
// @ApiModelProperty("暂升次数(次)")
|
||||
// private Integer upCounts;
|
||||
//
|
||||
// /**
|
||||
// * 暂降次数 0.1~0.9
|
||||
// * 10ms ~ 1min
|
||||
// */
|
||||
// @Excel(name = "电压暂降(次)",type = 10, width = 20)
|
||||
// @ApiModelProperty("电压暂降(次)")
|
||||
// private Integer downCounts;
|
||||
//
|
||||
// /**
|
||||
// * 短时中断 0~0.1
|
||||
// * 10ms ~ 1min
|
||||
// */
|
||||
// @Excel(name = "短时中断(次)",type = 10, width = 20)
|
||||
// @ApiModelProperty("短时中断(次")
|
||||
// private Integer breakCounts;
|
||||
|
||||
/**
|
||||
* 暂降次数 0.1~0.9
|
||||
* 10ms ~ 1min
|
||||
*/
|
||||
@Excel(name = "电压暂降(次)",type = 10, width = 20)
|
||||
@ApiModelProperty("电压暂降(次)")
|
||||
private Integer downCounts;
|
||||
|
||||
/**
|
||||
* 短时中断 0~0.1
|
||||
* 10ms ~ 1min
|
||||
*/
|
||||
@Excel(name = "短时中断(次)",type = 10, width = 20)
|
||||
@ApiModelProperty("短时中断(次")
|
||||
private Integer breakCounts;
|
||||
|
||||
@Excel(name = "是否关联敏感用户", width = 30, replace = "/_null")
|
||||
@ApiModelProperty("是否关联敏感用户")
|
||||
private String isMg;
|
||||
|
||||
@Excel(name = "敏感及重要用户", width = 30,replace = "/_null")
|
||||
@ApiModelProperty("敏感及重要用户")
|
||||
private String importUser;
|
||||
// @Excel(name = "是否关联敏感用户", width = 30, replace = "/_null")
|
||||
// @ApiModelProperty("是否关联敏感用户")
|
||||
// private String isMg;
|
||||
//
|
||||
// @Excel(name = "敏感及重要用户", width = 30,replace = "/_null")
|
||||
// @ApiModelProperty("敏感及重要用户")
|
||||
// private String importUser;
|
||||
|
||||
@Excel(name = "一类监测点", width = 30,replace = "/_null")
|
||||
@ApiModelProperty("一类监测点")
|
||||
private String monitorId;
|
||||
|
||||
|
||||
@Excel(name = "监测点运行状态", width = 30,replace = "/_null")
|
||||
@ApiModelProperty("监测点运行状态")
|
||||
private String runFlag;
|
||||
|
||||
// /**
|
||||
// * 备注
|
||||
// */
|
||||
|
||||
@@ -30,7 +30,10 @@ import com.njcn.harmonic.mapper.RStatLimitRateDMapper;
|
||||
import com.njcn.harmonic.service.hebeinorth.IGridService;
|
||||
import com.njcn.harmonic.util.ComAssesUtil;
|
||||
import com.njcn.harmonic.util.TimeUtil;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.enums.DicDataEnum;
|
||||
import com.njcn.system.enums.DicDataTypeEnum;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.dto.DeptDTO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -71,6 +74,7 @@ public class GridServiceImpl implements IGridService {
|
||||
private final RStatLimitTargetDMapper rStatLimitTargetDMapper;
|
||||
private final GeneralDeviceInfoClient generalDeviceInfoClient;
|
||||
private final DeptFeignClient deptFeignClient;
|
||||
private final DicDataFeignClient dicDataFeignClient;
|
||||
|
||||
@Override
|
||||
public AssessVo.AssessOverview getAssessOverview(AssessParam param) {
|
||||
@@ -328,8 +332,11 @@ public class GridServiceImpl implements IGridService {
|
||||
deptGetLineParam.setDeptId(param.getDeptIndex());
|
||||
deptGetLineParam.setLineRunFlag(0);
|
||||
List<DeptGetChildrenMoreDTO> list = commTerminalGeneralClient.deptGetLine(deptGetLineParam).getData();
|
||||
|
||||
DictData dictData = dicDataFeignClient.getDicDataById(param.getVoltageLevel()).getData();
|
||||
DictData standVoltageDic = dicDataFeignClient.getDicDataByNameAndTypeName(DicDataTypeEnum.DEV_VOLTAGE_STAND.getName(),dictData.getName()).getData();
|
||||
//获取监测点集合
|
||||
Map<String, List<String>> lineMap = this.getLineMap(list, param.getIsUpToGrid(), param.getVoltageLevel());
|
||||
Map<String, List<String>> lineMap = this.getLineMap(list, param.getIsUpToGrid(),standVoltageDic.getId());
|
||||
List<String> lineList = lineMap.values().stream()
|
||||
.flatMap(List::stream)
|
||||
.distinct()
|
||||
|
||||
@@ -65,6 +65,7 @@ import com.njcn.poi.excel.ExcelUtil;
|
||||
import com.njcn.supervision.pojo.param.SensitiveUserParam;
|
||||
import com.njcn.supervision.pojo.param.user.UserReportParam;
|
||||
import com.njcn.supervision.pojo.po.user.UserReportPO;
|
||||
import com.njcn.supervision.pojo.vo.user.NewUserReportVO;
|
||||
import com.njcn.supervision.pojo.vo.user.UserLedgerVO;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.enums.DicDataEnum;
|
||||
@@ -711,11 +712,23 @@ public class PollutionSubstationServiceImpl extends ServiceImpl<RStatPollutionSu
|
||||
paramDTO.setLineList(monitorIds);
|
||||
List<PollutionLineDTO> monitorList = lineFeignClient.getLineInfo(paramDTO).getData();
|
||||
Map<String, PollutionLineDTO> monitorMap = monitorList.stream().collect(Collectors.toMap(PollutionLineDTO::getId, Function.identity()));
|
||||
List<String> objIds = monitorList.stream().map(PollutionLineDTO::getObjId).distinct().collect(Collectors.toList());
|
||||
Map<String, String> objMap = new HashMap<>();
|
||||
if(CollUtil.isNotEmpty(objIds)){
|
||||
List<NewUserReportVO> userReportVOList = userLedgerFeignClient.getUserReportByIds(objIds).getData();
|
||||
objMap = userReportVOList.stream().collect(Collectors.toMap(NewUserReportVO::getId, NewUserReportVO::getProjectName));
|
||||
}
|
||||
Map<String, String> finalObjMap = objMap;
|
||||
list = result.stream().map(it -> {
|
||||
PollutionLineDTO pollutionLineDTO = new PollutionLineDTO();
|
||||
pollutionLineDTO.setData(NumberUtil.round(it.getData(), 2).doubleValue());
|
||||
PollutionLineDTO monitor = monitorMap.get(it.getId());
|
||||
pollutionLineDTO.setName(monitor.getSubstation() + "_" + monitor.getName());
|
||||
if(StrUtil.isNotBlank(monitor.getObjId())){
|
||||
String objName = finalObjMap.get(monitor.getObjId());
|
||||
pollutionLineDTO.setName(objName + "_" + monitor.getName());
|
||||
}else {
|
||||
pollutionLineDTO.setName(monitor.getSubstation() + "_" + monitor.getName());
|
||||
}
|
||||
return pollutionLineDTO;
|
||||
}).sorted(Comparator.comparing(PollutionLineDTO::getData, Comparator.reverseOrder())).collect(Collectors.toList());
|
||||
}
|
||||
@@ -1011,7 +1024,6 @@ public class PollutionSubstationServiceImpl extends ServiceImpl<RStatPollutionSu
|
||||
@Override
|
||||
public List<LinePollution> downPollutionLineCalc(StatSubstationBizBaseParam param) {
|
||||
DeviceInfoParam deviceInfoParam=new DeviceInfoParam();
|
||||
deviceInfoParam.setLineRunFlag(0);
|
||||
deviceInfoParam.setDeptIndex(param.getId());
|
||||
deviceInfoParam.setStatisticalType(new SimpleDTO());
|
||||
List<GeneralDeviceDTO> data1 = generalDeviceInfoClient.getPracticalRunDeviceInfo(deviceInfoParam).getData();
|
||||
|
||||
@@ -66,7 +66,8 @@ public class THDistortionServiceImpl implements THDistortionService {
|
||||
List<THDistortionVO> thDistortionVOS = new ArrayList<>();
|
||||
|
||||
//按照条件获取实际运行终端综合信息
|
||||
List<GeneralDeviceDTO> deviceList = generalDeviceInfoClient.getPracticalRunDeviceInfo(new DeviceInfoParam(thDistortionParam.getStatisticalType(), thDistortionParam.getDeptIndex(), generalInfo.getMicroServiceName(), thDistortionParam.getScale(), thDistortionParam.getManufacturer(), thDistortionParam.getLoadType())).getData();
|
||||
DeviceInfoParam deviceInfoParam = new DeviceInfoParam(thDistortionParam.getStatisticalType(), thDistortionParam.getDeptIndex(), generalInfo.getMicroServiceName(), thDistortionParam.getScale(), thDistortionParam.getManufacturer(), thDistortionParam.getLoadType());
|
||||
List<GeneralDeviceDTO> deviceList = generalDeviceInfoClient.getPracticalRunDeviceInfo(deviceInfoParam).getData();
|
||||
Map<String, UserLedgerVO> userLedgerVOMap = new HashMap<>();
|
||||
if (thDistortionParam.isUserLedger()) {
|
||||
List<UserLedgerVO> userLedgerVOList = userLedgerFeignClient.selectUserList(new UserReportParam()).getData();
|
||||
|
||||
Reference in New Issue
Block a user