合并代码
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package com.njcn.device.pms.service.majornetwork;
|
||||
|
||||
import com.njcn.event.pojo.po.EventDetail;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author qijian
|
||||
* @version 1.0.0
|
||||
* @date 2022年12月14日 09:39
|
||||
*/
|
||||
public interface EventDetailPmsService {
|
||||
|
||||
/**
|
||||
* 根据监测点id和时区时间time获取暂降事件
|
||||
*
|
||||
* @param id 监测点id
|
||||
* @return 暂降事件详情
|
||||
*/
|
||||
EventDetail getEventDetailByTime(String id, String time);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.njcn.device.pms.service.majornetwork;
|
||||
|
||||
import com.njcn.common.pojo.dto.wave.WaveDataDTO;
|
||||
|
||||
/**
|
||||
* TransientPmsService
|
||||
*
|
||||
* @author qijian
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/12/14 - 15:09
|
||||
*/
|
||||
public interface TransientPmsService {
|
||||
/**
|
||||
* 功能描述: 暂态事件波形分析
|
||||
* @param timeId
|
||||
* @param lineId
|
||||
* @param lineType
|
||||
* @return
|
||||
*/
|
||||
WaveDataDTO getTransientAnalyseWavePms(String timeId, String lineId, Integer lineType);
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.njcn.device.pms.service.majornetwork.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.njcn.device.pms.service.majornetwork.EventDetailPmsService;
|
||||
import com.njcn.event.pojo.po.EventDetail;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.influxdb.dto.QueryResult;
|
||||
import org.influxdb.impl.InfluxDBResultMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author qijian
|
||||
* @version 1.0.0
|
||||
* @date 2022年12月14日 09:39
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class EventDetailPmsServiceImpl implements EventDetailPmsService {
|
||||
|
||||
private final InfluxDbUtils influxDbUtils;
|
||||
|
||||
@Override
|
||||
public EventDetail getEventDetailByTime(String id, String time) {
|
||||
EventDetail eventDetail = new EventDetail();
|
||||
//组装sql语句
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append("time = '").append(time).append("' and ").append("line_id ='").append(id).append("' limit 1 tz('Asia/Shanghai')");
|
||||
|
||||
String sql = "select * from pqs_eventdetail where " + stringBuilder;
|
||||
//获取暂降事件
|
||||
QueryResult result = influxDbUtils.query(sql);
|
||||
InfluxDBResultMapper influxDBResultMapper = new InfluxDBResultMapper();
|
||||
if (!Objects.isNull(result)) {
|
||||
List<EventDetail> detailList = influxDBResultMapper.toPOJO(result, EventDetail.class);
|
||||
if (!CollectionUtils.isEmpty(detailList)) {
|
||||
eventDetail = detailList.get(0);
|
||||
}
|
||||
}
|
||||
return eventDetail;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
package com.njcn.device.pms.service.majornetwork.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.config.GeneralInfo;
|
||||
import com.njcn.common.pojo.dto.wave.WaveDataDTO;
|
||||
import com.njcn.common.pojo.enums.common.ServerEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.PubUtils;
|
||||
import com.njcn.common.utils.wave.AnalyWave;
|
||||
import com.njcn.device.pms.api.DistributionMonitorClient;
|
||||
import com.njcn.device.pms.api.MonitorClient;
|
||||
import com.njcn.device.pms.mapper.majornetwork.DistributionMonitorMapper;
|
||||
import com.njcn.device.pms.mapper.majornetwork.MonitorMapper;
|
||||
import com.njcn.device.pms.mapper.majornetwork.TerminalMapper;
|
||||
import com.njcn.device.pms.pojo.po.DistributionMonitor;
|
||||
import com.njcn.device.pms.pojo.po.Monitor;
|
||||
import com.njcn.device.pms.pojo.po.PmsTerminal;
|
||||
import com.njcn.device.pms.service.majornetwork.EventDetailPmsService;
|
||||
import com.njcn.device.pms.service.majornetwork.IMonitorService;
|
||||
import com.njcn.device.pms.service.majornetwork.TransientPmsService;
|
||||
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
||||
import com.njcn.device.pq.api.LineFeignClient;
|
||||
import com.njcn.device.pq.enums.DeviceResponseEnum;
|
||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||
import com.njcn.device.pq.pojo.vo.AreaLineInfoVO;
|
||||
import com.njcn.device.pq.pojo.vo.LineDetailDataVO;
|
||||
import com.njcn.event.enums.EventResponseEnum;
|
||||
import com.njcn.event.pojo.param.TransientParam;
|
||||
import com.njcn.event.pojo.param.WaveFileParam;
|
||||
import com.njcn.event.pojo.po.EventDetail;
|
||||
import com.njcn.event.pojo.po.EventDetailNew;
|
||||
import com.njcn.event.pojo.vo.TransientVO;
|
||||
import com.njcn.influxdb.mapper.InfluxDBResultMapperCn;
|
||||
import com.njcn.influxdb.param.InfluxDBPublicParam;
|
||||
import com.njcn.influxdb.utils.InfluxDBCommUtils;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.enums.DicDataTypeEnum;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.influxdb.dto.QueryResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.DecimalFormat;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
/**
|
||||
* @author: chenchao
|
||||
* @date: 2022/03/29 14:37
|
||||
* @Description: <描述>
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class TransientPmsServiceImpl implements TransientPmsService {
|
||||
|
||||
private final GeneralDeviceInfoClient generalDeviceInfoClient;
|
||||
|
||||
private final DicDataFeignClient dicDataFeignClient;
|
||||
|
||||
private final EventDetailPmsService eventDetailPmsService;
|
||||
|
||||
private final GeneralInfo generalInfo;
|
||||
|
||||
private final DistributionMonitorMapper distributionMonitorMapper;
|
||||
|
||||
private final MonitorMapper monitorMapper;
|
||||
|
||||
private final TerminalMapper terminalMapper;
|
||||
|
||||
@Override
|
||||
public WaveDataDTO getTransientAnalyseWavePms(String timeId, String lineId,Integer lineType) {
|
||||
//初始化
|
||||
WaveDataDTO waveDataDTO;
|
||||
PmsTerminal pmsTerminal;
|
||||
DictData dictData;
|
||||
String ip = null;
|
||||
String ptTypeName = null;
|
||||
Float pt1 = null;
|
||||
Float pt2 = null;
|
||||
Float ct1 = null;
|
||||
Float ct2 = null;
|
||||
|
||||
//根据监测点id获取信息(1主网 2配网)
|
||||
if (lineType == 1){
|
||||
Monitor monitor = monitorMapper.selectById(lineId);
|
||||
//获取ip
|
||||
pmsTerminal = terminalMapper.selectById(monitor.getTerminalId());
|
||||
ip = pmsTerminal.getIp();
|
||||
//获取接线方式
|
||||
dictData = dicDataFeignClient.getDicDataById(monitor.getTerminalWiringMethod()).getData();
|
||||
ptTypeName = dictData.getName();
|
||||
//获取pt、ct
|
||||
pt1 = monitor.getPt1();
|
||||
pt2 = monitor.getPt1();
|
||||
ct1 = monitor.getCt1();
|
||||
ct2 = monitor.getCt2();
|
||||
}else{
|
||||
DistributionMonitor distributionMonitor = distributionMonitorMapper.selectById(lineId);
|
||||
//获取ip
|
||||
pmsTerminal = terminalMapper.selectById(distributionMonitor.getTerminalId());
|
||||
ip = pmsTerminal.getIp();
|
||||
//获取接线方式
|
||||
dictData = dicDataFeignClient.getDicDataById(distributionMonitor.getTerminalWiringMethod()).getData();
|
||||
ptTypeName = dictData.getName();
|
||||
//获取pt、ct
|
||||
pt1 = distributionMonitor.getPt1();
|
||||
pt2 = distributionMonitor.getPt1();
|
||||
ct1 = distributionMonitor.getCt1();
|
||||
ct2 = distributionMonitor.getCt2();
|
||||
}
|
||||
|
||||
EventDetail eventDetailByTime = eventDetailPmsService.getEventDetailByTime(lineId, timeId);
|
||||
String waveName = eventDetailByTime.getWaveName();
|
||||
|
||||
AnalyWave analyWave = new AnalyWave();
|
||||
WaveDataDTO comtrade = analyWave.getComtrade(generalInfo.getBusinessWavePath() + File.separator + ip + File.separator + waveName + ".CFG", 1);
|
||||
if (Objects.isNull(comtrade.getComtradeCfgDTO())) {
|
||||
throw new BusinessException(EventResponseEnum.ANALYSEWAVE_NOT_FOUND);
|
||||
}
|
||||
waveDataDTO = analyWave.getValidData(comtrade);
|
||||
waveDataDTO.setPtType(PubUtils.ptTypeName(ptTypeName));
|
||||
waveDataDTO.setPt((double) (pt1 / pt2));
|
||||
waveDataDTO.setCt((double) (ct1 / ct2));
|
||||
return waveDataDTO;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.njcn.harmonic.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <功能描述>
|
||||
*
|
||||
* @author wr
|
||||
* @createTime: 2022-12-29
|
||||
*/
|
||||
@Data
|
||||
public class OverviewParam {
|
||||
|
||||
@ApiModelProperty(name = "id", value = "单位id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(name = "year", value = "年份")
|
||||
private String year;
|
||||
|
||||
@ApiModelProperty(name = "month", value = "月份")
|
||||
private List<String> month;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.njcn.harmonic.pojo.param;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <功能描述>
|
||||
*
|
||||
* @author wr
|
||||
* @createTime: 2022-12-29
|
||||
*/
|
||||
@Data
|
||||
public class RStatFileVO implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "文件id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "文件内容")
|
||||
private String fileContent;
|
||||
|
||||
// @ApiModelProperty(value = "删除图片地址")
|
||||
// private List<String> address;
|
||||
|
||||
@ApiModelProperty(value = "创建用户")
|
||||
private String createBy;
|
||||
|
||||
@ApiModelProperty(value = "更新用户")
|
||||
private String updateBy;
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.njcn.harmonic.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/12/1 9:18【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
/**
|
||||
* 终端评价详情表
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "r_mp_dev_evaluate_detail")
|
||||
public class RMpDevEvaluateDetailPO {
|
||||
/**
|
||||
* 生成数据的时间,每月统计一次
|
||||
*/
|
||||
@MppMultiId(value = "data_date")
|
||||
private Date dataDate;
|
||||
|
||||
/**
|
||||
* 终端id
|
||||
*/
|
||||
@MppMultiId(value = "device_id")
|
||||
private String deviceId;
|
||||
|
||||
/**
|
||||
* 终端指标完整率
|
||||
*/
|
||||
@TableField(value = "dev_target_rate")
|
||||
private Double devTargetRate;
|
||||
|
||||
/**
|
||||
* 终端数据完整率
|
||||
*/
|
||||
@TableField(value = "dev_data_rate")
|
||||
private Double devDataRate;
|
||||
|
||||
/**
|
||||
* 终端故障及消缺评分
|
||||
*/
|
||||
@TableField(value = "dev_score")
|
||||
private Double devScore;
|
||||
|
||||
/**
|
||||
* 终端有效接入率
|
||||
*/
|
||||
@TableField(value = "dev_effective_rate")
|
||||
private Double devEffectiveRate;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.njcn.harmonic.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/12/28 14:58【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
/**
|
||||
* 监测点暂态指标超标明细日表
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "r_mp_event_detail_d")
|
||||
public class RMpEventDetailDPO {
|
||||
/**
|
||||
* 监测点ID
|
||||
*/
|
||||
@MppMultiId(value = "measurement_point_id")
|
||||
private String measurementPointId;
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
@MppMultiId(value = "data_date")
|
||||
private Date dataDate;
|
||||
|
||||
/**
|
||||
* 电压暂升发生次数
|
||||
*/
|
||||
@TableField(value = "swell_times")
|
||||
private Integer swellTimes;
|
||||
|
||||
/**
|
||||
* 电压暂降发生次数
|
||||
*/
|
||||
@TableField(value = "sag_times")
|
||||
private Integer sagTimes;
|
||||
|
||||
/**
|
||||
* 短时中断发生次数
|
||||
*/
|
||||
@TableField(value = "interrupt_times")
|
||||
private Integer interruptTimes;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.njcn.harmonic.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/12/28 14:58【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
/**
|
||||
* 监测点暂态指标超标明细月表
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "r_mp_event_detail_m")
|
||||
public class RMpEventDetailMPO {
|
||||
/**
|
||||
* 监测点ID
|
||||
*/
|
||||
@MppMultiId(value = "measurement_point_id")
|
||||
private String measurementPointId;
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
@MppMultiId(value = "data_date")
|
||||
private Date dataDate;
|
||||
|
||||
/**
|
||||
* 电压暂升发生次数
|
||||
*/
|
||||
@TableField(value = "swell_times")
|
||||
private Integer swellTimes;
|
||||
|
||||
/**
|
||||
* 电压暂降发生次数
|
||||
*/
|
||||
@TableField(value = "sag_times")
|
||||
private Integer sagTimes;
|
||||
|
||||
/**
|
||||
* 短时中断发生次数
|
||||
*/
|
||||
@TableField(value = "interrupt_times")
|
||||
private Integer interruptTimes;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.njcn.harmonic.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/12/28 14:58【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
/**
|
||||
* 监测点暂态指标超标明细季表
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "r_mp_event_detail_q")
|
||||
public class RMpEventDetailQPO {
|
||||
/**
|
||||
* 监测点ID
|
||||
*/
|
||||
@MppMultiId(value = "measurement_point_id")
|
||||
private String measurementPointId;
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
@MppMultiId(value = "data_date")
|
||||
private Date dataDate;
|
||||
|
||||
/**
|
||||
* 电压暂升发生次数
|
||||
*/
|
||||
@TableField(value = "swell_times")
|
||||
private Integer swellTimes;
|
||||
|
||||
/**
|
||||
* 电压暂降发生次数
|
||||
*/
|
||||
@TableField(value = "sag_times")
|
||||
private Integer sagTimes;
|
||||
|
||||
/**
|
||||
* 短时中断发生次数
|
||||
*/
|
||||
@TableField(value = "interrupt_times")
|
||||
private Integer interruptTimes;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.njcn.harmonic.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/12/28 14:58【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
/**
|
||||
* 监测点暂态指标超标明细年表
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "r_mp_event_detail_y")
|
||||
public class RMpEventDetailYPO {
|
||||
/**
|
||||
* 监测点ID
|
||||
*/
|
||||
@MppMultiId(value = "measurement_point_id")
|
||||
private String measurementPointId;
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
@MppMultiId(value = "data_date")
|
||||
private Date dataDate;
|
||||
|
||||
/**
|
||||
* 电压暂升发生次数
|
||||
*/
|
||||
@TableField(value = "swell_times")
|
||||
private Integer swellTimes;
|
||||
|
||||
/**
|
||||
* 电压暂降发生次数
|
||||
*/
|
||||
@TableField(value = "sag_times")
|
||||
private Integer sagTimes;
|
||||
|
||||
/**
|
||||
* 短时中断发生次数
|
||||
*/
|
||||
@TableField(value = "interrupt_times")
|
||||
private Integer interruptTimes;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,15 +1,13 @@
|
||||
package com.njcn.harmonic.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @TableName r_mp_measure_phase_report_d
|
||||
@@ -23,229 +21,259 @@ public class RMpMeasurePhaseReportD implements Serializable {
|
||||
/**
|
||||
* 监测点ID
|
||||
*/
|
||||
@ApiModelProperty(name = "measurementPointId", value = "监测点id")
|
||||
@MppMultiId(value = "measurement_point_id")
|
||||
private String measurementPointId;
|
||||
|
||||
/**
|
||||
* 生成数据的时间,每日统计一次
|
||||
*/
|
||||
@ApiModelProperty(name = "dataDate", value = "监测日期")
|
||||
@MppMultiId(value = "data_date")
|
||||
private Date dataDate;
|
||||
|
||||
/**
|
||||
* 相别:‘A’ ‘B’ ‘C’ ‘ABC’ ‘T’ 配网部分相别的数据采用T标志存储
|
||||
*/
|
||||
@MppMultiId(value = "phase")
|
||||
private String phase;
|
||||
|
||||
/**
|
||||
* 相电压有效值-最大值
|
||||
*/
|
||||
@TableField(value = "phase_voltage_effective_max")
|
||||
private Double phaseVoltageEffectiveMax;
|
||||
|
||||
/**
|
||||
* 相电压有效值-最小值
|
||||
*/
|
||||
@TableField(value = "phase_voltage_effective_min")
|
||||
private Double phaseVoltageEffectiveMin;
|
||||
|
||||
/**
|
||||
* 相电压有效值-平均值
|
||||
*/
|
||||
@TableField(value = "phase_voltage_effective_avg")
|
||||
private Double phaseVoltageEffectiveAvg;
|
||||
|
||||
/**
|
||||
* 相电压有效值-95值
|
||||
*/
|
||||
|
||||
@TableField(value = "phase_voltage_effective_95")
|
||||
private Double phaseVoltageEffective95;
|
||||
|
||||
/**
|
||||
* 线电压有效值-最大值
|
||||
*/
|
||||
@TableField(value = "line_voltage_effective_max")
|
||||
private Double lineVoltageEffectiveMax;
|
||||
|
||||
/**
|
||||
* 线电压有效值-最小值
|
||||
*/
|
||||
@TableField(value = "line_voltage_effective_min")
|
||||
private Double lineVoltageEffectiveMin;
|
||||
|
||||
/**
|
||||
* 线电压有效值-平均值
|
||||
*/
|
||||
@TableField(value = "line_voltage_effective_avg")
|
||||
private Double lineVoltageEffectiveAvg;
|
||||
|
||||
/**
|
||||
* 线电压有效值-95值
|
||||
*/
|
||||
@TableField(value = "line_voltage_effective_95")
|
||||
private Double lineVoltageEffective95;
|
||||
|
||||
/**
|
||||
* 电压上偏差-最大值
|
||||
*/
|
||||
@ApiModelProperty(name = "vDeUpMax", value = "电压正偏差-最大值")
|
||||
@TableField(value = "v_de_up_max")
|
||||
private Double vDeUpMax;
|
||||
|
||||
/**
|
||||
* 电压上偏差-最小值
|
||||
*/
|
||||
@TableField(value = "v_de_up_min")
|
||||
private Double vDeUpMin;
|
||||
|
||||
/**
|
||||
* 电压上偏差-平均值
|
||||
*/
|
||||
@TableField(value = "v_de_up_avg")
|
||||
private Double vDeUpAvg;
|
||||
|
||||
/**
|
||||
* 电压上偏差-95值
|
||||
*/
|
||||
@TableField(value = "v_de_up_95")
|
||||
private Double vDeUp95;
|
||||
|
||||
/**
|
||||
* 电压下偏差-最大值
|
||||
*/
|
||||
@ApiModelProperty(name = "vDeLowMax", value = "电压负偏差-最大值")
|
||||
@TableField(value = "v_de_low_max")
|
||||
private Double vDeLowMax;
|
||||
|
||||
/**
|
||||
* 电压下偏差-最小值
|
||||
*/
|
||||
@TableField(value = "v_de_low_min")
|
||||
private Double vDeLowMin;
|
||||
|
||||
/**
|
||||
* 电压下偏差-平均值
|
||||
*/
|
||||
@TableField(value = "v_de_low_avg")
|
||||
private Double vDeLowAvg;
|
||||
|
||||
/**
|
||||
* 电压下偏差-95值
|
||||
*/
|
||||
@TableField(value = "v_de_low_95")
|
||||
private Double vDeLow95;
|
||||
|
||||
/**
|
||||
* 电流有效值-最大值
|
||||
*/
|
||||
@TableField(value = "current_effective_max")
|
||||
private Double currentEffectiveMax;
|
||||
|
||||
/**
|
||||
* 电流有效值-最小值
|
||||
*/
|
||||
@TableField(value = "current_effective_min")
|
||||
private Double currentEffectiveMin;
|
||||
|
||||
/**
|
||||
* 电流有效值-平均值
|
||||
*/
|
||||
@TableField(value = "current_effective_avg")
|
||||
private Double currentEffectiveAvg;
|
||||
|
||||
/**
|
||||
* 电流有效值-95值
|
||||
*/
|
||||
@TableField(value = "current_effective_95")
|
||||
private Double currentEffective95;
|
||||
|
||||
/**
|
||||
* 单相有功功率-最大值
|
||||
*/
|
||||
@TableField(value = "sp_active_power_max")
|
||||
private Double spActivePowerMax;
|
||||
|
||||
/**
|
||||
* 单相有功功率-最小值
|
||||
*/
|
||||
@TableField(value = "sp_active_power_min")
|
||||
private Double spActivePowerMin;
|
||||
|
||||
/**
|
||||
* 单相有功功率-平均值
|
||||
*/
|
||||
@TableField(value = "sp_active_power_avg")
|
||||
private Double spActivePowerAvg;
|
||||
|
||||
/**
|
||||
* 单相有功功率-95值
|
||||
*/
|
||||
@TableField(value = "sp_active_power_95")
|
||||
private Double spActivePower95;
|
||||
|
||||
/**
|
||||
* 单相无功功率-最大值
|
||||
*/
|
||||
@TableField(value = "sp_reactive_power_max")
|
||||
private Double spReactivePowerMax;
|
||||
|
||||
/**
|
||||
* 单相无功功率-最小值
|
||||
*/
|
||||
@TableField(value = "sp_reactive_power_min")
|
||||
private Double spReactivePowerMin;
|
||||
|
||||
/**
|
||||
* 单相无功功率-平均值
|
||||
*/
|
||||
@TableField(value = "sp_reactive_power_avg")
|
||||
private Double spReactivePowerAvg;
|
||||
|
||||
/**
|
||||
* 单相无功功率-95值
|
||||
*/
|
||||
@TableField(value = "sp_reactive_power_95")
|
||||
private Double spReactivePower95;
|
||||
|
||||
/**
|
||||
* 单相视在功率-最大值
|
||||
*/
|
||||
@ApiModelProperty(name = "spApparentPowerMax", value = "视在功率-最大值")
|
||||
@TableField(value = "sp_apparent_power_max")
|
||||
private Double spApparentPowerMax;
|
||||
|
||||
/**
|
||||
* 单相视在功率-最小值
|
||||
*/
|
||||
@ApiModelProperty(name = "spApparentPowerMin", value = "视在功率-最小值")
|
||||
@TableField(value = "sp_apparent_power_min")
|
||||
private Double spApparentPowerMin;
|
||||
|
||||
/**
|
||||
* 单相视在功率-平均值
|
||||
*/
|
||||
@ApiModelProperty(name = "spApparentPowerAvg", value = "视在功率-平均值")
|
||||
@TableField(value = "sp_apparent_power_avg")
|
||||
private Double spApparentPowerAvg;
|
||||
|
||||
/**
|
||||
* 单相视在功率-95值
|
||||
*/
|
||||
@ApiModelProperty(name = "spApparentPower95", value = "视在功率-95值")
|
||||
@TableField(value = "sp_apparent_power_95")
|
||||
private Double spApparentPower95;
|
||||
|
||||
/**
|
||||
* 单相功率因数-最大值
|
||||
*/
|
||||
@ApiModelProperty(name = "spPowerFactorMax", value = "功率因数-最大值")
|
||||
@TableField(value = "sp_power_factor_max")
|
||||
private Double spPowerFactorMax;
|
||||
|
||||
/**
|
||||
* 单相功率因数-最小值
|
||||
*/
|
||||
@ApiModelProperty(name = "spPowerFactorMin", value = "功率因数-最小值")
|
||||
@TableField(value = "sp_power_factor_min")
|
||||
private Double spPowerFactorMin;
|
||||
|
||||
/**
|
||||
* 单相功率因数-平均值
|
||||
*/
|
||||
@ApiModelProperty(name = "spPowerFactorAvg", value = "功率因数-平均值")
|
||||
@TableField(value = "sp_power_factor_avg")
|
||||
private Double spPowerFactorAvg;
|
||||
|
||||
/**
|
||||
* 单相功率因数-95值
|
||||
*/
|
||||
@ApiModelProperty(name = "spPowerFactor95", value = "功率因数-95值")
|
||||
@TableField(value = "sp_power_factor_95")
|
||||
private Double spPowerFactor95;
|
||||
|
||||
/**
|
||||
* 单相基波功率因数-最大值
|
||||
*/
|
||||
@TableField(value = "sp_fundamental_power_factor_max")
|
||||
private Double spFundamentalPowerFactorMax;
|
||||
|
||||
/**
|
||||
* 单相基波功率因数-最小值
|
||||
*/
|
||||
@TableField(value = "sp_fundamental_power_factor_min")
|
||||
private Double spFundamentalPowerFactorMin;
|
||||
|
||||
/**
|
||||
* 单相基波功率因数-平均值
|
||||
*/
|
||||
@TableField(value = "sp_fundamental_power_factor_avg")
|
||||
private Double spFundamentalPowerFactorAvg;
|
||||
|
||||
/**
|
||||
* 单相基波功率因数-95值
|
||||
*/
|
||||
@TableField(value = "sp_fundamental_power_factor_95")
|
||||
private Double spFundamentalPowerFactor95;
|
||||
|
||||
|
||||
|
||||
@@ -1,18 +1,13 @@
|
||||
package com.njcn.harmonic.pojo.po;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
/**
|
||||
* 【稳态监测点非谐波不带相位指标日报-日表】
|
||||
* @author jianghf
|
||||
@@ -23,403 +18,570 @@ import org.hibernate.validator.constraints.Length;
|
||||
public class RMpMeasureReportD implements Serializable {
|
||||
|
||||
/**
|
||||
* 监测点ID
|
||||
*/
|
||||
@ApiModelProperty("监测点ID")
|
||||
* 监测点ID
|
||||
*/
|
||||
@MppMultiId(value = "measurement_point_id")
|
||||
private String measurementPointId;
|
||||
|
||||
/**
|
||||
* 生成数据的时间,每日统计一次
|
||||
*/
|
||||
@ApiModelProperty("生成数据的时间,每日统计一次")
|
||||
* 生成数据的时间,每日统计一次
|
||||
*/
|
||||
@MppMultiId(value = "data_date")
|
||||
private Date dataDate;
|
||||
|
||||
/**
|
||||
* 频率-最大值
|
||||
*/
|
||||
* 频率-最大值
|
||||
*/
|
||||
@TableField(value = "frequency_max")
|
||||
private Double frequencyMax;
|
||||
|
||||
/**
|
||||
* 频率-最小值
|
||||
*/
|
||||
* 频率-最小值
|
||||
*/
|
||||
@TableField(value = "frequency_min")
|
||||
private Double frequencyMin;
|
||||
|
||||
/**
|
||||
* 频率-平均值
|
||||
*/
|
||||
* 频率-平均值
|
||||
*/
|
||||
@TableField(value = "frequency_avg")
|
||||
private Double frequencyAvg;
|
||||
|
||||
/**
|
||||
* 频率-95值
|
||||
*/
|
||||
* 频率-95值
|
||||
*/
|
||||
@TableField(value = "frequency_95")
|
||||
private Double frequency95;
|
||||
|
||||
/**
|
||||
* 频率偏差-最大值
|
||||
*/
|
||||
* 频率偏差-最大值
|
||||
*/
|
||||
@TableField(value = "frequency_deviation_max")
|
||||
private Double frequencyDeviationMax;
|
||||
|
||||
/**
|
||||
* 频率偏差-最小值
|
||||
*/
|
||||
* 频率偏差-最小值
|
||||
*/
|
||||
@TableField(value = "frequency_deviation_min")
|
||||
private Double frequencyDeviationMin;
|
||||
|
||||
/**
|
||||
* 频率偏差-平均值
|
||||
*/
|
||||
* 频率偏差-平均值
|
||||
*/
|
||||
@TableField(value = "frequency_deviation_avg")
|
||||
private Double frequencyDeviationAvg;
|
||||
|
||||
/**
|
||||
* 频率偏差-95值
|
||||
*/
|
||||
* 频率偏差-95值
|
||||
*/
|
||||
@TableField(value = "frequency_deviation_95")
|
||||
private Double frequencyDeviation95;
|
||||
|
||||
/**
|
||||
* 总有功功率-最大值
|
||||
*/
|
||||
@ApiModelProperty("总有功功率-最大值")
|
||||
* 总有功功率-最大值
|
||||
*/
|
||||
@TableField(value = "total_active_power_max")
|
||||
private Double totalActivePowerMax;
|
||||
|
||||
/**
|
||||
* 总有功功率-最小值
|
||||
*/
|
||||
@ApiModelProperty("总有功功率-最小值")
|
||||
* 总有功功率-最小值
|
||||
*/
|
||||
@TableField(value = "total_active_power_min")
|
||||
private Double totalActivePowerMin;
|
||||
|
||||
/**
|
||||
* 总有功功率-平均值
|
||||
*/
|
||||
@ApiModelProperty("总有功功率-平均值")
|
||||
* 总有功功率-平均值
|
||||
*/
|
||||
@TableField(value = "total_active_power_avg")
|
||||
private Double totalActivePowerAvg;
|
||||
|
||||
/**
|
||||
* 总有功功率-95值
|
||||
*/
|
||||
@ApiModelProperty("总有功功率-95值")
|
||||
* 总有功功率-95值
|
||||
*/
|
||||
@TableField(value = "total_active_power_95")
|
||||
private Double totalActivePower95;
|
||||
|
||||
/**
|
||||
* 总无功功率-最大值
|
||||
*/
|
||||
@ApiModelProperty("总无功功率-最大值")
|
||||
* 总无功功率-最大值
|
||||
*/
|
||||
@TableField(value = "total_reactive_power_max")
|
||||
private Double totalReactivePowerMax;
|
||||
|
||||
/**
|
||||
* 总无功功率-最小值
|
||||
*/
|
||||
@ApiModelProperty("总无功功率-最小值")
|
||||
* 总无功功率-最小值
|
||||
*/
|
||||
@TableField(value = "total_reactive_power_min")
|
||||
private Double totalReactivePowerMin;
|
||||
|
||||
/**
|
||||
* 总无功功率-平均值
|
||||
*/
|
||||
@ApiModelProperty("总无功功率-平均值")
|
||||
* 总无功功率-平均值
|
||||
*/
|
||||
@TableField(value = "total_reactive_power_avg")
|
||||
private Double totalReactivePowerAvg;
|
||||
|
||||
/**
|
||||
* 总无功功率-95值
|
||||
*/
|
||||
@ApiModelProperty("总无功功率-95值")
|
||||
* 总无功功率-95值
|
||||
*/
|
||||
@TableField(value = "total_reactive_power_95")
|
||||
private Double totalReactivePower95;
|
||||
|
||||
/**
|
||||
* 总视在功率-最大值
|
||||
*/
|
||||
@ApiModelProperty("总视在功率-最大值")
|
||||
* 总视在功率-最大值
|
||||
*/
|
||||
@TableField(value = "total_apparent_power_max")
|
||||
private Double totalApparentPowerMax;
|
||||
|
||||
/**
|
||||
* 总视在功率-最小值
|
||||
*/
|
||||
@ApiModelProperty("总视在功率-最小值")
|
||||
* 总视在功率-最小值
|
||||
*/
|
||||
@TableField(value = "total_apparent_power_min")
|
||||
private Double totalApparentPowerMin;
|
||||
|
||||
/**
|
||||
* 总视在功率-平均值
|
||||
*/
|
||||
@ApiModelProperty("总视在功率-平均值")
|
||||
* 总视在功率-平均值
|
||||
*/
|
||||
@TableField(value = "total_apparent_power_avg")
|
||||
private Double totalApparentPowerAvg;
|
||||
|
||||
/**
|
||||
* 总视在功率-95值
|
||||
*/
|
||||
@ApiModelProperty("总视在功率-95值")
|
||||
* 总视在功率-95值
|
||||
*/
|
||||
@TableField(value = "total_apparent_power_95")
|
||||
private Double totalApparentPower95;
|
||||
|
||||
/**
|
||||
* 三相功率因数-最大值
|
||||
*/
|
||||
* 三相功率因数-最大值
|
||||
*/
|
||||
@TableField(value = "tp_power_factor_max")
|
||||
private Double tpPowerFactorMax;
|
||||
|
||||
/**
|
||||
* 三相功率因数-最小值
|
||||
*/
|
||||
* 三相功率因数-最小值
|
||||
*/
|
||||
@TableField(value = "tp_power_factor_min")
|
||||
private Double tpPowerFactorMin;
|
||||
|
||||
/**
|
||||
* 三相功率因数-平均值
|
||||
*/
|
||||
* 三相功率因数-平均值
|
||||
*/
|
||||
@TableField(value = "tp_power_factor_avg")
|
||||
private Double tpPowerFactorAvg;
|
||||
|
||||
/**
|
||||
* 三相功率因数-95值
|
||||
*/
|
||||
* 三相功率因数-95值
|
||||
*/
|
||||
@TableField(value = "tp_power_factor_95")
|
||||
private Double tpPowerFactor95;
|
||||
|
||||
/**
|
||||
* 基波功率因数-最大值
|
||||
*/
|
||||
* 基波功率因数-最大值
|
||||
*/
|
||||
@TableField(value = "fundamental_power_factor_max")
|
||||
private Double fundamentalPowerFactorMax;
|
||||
|
||||
/**
|
||||
* 基波功率因数-最小值
|
||||
*/
|
||||
* 基波功率因数-最小值
|
||||
*/
|
||||
@TableField(value = "fundamental_power_factor_min")
|
||||
private Double fundamentalPowerFactorMin;
|
||||
|
||||
/**
|
||||
* 基波功率因数-平均值
|
||||
*/
|
||||
* 基波功率因数-平均值
|
||||
*/
|
||||
@TableField(value = "fundamental_power_factor_avg")
|
||||
private Double fundamentalPowerFactorAvg;
|
||||
|
||||
/**
|
||||
* 基波功率因数-95值
|
||||
*/
|
||||
* 基波功率因数-95值
|
||||
*/
|
||||
@TableField(value = "fundamental_power_factor_95")
|
||||
private Double fundamentalPowerFactor95;
|
||||
|
||||
/**
|
||||
* 正序电压-最大值
|
||||
*/
|
||||
* 正序电压-最大值
|
||||
*/
|
||||
@TableField(value = "positive_sequence_voltage_max")
|
||||
private Double positiveSequenceVoltageMax;
|
||||
|
||||
/**
|
||||
* 正序电压-最小值
|
||||
*/
|
||||
* 正序电压-最小值
|
||||
*/
|
||||
@TableField(value = "positive_sequence_voltage_min")
|
||||
private Double positiveSequenceVoltageMin;
|
||||
|
||||
/**
|
||||
* 正序电压-平均值
|
||||
*/
|
||||
* 正序电压-平均值
|
||||
*/
|
||||
@TableField(value = "positive_sequence_voltage_avg")
|
||||
private Double positiveSequenceVoltageAvg;
|
||||
|
||||
/**
|
||||
* 正序电压-95值
|
||||
*/
|
||||
* 正序电压-95值
|
||||
*/
|
||||
@TableField(value = "positive_sequence_voltage_95")
|
||||
private Double positiveSequenceVoltage95;
|
||||
|
||||
/**
|
||||
* 负序电压-最大值
|
||||
*/
|
||||
* 负序电压-最大值
|
||||
*/
|
||||
@TableField(value = "negative_sequence_voltage_max")
|
||||
private Double negativeSequenceVoltageMax;
|
||||
|
||||
/**
|
||||
* 负序电压-最小值
|
||||
*/
|
||||
* 负序电压-最小值
|
||||
*/
|
||||
@TableField(value = "negative_sequence_voltage_min")
|
||||
private Double negativeSequenceVoltageMin;
|
||||
|
||||
/**
|
||||
* 负序电压-平均值
|
||||
*/
|
||||
* 负序电压-平均值
|
||||
*/
|
||||
@TableField(value = "negative_sequence_voltage_avg")
|
||||
private Double negativeSequenceVoltageAvg;
|
||||
|
||||
/**
|
||||
* 负序电压-95值
|
||||
*/
|
||||
* 负序电压-95值
|
||||
*/
|
||||
@TableField(value = "negative_sequence_voltage_95")
|
||||
private Double negativeSequenceVoltage95;
|
||||
|
||||
/**
|
||||
* 零序电压-最大值
|
||||
*/
|
||||
* 零序电压-最大值
|
||||
*/
|
||||
@TableField(value = "zero_sequence_voltage_max")
|
||||
private Double zeroSequenceVoltageMax;
|
||||
|
||||
/**
|
||||
* 零序电压-最小值
|
||||
*/
|
||||
* 零序电压-最小值
|
||||
*/
|
||||
@TableField(value = "zero_sequence_voltage_min")
|
||||
private Double zeroSequenceVoltageMin;
|
||||
|
||||
/**
|
||||
* 零序电压-平均值
|
||||
*/
|
||||
* 零序电压-平均值
|
||||
*/
|
||||
@TableField(value = "zero_sequence_voltage_avg")
|
||||
private Double zeroSequenceVoltageAvg;
|
||||
|
||||
/**
|
||||
* 零序电压-95值
|
||||
*/
|
||||
* 零序电压-95值
|
||||
*/
|
||||
@TableField(value = "zero_sequence_voltage_95")
|
||||
private Double zeroSequenceVoltage95;
|
||||
|
||||
/**
|
||||
* 负序电压不平衡度-最大值
|
||||
*/
|
||||
@ApiModelProperty("负序电压(三相电压)不平衡度-最大值")
|
||||
* 负序电压不平衡度-最大值
|
||||
*/
|
||||
@TableField(value = "negative_sequence_voltage_unbalance_max")
|
||||
private Double negativeSequenceVoltageUnbalanceMax;
|
||||
|
||||
/**
|
||||
* 负序电压不平衡度-最小值
|
||||
*/
|
||||
@ApiModelProperty("负序电压(三相电压)不平衡度-最小值")
|
||||
* 负序电压不平衡度-最小值
|
||||
*/
|
||||
@TableField(value = "negative_sequence_voltage_unbalance_min")
|
||||
private Double negativeSequenceVoltageUnbalanceMin;
|
||||
|
||||
/**
|
||||
* 负序电压不平衡度-平均值
|
||||
*/
|
||||
@ApiModelProperty("负序电压(三相电压)不平衡度-平均值")
|
||||
* 负序电压不平衡度-平均值
|
||||
*/
|
||||
@TableField(value = "negative_sequence_voltage_unbalance_avg")
|
||||
private Double negativeSequenceVoltageUnbalanceAvg;
|
||||
|
||||
/**
|
||||
* 负序电压不平衡度-95值
|
||||
*/
|
||||
@ApiModelProperty("负序电压(三相电压)不平衡度-95值")
|
||||
* 负序电压不平衡度-95值
|
||||
*/
|
||||
@TableField(value = "negative_sequence_voltage_unbalance_95")
|
||||
private Double negativeSequenceVoltageUnbalance95;
|
||||
|
||||
/**
|
||||
* 零序电压不平衡度-最大值
|
||||
*/
|
||||
* 零序电压不平衡度-最大值
|
||||
*/
|
||||
@TableField(value = "zero_sequence_voltage_unbalance_max")
|
||||
private Double zeroSequenceVoltageUnbalanceMax;
|
||||
|
||||
/**
|
||||
* 零序电压不平衡度-最小值
|
||||
*/
|
||||
* 零序电压不平衡度-最小值
|
||||
*/
|
||||
@TableField(value = "zero_sequence_voltage_unbalance_min")
|
||||
private Double zeroSequenceVoltageUnbalanceMin;
|
||||
|
||||
/**
|
||||
* 零序电压不平衡度-平均值
|
||||
*/
|
||||
* 零序电压不平衡度-平均值
|
||||
*/
|
||||
@TableField(value = "zero_sequence_voltage_unbalance_avg")
|
||||
private Double zeroSequenceVoltageUnbalanceAvg;
|
||||
|
||||
/**
|
||||
* 零序电压不平衡度-95值
|
||||
*/
|
||||
* 零序电压不平衡度-95值
|
||||
*/
|
||||
@TableField(value = "zero_sequence_voltage_unbalance_95")
|
||||
private Double zeroSequenceVoltageUnbalance95;
|
||||
|
||||
/**
|
||||
* 正序电流-最大值
|
||||
*/
|
||||
* 正序电流-最大值
|
||||
*/
|
||||
@TableField(value = "positive_sequence_current_max")
|
||||
private Double positiveSequenceCurrentMax;
|
||||
|
||||
/**
|
||||
* 正序电流-最小值
|
||||
*/
|
||||
* 正序电流-最小值
|
||||
*/
|
||||
@TableField(value = "positive_sequence_current_min")
|
||||
private Double positiveSequenceCurrentMin;
|
||||
|
||||
/**
|
||||
* 正序电流-平均值
|
||||
*/
|
||||
* 正序电流-平均值
|
||||
*/
|
||||
@TableField(value = "positive_sequence_current_avg")
|
||||
private Double positiveSequenceCurrentAvg;
|
||||
|
||||
/**
|
||||
* 正序电流-95值
|
||||
*/
|
||||
* 正序电流-95值
|
||||
*/
|
||||
@TableField(value = "positive_sequence_current_95")
|
||||
private Double positiveSequenceCurrent95;
|
||||
|
||||
/**
|
||||
* 负序电流-最大值
|
||||
*/
|
||||
@ApiModelProperty("负序电流-最大值")
|
||||
* 负序电流-最大值
|
||||
*/
|
||||
@TableField(value = "negative_sequence_current_max")
|
||||
private Double negativeSequenceCurrentMax;
|
||||
|
||||
/**
|
||||
* 负序电流-最小值
|
||||
*/
|
||||
@ApiModelProperty("负序电流-最小值")
|
||||
* 负序电流-最小值
|
||||
*/
|
||||
@TableField(value = "negative_sequence_current_min")
|
||||
private Double negativeSequenceCurrentMin;
|
||||
|
||||
/**
|
||||
* 负序电流-平均值
|
||||
*/
|
||||
@ApiModelProperty("负序电流-平均值")
|
||||
* 负序电流-平均值
|
||||
*/
|
||||
@TableField(value = "negative_sequence_current_avg")
|
||||
private Double negativeSequenceCurrentAvg;
|
||||
|
||||
/**
|
||||
* 负序电流-95值
|
||||
*/
|
||||
@ApiModelProperty("负序电流-95值")
|
||||
* 负序电流-95值
|
||||
*/
|
||||
@TableField(value = "negative_sequence_current_95")
|
||||
private Double negativeSequenceCurrent95;
|
||||
|
||||
/**
|
||||
* 零序电流-最大值
|
||||
*/
|
||||
* 零序电流-最大值
|
||||
*/
|
||||
@TableField(value = "zero_sequence_current_max")
|
||||
private Double zeroSequenceCurrentMax;
|
||||
|
||||
/**
|
||||
* 零序电流-最小值
|
||||
*/
|
||||
* 零序电流-最小值
|
||||
*/
|
||||
@TableField(value = "zero_sequence_current_min")
|
||||
private Double zeroSequenceCurrentMin;
|
||||
|
||||
/**
|
||||
* 零序电流-平均值
|
||||
*/
|
||||
* 零序电流-平均值
|
||||
*/
|
||||
@TableField(value = "zero_sequence_current_avg")
|
||||
private Double zeroSequenceCurrentAvg;
|
||||
|
||||
/**
|
||||
* 零序电流-95值
|
||||
*/
|
||||
* 零序电流-95值
|
||||
*/
|
||||
@TableField(value = "zero_sequence_current_95")
|
||||
private Double zeroSequenceCurrent95;
|
||||
|
||||
/**
|
||||
* 负序电流不平衡度-最大值
|
||||
*/
|
||||
* 负序电流不平衡度-最大值
|
||||
*/
|
||||
@TableField(value = "negative_sequence_current_unbalance_max")
|
||||
private Double negativeSequenceCurrentUnbalanceMax;
|
||||
|
||||
/**
|
||||
* 负序电流不平衡度-最小值
|
||||
*/
|
||||
* 负序电流不平衡度-最小值
|
||||
*/
|
||||
@TableField(value = "negative_sequence_current_unbalance_min")
|
||||
private Double negativeSequenceCurrentUnbalanceMin;
|
||||
|
||||
/**
|
||||
* 负序电流不平衡度-平均值
|
||||
*/
|
||||
* 负序电流不平衡度-平均值
|
||||
*/
|
||||
@TableField(value = "negative_sequence_current_unbalance_avg")
|
||||
private Double negativeSequenceCurrentUnbalanceAvg;
|
||||
|
||||
/**
|
||||
* 负序电流不平衡度-95值
|
||||
*/
|
||||
* 负序电流不平衡度-95值
|
||||
*/
|
||||
@TableField(value = "negative_sequence_current_unbalance_95")
|
||||
private Double negativeSequenceCurrentUnbalance95;
|
||||
|
||||
/**
|
||||
* 零序电流不平衡度-最大值
|
||||
*/
|
||||
* 零序电流不平衡度-最大值
|
||||
*/
|
||||
@TableField(value = "zero_sequence_current_imbalance_max")
|
||||
private Double zeroSequenceCurrentImbalanceMax;
|
||||
|
||||
/**
|
||||
* 零序电流不平衡度-最小值
|
||||
*/
|
||||
* 零序电流不平衡度-最小值
|
||||
*/
|
||||
@TableField(value = "zero_sequence_current_imbalance_min")
|
||||
private Double zeroSequenceCurrentImbalanceMin;
|
||||
|
||||
/**
|
||||
* 零序电流不平衡度-平均值
|
||||
*/
|
||||
* 零序电流不平衡度-平均值
|
||||
*/
|
||||
@TableField(value = "zero_sequence_current_imbalance_avg")
|
||||
private Double zeroSequenceCurrentImbalanceAvg;
|
||||
|
||||
/**
|
||||
* 零序电流不平衡度-95值
|
||||
*/
|
||||
* 零序电流不平衡度-95值
|
||||
*/
|
||||
@TableField(value = "zero_sequence_current_imbalance_95")
|
||||
private Double zeroSequenceCurrentImbalance95;
|
||||
|
||||
/**
|
||||
* 等效视在功率-最大值
|
||||
*/
|
||||
* 等效视在功率-最大值
|
||||
*/
|
||||
@TableField(value = "equivalent_apparent_power_max")
|
||||
private Double equivalentApparentPowerMax;
|
||||
|
||||
/**
|
||||
* 等效视在功率-最小值
|
||||
*/
|
||||
* 等效视在功率-最小值
|
||||
*/
|
||||
@TableField(value = "equivalent_apparent_power_min")
|
||||
private Double equivalentApparentPowerMin;
|
||||
|
||||
/**
|
||||
* 等效视在功率-平均值
|
||||
*/
|
||||
* 等效视在功率-平均值
|
||||
*/
|
||||
@TableField(value = "equivalent_apparent_power_avg")
|
||||
private Double equivalentApparentPowerAvg;
|
||||
|
||||
/**
|
||||
* 等效视在功率-95值
|
||||
*/
|
||||
* 等效视在功率-95值
|
||||
*/
|
||||
@TableField(value = "equivalent_apparent_power_95")
|
||||
private Double equivalentApparentPower95;
|
||||
|
||||
/**
|
||||
* 等效功率因数-最大值
|
||||
*/
|
||||
* 等效功率因数-最大值
|
||||
*/
|
||||
@TableField(value = "equivalent_power_factor_max")
|
||||
private Double equivalentPowerFactorMax;
|
||||
|
||||
/**
|
||||
* 等效功率因数-最小值
|
||||
*/
|
||||
* 等效功率因数-最小值
|
||||
*/
|
||||
@TableField(value = "equivalent_power_factor_min")
|
||||
private Double equivalentPowerFactorMin;
|
||||
|
||||
/**
|
||||
* 等效功率因数-平均值
|
||||
*/
|
||||
* 等效功率因数-平均值
|
||||
*/
|
||||
@TableField(value = "equivalent_power_factor_avg")
|
||||
private Double equivalentPowerFactorAvg;
|
||||
|
||||
/**
|
||||
* 等效功率因数-95值
|
||||
*/
|
||||
* 等效功率因数-95值
|
||||
*/
|
||||
@TableField(value = "equivalent_power_factor_95")
|
||||
private Double equivalentPowerFactor95;
|
||||
|
||||
/**
|
||||
* 基波正序视在功率-最大值
|
||||
*/
|
||||
* 基波正序视在功率-最大值
|
||||
*/
|
||||
@TableField(value = "fundamental_wave_rateo_max")
|
||||
private Double fundamentalWaveRateoMax;
|
||||
|
||||
/**
|
||||
* 基波正序视在功率-最小值
|
||||
*/
|
||||
* 基波正序视在功率-最小值
|
||||
*/
|
||||
@TableField(value = "fundamental_wave_rateo_min")
|
||||
private Double fundamentalWaveRateoMin;
|
||||
|
||||
/**
|
||||
* 基波正序视在功率-平均值
|
||||
*/
|
||||
* 基波正序视在功率-平均值
|
||||
*/
|
||||
@TableField(value = "fundamental_wave_rateo_avg")
|
||||
private Double fundamentalWaveRateoAvg;
|
||||
|
||||
/**
|
||||
* 基波正序视在功率-95值
|
||||
*/
|
||||
* 基波正序视在功率-95值
|
||||
*/
|
||||
@TableField(value = "fundamental_wave_rateo_95")
|
||||
private Double fundamentalWaveRateo95;
|
||||
|
||||
/**
|
||||
* 基波等效视在功率-最大值
|
||||
*/
|
||||
* 基波等效视在功率-最大值
|
||||
*/
|
||||
@TableField(value = "fundamental_wave_apparent_max")
|
||||
private Double fundamentalWaveApparentMax;
|
||||
|
||||
/**
|
||||
* 基波等效视在功率-最小值
|
||||
*/
|
||||
* 基波等效视在功率-最小值
|
||||
*/
|
||||
@TableField(value = "fundamental_wave_apparent_min")
|
||||
private Double fundamentalWaveApparentMin;
|
||||
|
||||
/**
|
||||
* 基波等效视在功率-平均值
|
||||
*/
|
||||
* 基波等效视在功率-平均值
|
||||
*/
|
||||
@TableField(value = "fundamental_wave_apparent_avg")
|
||||
private Double fundamentalWaveApparentAvg;
|
||||
|
||||
/**
|
||||
* 基波等效视在功率-95值
|
||||
*/
|
||||
* 基波等效视在功率-95值
|
||||
*/
|
||||
@TableField(value = "fundamental_wave_apparent_95")
|
||||
private Double fundamentalWaveApparent95;
|
||||
|
||||
/**
|
||||
* 非基波等效视在功率-最大值
|
||||
*/
|
||||
* 非基波等效视在功率-最大值
|
||||
*/
|
||||
@TableField(value = "nonfundamental_wave_rateo_max")
|
||||
private Double nonfundamentalWaveRateoMax;
|
||||
|
||||
/**
|
||||
* 非基波等效视在功率-最小值
|
||||
*/
|
||||
* 非基波等效视在功率-最小值
|
||||
*/
|
||||
@TableField(value = "nonfundamental_wave_rateo_min")
|
||||
private Double nonfundamentalWaveRateoMin;
|
||||
|
||||
/**
|
||||
* 非基波等效视在功率-平均值
|
||||
*/
|
||||
* 非基波等效视在功率-平均值
|
||||
*/
|
||||
@TableField(value = "nonfundamental_wave_rateo_avg")
|
||||
private Double nonfundamentalWaveRateoAvg;
|
||||
|
||||
/**
|
||||
* 非基波等效视在功率-95值
|
||||
*/
|
||||
* 非基波等效视在功率-95值
|
||||
*/
|
||||
@TableField(value = "nonfundamental_wave_rateo_95")
|
||||
private Double nonfundamentalWaveRateo95;
|
||||
|
||||
/**
|
||||
* 不平衡视在功率-最大值
|
||||
*/
|
||||
* 不平衡视在功率-最大值
|
||||
*/
|
||||
@TableField(value = "unbalanced_apparent_power_max")
|
||||
private Double unbalancedApparentPowerMax;
|
||||
|
||||
/**
|
||||
* 不平衡视在功率-最小值
|
||||
*/
|
||||
* 不平衡视在功率-最小值
|
||||
*/
|
||||
@TableField(value = "unbalanced_apparent_power_min")
|
||||
private Double unbalancedApparentPowerMin;
|
||||
|
||||
/**
|
||||
* 不平衡视在功率-平均值
|
||||
*/
|
||||
* 不平衡视在功率-平均值
|
||||
*/
|
||||
@TableField(value = "unbalanced_apparent_power_avg")
|
||||
private Double unbalancedApparentPowerAvg;
|
||||
|
||||
/**
|
||||
* 不平衡视在功率-95值
|
||||
*/
|
||||
* 不平衡视在功率-95值
|
||||
*/
|
||||
@TableField(value = "unbalanced_apparent_power_95")
|
||||
private Double unbalancedApparentPower95;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.njcn.harmonic.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @author qijian
|
||||
* @TableName r_mp_plt_report_d
|
||||
*/
|
||||
@TableName(value ="r_mp_plt_report_d")
|
||||
@Data
|
||||
public class RMpPltReportD implements Serializable {
|
||||
/**
|
||||
* 监测点ID
|
||||
*/
|
||||
@MppMultiId(value = "measurement_point_id")
|
||||
private String measurementPointId;
|
||||
|
||||
/**
|
||||
* 生成数据的时间,每日统计一次
|
||||
*/
|
||||
@MppMultiId(value = "data_date")
|
||||
private LocalDate dataDate;
|
||||
|
||||
/**
|
||||
* 相别:"A" "B" "C" "ABC" "T" 配网部分相别的数据采用T标志存储
|
||||
*/
|
||||
@MppMultiId(value = "phase")
|
||||
private String phase;
|
||||
|
||||
/**
|
||||
* 长时间闪变值-最大值
|
||||
*/
|
||||
@TableField(value = "long_time_flashing_max")
|
||||
private Double longTimeFlashingMax;
|
||||
|
||||
/**
|
||||
* 长时间闪变值-最小值
|
||||
*/
|
||||
@TableField(value = "long_time_flashing_min")
|
||||
private Double longTimeFlashingMin;
|
||||
|
||||
/**
|
||||
* 长时间闪变值-平均值
|
||||
*/
|
||||
@TableField(value = "long_time_flashing_avg")
|
||||
private Double longTimeFlashingAvg;
|
||||
|
||||
/**
|
||||
* 长时间闪变值-95值
|
||||
*/
|
||||
@TableField(value = "long_time_flashing_95")
|
||||
private Double longTimeFlashing95;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.njcn.harmonic.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/12/15 11:00【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "r_mp_target_warn_d")
|
||||
public class RMpTargetWarnDPO {
|
||||
/**
|
||||
* 监测点ID
|
||||
*/
|
||||
@MppMultiId(value = "measurement_point_id")
|
||||
private String measurementPointId;
|
||||
|
||||
/**
|
||||
* 生成数据的时间,每日统计一次
|
||||
*/
|
||||
@MppMultiId(value = "data_date")
|
||||
private Date dataDate;
|
||||
|
||||
/**
|
||||
* 是否是有效接入监测点(0:否 1:是)
|
||||
*/
|
||||
@TableField(value = "is_effective")
|
||||
private Integer isEffective;
|
||||
|
||||
/**
|
||||
* 是否是稳态超标监测点(0:否 1:是)
|
||||
*/
|
||||
@TableField(value = "is_harmonic")
|
||||
private Integer isHarmonic;
|
||||
|
||||
/**
|
||||
* 是否是发生暂态的监测点(0:否 1:是)
|
||||
*/
|
||||
@TableField(value = "is_event")
|
||||
private Integer isEvent;
|
||||
|
||||
/**
|
||||
* 是否是告警监测点数(0:否 1:是)
|
||||
*/
|
||||
@TableField(value = "is_warn")
|
||||
private Integer isWarn;
|
||||
|
||||
/**
|
||||
* 电压偏差是否告警(0:否 1:是)
|
||||
*/
|
||||
@TableField(value = "is_v_dev_warn")
|
||||
private Integer isVDevWarn;
|
||||
|
||||
/**
|
||||
* 频率偏差是否告警(0:否 1:是)
|
||||
*/
|
||||
@TableField(value = "is_freq_warn")
|
||||
private Integer isFreqWarn;
|
||||
|
||||
/**
|
||||
* 三相电压不平衡度是否告警(0:否 1:是)
|
||||
*/
|
||||
@TableField(value = "is_unbalance_warn")
|
||||
private Integer isUnbalanceWarn;
|
||||
|
||||
/**
|
||||
* 谐波电压是否告警(0:否 1:是)
|
||||
*/
|
||||
@TableField(value = "is_v_warn")
|
||||
private Integer isVWarn;
|
||||
|
||||
/**
|
||||
* 闪变是否告警(0:否 1:是)
|
||||
*/
|
||||
@TableField(value = "is_flicker_warn")
|
||||
private Integer isFlickerWarn;
|
||||
|
||||
/**
|
||||
* 电压暂降是否告警(0:否 1:是)
|
||||
*/
|
||||
@TableField(value = "is_sag_warn")
|
||||
private Integer isSagWarn;
|
||||
|
||||
/**
|
||||
* 短时中断是否告警(0:否 1:是)
|
||||
*/
|
||||
@TableField(value = "is_interrupt_warn")
|
||||
private Integer isInterruptWarn;
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.njcn.harmonic.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/11/30 13:59【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
/**
|
||||
* 主网运行指标统计-月表,主网监测指标数据质量统计-月表
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "r_operating_index_m")
|
||||
public class ROperatingIndexMPO {
|
||||
/**
|
||||
* 单位ID
|
||||
*/
|
||||
@MppMultiId(value = "org_no")
|
||||
private String orgNo;
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
@MppMultiId(value = "data_date")
|
||||
private Date dataDate;
|
||||
|
||||
/**
|
||||
* 在运监测点数
|
||||
*/
|
||||
@TableField(value = "measurement_run_points")
|
||||
private Integer measurementRunPoints;
|
||||
|
||||
/**
|
||||
* 在线监测点数
|
||||
*/
|
||||
@TableField(value = "transit_measurement_points")
|
||||
private Integer transitMeasurementPoints;
|
||||
|
||||
/**
|
||||
* 有效接入监测点数量
|
||||
*/
|
||||
@TableField(value = "effective_access_measurement_count")
|
||||
private Integer effectiveAccessMeasurementCount;
|
||||
|
||||
/**
|
||||
* 监测终端数
|
||||
*/
|
||||
@TableField(value = "online_measurement_points")
|
||||
private Integer onlineMeasurementPoints;
|
||||
|
||||
/**
|
||||
* 在线终端数
|
||||
*/
|
||||
@TableField(value = "online_measurement_count")
|
||||
private Integer onlineMeasurementCount;
|
||||
|
||||
/**
|
||||
* 应设点数
|
||||
*/
|
||||
@TableField(value = "should_count")
|
||||
private Integer shouldCount;
|
||||
|
||||
/**
|
||||
* 应设点覆盖率
|
||||
*/
|
||||
@TableField(value = "should_point_coverage")
|
||||
private Double shouldPointCoverage;
|
||||
|
||||
/**
|
||||
* 数据完整率
|
||||
*/
|
||||
@TableField(value = "data_integrity_rate")
|
||||
private Double dataIntegrityRate;
|
||||
|
||||
/**
|
||||
* 数据准确率
|
||||
*/
|
||||
@TableField(value = "data_right_rate")
|
||||
private Double dataRightRate;
|
||||
|
||||
/**
|
||||
* 指标完整率
|
||||
*/
|
||||
@TableField(value = "index_integrity_rate")
|
||||
private Double indexIntegrityRate;
|
||||
|
||||
/**
|
||||
* 数据否异常(0:正常 1:异常)
|
||||
*/
|
||||
@TableField(value = "is_unusual")
|
||||
private Integer isUnusual;
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.njcn.harmonic.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/11/30 15:58【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
/**
|
||||
* 主网运行指标统计-季表 ,主网监测指标数据质量统计-季表
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "r_operating_index_q")
|
||||
public class ROperatingIndexQPO {
|
||||
/**
|
||||
* 单位ID
|
||||
*/
|
||||
@MppMultiId(value = "org_no")
|
||||
private String orgNo;
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
@MppMultiId(value = "data_date")
|
||||
private Date dataDate;
|
||||
|
||||
/**
|
||||
* 在运监测点数
|
||||
*/
|
||||
@TableField(value = "measurement_run_points")
|
||||
private Integer measurementRunPoints;
|
||||
|
||||
/**
|
||||
* 在线监测点数
|
||||
*/
|
||||
@TableField(value = "transit_measurement_points")
|
||||
private Integer transitMeasurementPoints;
|
||||
|
||||
/**
|
||||
* 有效接入监测点数量
|
||||
*/
|
||||
@TableField(value = "effective_access_measurement_count")
|
||||
private Integer effectiveAccessMeasurementCount;
|
||||
|
||||
/**
|
||||
* 监测终端数
|
||||
*/
|
||||
@TableField(value = "online_measurement_points")
|
||||
private Integer onlineMeasurementPoints;
|
||||
|
||||
/**
|
||||
* 在线终端数
|
||||
*/
|
||||
@TableField(value = "online_measurement_count")
|
||||
private Integer onlineMeasurementCount;
|
||||
|
||||
/**
|
||||
* 应设点数
|
||||
*/
|
||||
@TableField(value = "should_count")
|
||||
private Integer shouldCount;
|
||||
|
||||
/**
|
||||
* 应设点覆盖率
|
||||
*/
|
||||
@TableField(value = "should_point_coverage")
|
||||
private Double shouldPointCoverage;
|
||||
|
||||
/**
|
||||
* 数据完整率
|
||||
*/
|
||||
@TableField(value = "data_integrity_rate")
|
||||
private Double dataIntegrityRate;
|
||||
|
||||
/**
|
||||
* 数据准确率
|
||||
*/
|
||||
@TableField(value = "data_right_rate")
|
||||
private Double dataRightRate;
|
||||
|
||||
/**
|
||||
* 指标完整率
|
||||
*/
|
||||
@TableField(value = "index_integrity_rate")
|
||||
private Double indexIntegrityRate;
|
||||
|
||||
/**
|
||||
* 数据是否异常(0:正常 1:异常)
|
||||
*/
|
||||
@TableField(value = "is_unusual")
|
||||
private Integer isUnusual;
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.njcn.harmonic.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/11/30 15:58【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
/**
|
||||
* 主网运行指标统计-年表,主网监测指标数据质量统计-年表
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "r_operating_index_y")
|
||||
public class ROperatingIndexYPO {
|
||||
/**
|
||||
* 单位ID
|
||||
*/
|
||||
@MppMultiId(value = "org_no")
|
||||
private String orgNo;
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
@MppMultiId(value = "data_date")
|
||||
private Date dataDate;
|
||||
|
||||
/**
|
||||
* 在运监测点数
|
||||
*/
|
||||
@TableField(value = "measurement_run_points")
|
||||
private Integer measurementRunPoints;
|
||||
|
||||
/**
|
||||
* 在线监测点数
|
||||
*/
|
||||
@TableField(value = "transit_measurement_points")
|
||||
private Integer transitMeasurementPoints;
|
||||
|
||||
/**
|
||||
* 有效接入监测点数量
|
||||
*/
|
||||
@TableField(value = "effective_access_measurement_count")
|
||||
private Integer effectiveAccessMeasurementCount;
|
||||
|
||||
/**
|
||||
* 监测终端数
|
||||
*/
|
||||
@TableField(value = "online_measurement_points")
|
||||
private Integer onlineMeasurementPoints;
|
||||
|
||||
/**
|
||||
* 在线终端数
|
||||
*/
|
||||
@TableField(value = "online_measurement_count")
|
||||
private Integer onlineMeasurementCount;
|
||||
|
||||
/**
|
||||
* 应设点数
|
||||
*/
|
||||
@TableField(value = "should_count")
|
||||
private Integer shouldCount;
|
||||
|
||||
/**
|
||||
* 应设点覆盖率
|
||||
*/
|
||||
@TableField(value = "should_point_coverage")
|
||||
private Double shouldPointCoverage;
|
||||
|
||||
/**
|
||||
* 数据完整率
|
||||
*/
|
||||
@TableField(value = "data_integrity_rate")
|
||||
private Double dataIntegrityRate;
|
||||
|
||||
/**
|
||||
* 数据准确率
|
||||
*/
|
||||
@TableField(value = "data_right_rate")
|
||||
private Double dataRightRate;
|
||||
|
||||
/**
|
||||
* 指标完整率
|
||||
*/
|
||||
@TableField(value = "index_integrity_rate")
|
||||
private Double indexIntegrityRate;
|
||||
|
||||
/**
|
||||
* 数据是否异常(0:正常 1:异常)
|
||||
*/
|
||||
@TableField(value = "is_unusual")
|
||||
private Integer isUnusual;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.njcn.harmonic.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2022-12-28
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("r_stat_file")
|
||||
@ApiModel(value="RStatFile对象", description="")
|
||||
public class RStatFile implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "文件id")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "文件内容")
|
||||
private String fileContent;
|
||||
|
||||
@ApiModelProperty(value = "创建用户")
|
||||
@TableField("create_By")
|
||||
private String createBy;
|
||||
|
||||
@ApiModelProperty(value = "更新用户")
|
||||
@TableField("update_By")
|
||||
private String updateBy;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.njcn.harmonic.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/12/13 15:39【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
/**
|
||||
* 区域分类统计日表
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "r_stat_org_d")
|
||||
public class RStatOrgDPO {
|
||||
/**
|
||||
* 单位ID
|
||||
*/
|
||||
@MppMultiId(value = "org_no")
|
||||
private String orgNo;
|
||||
|
||||
/**
|
||||
* 生成数据的时间,每天统计一次
|
||||
*/
|
||||
@MppMultiId(value = "data_date")
|
||||
private Date dataDate;
|
||||
|
||||
/**
|
||||
* 监测点类别ID、监测对象类型ID
|
||||
*/
|
||||
@MppMultiId(value = "measurement_type_class")
|
||||
private String measurementTypeClass;
|
||||
|
||||
/**
|
||||
* 数据类型,字典表(01:主网测点 02:配网测点)
|
||||
*/
|
||||
@MppMultiId(value = "data_type")
|
||||
private String dataType;
|
||||
|
||||
/**
|
||||
* 总监测点数
|
||||
*/
|
||||
@TableField(value = "all_count")
|
||||
private Integer allCount;
|
||||
|
||||
/**
|
||||
* 有效接入监测点数
|
||||
*/
|
||||
@TableField(value = "effective_measurement")
|
||||
private Integer effectiveMeasurement;
|
||||
|
||||
/**
|
||||
* 稳态超标监测点数
|
||||
*/
|
||||
@TableField(value = "harmonic_measurement")
|
||||
private Integer harmonicMeasurement;
|
||||
|
||||
/**
|
||||
* 发生暂态的监测点数
|
||||
*/
|
||||
@TableField(value = "event_measurement")
|
||||
private Integer eventMeasurement;
|
||||
|
||||
/**
|
||||
* 暂态指标发生次数
|
||||
*/
|
||||
@TableField(value = "event_count")
|
||||
private Integer eventCount;
|
||||
|
||||
/**
|
||||
* 应设点数
|
||||
*/
|
||||
@TableField(value = "should_count")
|
||||
private Integer shouldCount;
|
||||
|
||||
/**
|
||||
* 告警监测点数
|
||||
*/
|
||||
@TableField(value = "warn_count")
|
||||
private Integer warnCount;
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
package com.njcn.harmonic.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/12/14 16:17【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
/**
|
||||
* 区域分类统计月表
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "r_stat_org_m")
|
||||
public class RStatOrgMPO {
|
||||
/**
|
||||
* 单位ID
|
||||
*/
|
||||
@MppMultiId(value = "org_no")
|
||||
private String orgNo;
|
||||
/**
|
||||
* 数据类型,字典表(01:主网测点 02:配网测点)
|
||||
*/
|
||||
@MppMultiId(value = "data_type")
|
||||
private String dataType;
|
||||
|
||||
/**
|
||||
* 生成数据的时间,每月统计一次
|
||||
*/
|
||||
@MppMultiId(value = "data_date")
|
||||
private Date dataDate;
|
||||
|
||||
/**
|
||||
* 监测点类别ID、监测对象类型ID
|
||||
*/
|
||||
@MppMultiId(value = "measurement_type_class")
|
||||
private String measurementTypeClass;
|
||||
|
||||
/**
|
||||
* 总监测点数
|
||||
*/
|
||||
@TableField(value = "all_count")
|
||||
private Integer allCount;
|
||||
|
||||
/**
|
||||
* 日均有效接入监测点数
|
||||
*/
|
||||
@TableField(value = "effective_measurement_average")
|
||||
private Integer effectiveMeasurementAverage;
|
||||
|
||||
/**
|
||||
* 累计有效接入监测点数
|
||||
*/
|
||||
@TableField(value = "effective_measurement_accrued")
|
||||
private Integer effectiveMeasurementAccrued;
|
||||
|
||||
/**
|
||||
* 日均稳态超标监测点数
|
||||
*/
|
||||
@TableField(value = "harmonic_measurement_average")
|
||||
private Integer harmonicMeasurementAverage;
|
||||
|
||||
/**
|
||||
* 累计稳态超标监测点数
|
||||
*/
|
||||
@TableField(value = "harmonic_measurement_accrued")
|
||||
private Integer harmonicMeasurementAccrued;
|
||||
|
||||
/**
|
||||
* 日均稳态超标监测点数占比
|
||||
*/
|
||||
@TableField(value = "harmonic_measurement_ratio_average")
|
||||
private Double harmonicMeasurementRatioAverage;
|
||||
|
||||
/**
|
||||
* 累计超标天数
|
||||
*/
|
||||
@TableField(value = "over_day_accrued")
|
||||
private Integer overDayAccrued;
|
||||
|
||||
/**
|
||||
* 频率偏差合格率
|
||||
*/
|
||||
@TableField(value = "freq_pass_rate")
|
||||
private Double freqPassRate;
|
||||
|
||||
/**
|
||||
* 电压偏差合格率
|
||||
*/
|
||||
@TableField(value = "v_dev_pass_rate")
|
||||
private Double vDevPassRate;
|
||||
|
||||
/**
|
||||
* 闪变合格率
|
||||
*/
|
||||
@TableField(value = "flicker_pass_rate")
|
||||
private Double flickerPassRate;
|
||||
|
||||
/**
|
||||
* 日均监测到暂态指标的监测点数
|
||||
*/
|
||||
@TableField(value = "event_measurement_average")
|
||||
private Integer eventMeasurementAverage;
|
||||
|
||||
/**
|
||||
* 累计监测到暂态指标的监测点数
|
||||
*/
|
||||
@TableField(value = "event_measurement_accrued")
|
||||
private Integer eventMeasurementAccrued;
|
||||
|
||||
/**
|
||||
* 日均暂态超标监测点数占比
|
||||
*/
|
||||
@TableField(value = "event_measurement_ratio_average")
|
||||
private Double eventMeasurementRatioAverage;
|
||||
|
||||
/**
|
||||
* 暂态指标发生频次
|
||||
*/
|
||||
@TableField(value = "event_freq")
|
||||
private Double eventFreq;
|
||||
|
||||
/**
|
||||
* 暂态指标发生次数
|
||||
*/
|
||||
@TableField(value = "event_count")
|
||||
private Integer eventCount;
|
||||
|
||||
/**
|
||||
* 应设点数
|
||||
*/
|
||||
@TableField(value = "should_count")
|
||||
private Integer shouldCount;
|
||||
|
||||
/**
|
||||
* 告警监测点数
|
||||
*/
|
||||
@TableField(value = "warn_count")
|
||||
private Integer warnCount;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.njcn.harmonic.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <功能描述>
|
||||
*
|
||||
* @author wr
|
||||
* @createTime: 2022-12-29
|
||||
*/
|
||||
@Data
|
||||
public class OverviewVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(name = "monitorSort", value = "监测点类型")
|
||||
private String monitorSort;
|
||||
@ApiModelProperty(name = "harmonicType", value = "指标类型")
|
||||
private String harmonicType;
|
||||
@ApiModelProperty(name = "sumNum", value = "超标指标")
|
||||
private String sumNum;
|
||||
@ApiModelProperty(name = "ytbSumNum", value = "同比超标指标")
|
||||
private String ytbSumNum;
|
||||
@ApiModelProperty(name = "yhbSumNum", value = "环比超标指标")
|
||||
private String yhbSumNum;
|
||||
@ApiModelProperty(name = "sumNum", value = "同比超标指标占比")
|
||||
private String sameNum;
|
||||
@ApiModelProperty(name = "sumNum", value = "环比超标指标占比")
|
||||
private String ringNum;
|
||||
|
||||
@Data
|
||||
public static class GroupVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(name = "monitorSort", value = "监测点类别")
|
||||
private String monitorSort;
|
||||
|
||||
@ApiModelProperty(name = "unbalanceAlarm", value = "三项不平横")
|
||||
private List<?> subset;
|
||||
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class VoltageVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(name = "monitoringObject", value = "监测对象")
|
||||
private String monitoringObject;
|
||||
|
||||
@ApiModelProperty(name = "areaPqEventType", value = "台区电能事件")
|
||||
private String areaPqEventType;
|
||||
|
||||
@ApiModelProperty(name = "totalMonitorNum", value = "累计监测点")
|
||||
private String totalMonitorNum;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ public class PwRStatOrgVO {
|
||||
@ApiModelProperty(value = "单位名称")
|
||||
private String orgName;
|
||||
|
||||
@ApiModelProperty(value = "监测点类别")
|
||||
@ApiModelProperty(value = "")
|
||||
private String monitorSort;
|
||||
|
||||
@ApiModelProperty(value = "在线监测点数")
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.njcn.harmonic.controller.algorithm;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
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.common.utils.HttpResultUtil;
|
||||
|
||||
import com.njcn.harmonic.enums.HarmonicResponseEnum;
|
||||
import com.njcn.harmonic.pojo.param.RStatFileVO;
|
||||
import com.njcn.harmonic.pojo.po.RStatFile;
|
||||
import com.njcn.harmonic.pojo.vo.PwRStatOrgVO;
|
||||
import com.njcn.harmonic.service.algorithm.RStatFileService;
|
||||
import com.njcn.minio.bo.MinIoUploadResDTO;
|
||||
import com.njcn.minio.config.MinIoProperties;
|
||||
import com.njcn.minio.utils.MinIoUtils;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "算法")
|
||||
@RequestMapping("/algorithm")
|
||||
public class AlgorithmController extends BaseController {
|
||||
|
||||
private final RStatFileService rStatFileService;
|
||||
|
||||
@Resource
|
||||
private MinIoUtils minIoUtils;
|
||||
@Resource
|
||||
private MinIoProperties minIoProperties;
|
||||
|
||||
/**
|
||||
* 算法保存
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/getAlgorithmSave")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("算法保存")
|
||||
@ApiImplicitParam(name = "param", value = "算发内容", required = true)
|
||||
public HttpResult<Boolean> getAlgorithmSave(@RequestBody RStatFileVO param) {
|
||||
String methodDescribe = getMethodDescribe("getAlgorithmSave");
|
||||
RStatFile rStatFile = BeanUtil.copyProperties(param, RStatFile.class);
|
||||
boolean b = rStatFileService.updateById(rStatFile);
|
||||
if(b){
|
||||
// minIoUtils.removeObjects( minIoProperties.getBucket(),param.getAddress());
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}else{
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("/getAlgorithmAll")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("算法查询")
|
||||
public HttpResult<List<RStatFile>> getAlgorithmAll() {
|
||||
String methodDescribe = getMethodDescribe("getAlgorithmAll");
|
||||
List<RStatFile> list = rStatFileService.list();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用上传请求
|
||||
*/
|
||||
@PostMapping("/common/upload")
|
||||
@ResponseBody
|
||||
public HttpResult<MinIoUploadResDTO> uploadFile(MultipartFile file)
|
||||
{
|
||||
try
|
||||
{
|
||||
//把名称存入数据
|
||||
MinIoUploadResDTO upload = minIoUtils.upload(file, minIoProperties.getBucket(), "algorithm/");
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, upload, null);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用删除请求
|
||||
*/
|
||||
// @PostMapping("/common/delete")
|
||||
// @ResponseBody
|
||||
// public HttpResult<MinIoUploadResDTO> delete()
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// List<String> aaa=new ArrayList<>();
|
||||
// aaa.add("algorithm/0CA99CB427A94A8A833499A41C557405.png");
|
||||
// aaa.add("algorithm/07D8A0FD304A42CDB73F514FBEE641BC.png");
|
||||
// minIoUtils.removeObjects( minIoProperties.getBucket(),aaa);
|
||||
// return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, null);
|
||||
// }
|
||||
// catch (Exception e)
|
||||
// {
|
||||
// return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, null);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.njcn.harmonic.controller.distribution;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.harmonic.pojo.param.OverviewParam;
|
||||
import com.njcn.harmonic.pojo.vo.OverviewVO;
|
||||
import com.njcn.harmonic.service.majornetwork.RStatHarmonicOrgMService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <分布式光伏概览>
|
||||
*
|
||||
* @author wr
|
||||
* @createTime: 2022-12-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pwOverview")
|
||||
@Slf4j
|
||||
@Api(tags = "分布式光伏概览")
|
||||
@RequiredArgsConstructor
|
||||
public class PwOverviewController extends BaseController {
|
||||
|
||||
private final RStatHarmonicOrgMService rStatHarmonicOrgMService;
|
||||
|
||||
|
||||
@PostMapping("/getAlarmProportion")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("告警监测点数占比")
|
||||
@ApiImplicitParam(name = "param", value = "条件参数", required = true)
|
||||
public HttpResult<List<OverviewVO.GroupVO>> getAlarmProportion(@RequestBody OverviewParam param) {
|
||||
String methodDescribe = getMethodDescribe("getAlarmProportion");
|
||||
List<OverviewVO.GroupVO> monitorYoY = rStatHarmonicOrgMService.getExcessiveProportion(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, monitorYoY, methodDescribe);
|
||||
}
|
||||
}
|
||||
@@ -25,10 +25,10 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* 配网指标分类概览-监测点分类总览
|
||||
* </p>
|
||||
*
|
||||
* @author rui.wu
|
||||
* @author wr
|
||||
* @since 2022-10-09
|
||||
*/
|
||||
@RestController
|
||||
|
||||
@@ -55,7 +55,7 @@ public class PwRStatHarmonicOrgController extends BaseController {
|
||||
switch (string) {
|
||||
//查询各单位累计超标监测点数-年数据
|
||||
case BizParamConstant.STAT_BIZ_YEAR:
|
||||
org = rStatHarmonicOrgYService.getPwRStatHarmonicYOldAll(param,2);
|
||||
org = rStatHarmonicOrgYService.getPwRStatHarmonicYOldAll(param, 2);
|
||||
break;
|
||||
//查询各单位累计超标监测点数-季数据
|
||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||
@@ -81,12 +81,12 @@ public class PwRStatHarmonicOrgController extends BaseController {
|
||||
@ApiImplicitParam(name = "param", value = "各单位超标监测统计参数", required = true)
|
||||
public HttpResult<List<RIconVO>> getPwRStatHarmonicOrgIcon(@RequestBody RStatHarmonicMParam param) {
|
||||
String methodDescribe = getMethodDescribe("getPwRStatHarmonicOrgIcon");
|
||||
List<RIconVO> icon= null;
|
||||
List<RIconVO> icon = null;
|
||||
String string = param.getType().toString();
|
||||
switch (string) {
|
||||
//查询各单位累计超标监测点数统计图-年数据
|
||||
case BizParamConstant.STAT_BIZ_YEAR:
|
||||
icon = rStatHarmonicOrgYService.getPwRStatHarmonicOrgYOldIcon(param,2);
|
||||
icon = rStatHarmonicOrgYService.getPwRStatHarmonicOrgYOldIcon(param, 2);
|
||||
break;
|
||||
//查询各单位累计超标监测点数-季数据
|
||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||
|
||||
@@ -56,7 +56,7 @@ public class RStatHarmonicOrgController extends BaseController {
|
||||
switch (string) {
|
||||
//查询各单位累计超标监测点数-年数据
|
||||
case BizParamConstant.STAT_BIZ_YEAR:
|
||||
rStatHarmonicOrgMAll = rStatHarmonicOrgYService.getPwRStatHarmonicYOldAll(param,1);
|
||||
rStatHarmonicOrgMAll = rStatHarmonicOrgYService.getPwRStatHarmonicYOldAll(param, 1);
|
||||
break;
|
||||
//查询各单位累计超标监测点数-季数据
|
||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||
@@ -86,7 +86,7 @@ public class RStatHarmonicOrgController extends BaseController {
|
||||
switch (string) {
|
||||
//查询各单位累计超标监测点数统计图-年数据
|
||||
case BizParamConstant.STAT_BIZ_YEAR:
|
||||
getAllRStatHarmonicOrgIcon = rStatHarmonicOrgYService.getPwRStatHarmonicOrgYOldIcon(param,1);
|
||||
getAllRStatHarmonicOrgIcon = rStatHarmonicOrgYService.getPwRStatHarmonicOrgYOldIcon(param, 1);
|
||||
break;
|
||||
//查询各单位累计超标监测点数-季数据
|
||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||
|
||||
@@ -82,7 +82,7 @@ public class RStatOrgController extends BaseController {
|
||||
@GetMapping("/getRStatSubstation")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("区域稳态指标超标分类统计表")
|
||||
public HttpResult<List<RStatSubstationOrg2VO> > getRStatSubstation(StatisticsBizBaseParam param) {
|
||||
public HttpResult<List<RStatSubstationOrg2VO>> getRStatSubstation(StatisticsBizBaseParam param) {
|
||||
String methodDescribe = getMethodDescribe("getRStatSubstation");
|
||||
List<RStatSubstationOrg2VO> statSubstationIcon = rStatOrgYService.getRStatSubstationOrg(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, statSubstationIcon, methodDescribe);
|
||||
|
||||
@@ -38,6 +38,7 @@ public class RStatOrgPvPowerQualityController extends BaseController {
|
||||
|
||||
/**
|
||||
* 低功率因数统计
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@@ -53,6 +54,7 @@ public class RStatOrgPvPowerQualityController extends BaseController {
|
||||
|
||||
/**
|
||||
* 详细数据表分页查询
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -40,6 +40,7 @@ public class WindFarmController extends BaseController {
|
||||
|
||||
/**
|
||||
* 详细数据表分页查询
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@@ -55,6 +56,7 @@ public class WindFarmController extends BaseController {
|
||||
|
||||
/**
|
||||
* 详细数据表分页查询
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package com.njcn.harmonic.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.harmonic.pojo.param.OverviewParam;
|
||||
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
||||
import com.njcn.harmonic.pojo.po.RStatHarmonicOrgM;
|
||||
import com.njcn.harmonic.pojo.vo.OverviewVO;
|
||||
import com.njcn.harmonic.pojo.vo.RStatHarmonicVO;
|
||||
import com.njcn.harmonic.pojo.vo.StatHarmonicOrgVO;
|
||||
import com.njcn.user.pojo.dto.DeptDTO;
|
||||
@@ -33,4 +35,15 @@ public interface StatHarmonicOrgMMapper extends BaseMapper<RStatHarmonicOrgM> {
|
||||
List<RStatHarmonicVO> selectInfoList(@Param("param") StatSubstationBizBaseParam param,
|
||||
@Param("ids") List<String> ids,
|
||||
@Param("dataType") String dataType);
|
||||
|
||||
/**
|
||||
* 分布式光伏概览-超标监测点占比
|
||||
* @param param
|
||||
* @param ids
|
||||
* @param dataType
|
||||
* @return
|
||||
*/
|
||||
List<OverviewVO> selectYoY(@Param("param") OverviewParam param,
|
||||
@Param("ids") List<String> ids,
|
||||
@Param("dataType") String dataType);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.harmonic.mapper.algorithm;
|
||||
|
||||
import com.njcn.harmonic.pojo.po.RStatFile;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2022-12-28
|
||||
*/
|
||||
public interface RStatFileMapper extends BaseMapper<RStatFile> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.harmonic.mapper.algorithm.RStatFileMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.njcn.harmonic.pojo.po.RStatFile">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_Time" property="createTime" />
|
||||
<result column="update_Time" property="updateTime" />
|
||||
<result column="file_content" property="fileContent" />
|
||||
<result column="create_By" property="createBy" />
|
||||
<result column="update_By" property="updateBy" />
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
@@ -52,5 +52,103 @@
|
||||
GROUP BY
|
||||
harmonic_type
|
||||
</select>
|
||||
<select id="selectYoY" resultType="com.njcn.harmonic.pojo.vo.OverviewVO">
|
||||
SELECT
|
||||
concat(ta.yy,'-',ta.mm) dateTime,
|
||||
ta.measurement_type_class as monitorSort,
|
||||
ta.harmonic_type as harmonicType,
|
||||
ta.num as sumNum,
|
||||
IFNULL(tb.num,0) as ytbSumNum,
|
||||
IFNULL(tc.num,0) as yhbSumNum,
|
||||
ifnull(round((ta.num-tb.num)/tb.num*100,2),0) as sameNum,
|
||||
ifnull(round((ta.num-tc.num)/tc.num*100,2),0) as ringNum
|
||||
|
||||
FROM (
|
||||
SELECT
|
||||
t.measurement_type_class,
|
||||
t.harmonic_type,
|
||||
year(t.data_date) as yy,
|
||||
month(t.data_date) as mm,
|
||||
TRUNCATE(SUM(over_limit_measurement_ratio_accrued)/count(over_limit_measurement_ratio_accrued),2) as num
|
||||
|
||||
|
||||
FROM r_stat_harmonic_m t
|
||||
<where>
|
||||
and data_Type=#{dataType}
|
||||
<if test="ids != null and ids.size > 0">
|
||||
AND org_no IN
|
||||
<foreach collection='ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY t.measurement_type_class,t.harmonic_type,yy,mm
|
||||
) ta
|
||||
-- 同比:上年同月
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
t.measurement_type_class,
|
||||
t.harmonic_type,
|
||||
year(t.data_date) as yy,
|
||||
month(t.data_date) as mm,
|
||||
TRUNCATE(SUM(over_limit_measurement_ratio_accrued)/count(over_limit_measurement_ratio_accrued),2) as num
|
||||
|
||||
|
||||
FROM r_stat_harmonic_m t
|
||||
<where>
|
||||
and data_Type=#{dataType}
|
||||
<if test="ids != null and ids.size > 0">
|
||||
AND org_no IN
|
||||
<foreach collection='ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY t.measurement_type_class,t.harmonic_type,yy,mm
|
||||
) tb
|
||||
ON tb.mm = ta.mm and tb.yy = ta.yy-1 and tb.measurement_type_class = ta.measurement_type_class and tb.harmonic_type = ta.harmonic_type
|
||||
|
||||
-- 环比:上月
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
t.measurement_type_class,
|
||||
t.harmonic_type,
|
||||
year(t.data_date) as yy,
|
||||
month(t.data_date) as mm,
|
||||
TRUNCATE(SUM(over_limit_measurement_ratio_accrued)/count(over_limit_measurement_ratio_accrued),2) as num
|
||||
|
||||
|
||||
FROM r_stat_harmonic_m t
|
||||
<where>
|
||||
and data_Type=#{dataType}
|
||||
<if test="ids != null and ids.size > 0">
|
||||
AND org_no IN
|
||||
<foreach collection='ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY t.measurement_type_class,t.harmonic_type,yy,mm
|
||||
) tc
|
||||
ON ( (tc.yy = ta.yy and tc.mm = ta.mm - 1 and tc.measurement_type_class = ta.measurement_type_class and tc.harmonic_type = ta.harmonic_type)
|
||||
OR
|
||||
(tc.yy=ta.yy - 1 AND tc.mm = 12 AND ta.mm = 1 and tc.measurement_type_class = ta.measurement_type_class and tc.harmonic_type = ta.harmonic_type)
|
||||
)
|
||||
|
||||
<where>
|
||||
<if test="param.year != null and param.year!=''">
|
||||
AND ta.yy = #{param.year}
|
||||
</if>
|
||||
<if test="param.month != null and param.month.size > 0">
|
||||
AND ta.mm IN
|
||||
<foreach collection='param.month' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -4,9 +4,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.harmonic.pojo.po.RStatOrgPvPowerQualityMPO;
|
||||
import com.njcn.harmonic.pojo.vo.OverviewVO;
|
||||
import com.njcn.harmonic.pojo.vo.StreamReverseOrgVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -18,6 +20,15 @@ import java.util.Map;
|
||||
public interface RStatOrgPvPowerQualityMMapper extends BaseMapper<RStatOrgPvPowerQualityMPO> {
|
||||
|
||||
Page<StreamReverseOrgVO> getStreamReverseByOrg(IPage<StreamReverseOrgVO> page, @Param("condMap")Map<String, Object> condMap);
|
||||
|
||||
/**
|
||||
* 分布式光伏概览-电压问题
|
||||
* @param deptCodes
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
List<OverviewVO.VoltageVO> selectVoltage(@Param("deptCodes") List<String> deptCodes,
|
||||
@Param("ids") List<String> ids);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -43,4 +43,36 @@
|
||||
|
||||
GROUP BY org_no,monitoring_object
|
||||
</select>
|
||||
<select id="selectVoltage" resultType="com.njcn.harmonic.pojo.vo.OverviewVO$VoltageVO">
|
||||
SELECT
|
||||
monitoring_object,
|
||||
area_pq_event_type,
|
||||
TRUNCATE ( SUM( total_monitor_num )/ count( total_monitor_num ), 2 ) AS totalMonitorNum
|
||||
FROM
|
||||
r_stat_org_pv_power_quality_m
|
||||
<where>
|
||||
<if test="deptCodes != null and deptCodes.size > 0">
|
||||
AND org_no IN
|
||||
<foreach collection='deptCodes' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="ids != null and ids.size > 0">
|
||||
AND area_pq_event_type IN
|
||||
<foreach collection='ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<!-- <if test="param!=null and param.startTime != null and param.startTime !=''">-->
|
||||
<!-- AND data_date >= #{param.startTime}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="param!=null and param.endTime != null and param.endTime != ''">-->
|
||||
<!-- AND data_date <= #{param.endTime}-->
|
||||
<!-- </if>-->
|
||||
</where>
|
||||
GROUP BY
|
||||
monitoring_object,
|
||||
area_pq_event_type
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.harmonic.service.algorithm;
|
||||
|
||||
import com.njcn.harmonic.pojo.po.RStatFile;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2022-12-28
|
||||
*/
|
||||
public interface RStatFileService extends IService<RStatFile> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.njcn.harmonic.service.algorithm.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.harmonic.mapper.algorithm.RStatFileMapper;
|
||||
import com.njcn.harmonic.pojo.po.RStatFile;
|
||||
|
||||
import com.njcn.harmonic.service.algorithm.RStatFileService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2022-12-28
|
||||
*/
|
||||
@Service
|
||||
public class RStatFileServiceImpl extends ServiceImpl<RStatFileMapper, RStatFile> implements RStatFileService {
|
||||
|
||||
}
|
||||
@@ -23,6 +23,7 @@ public interface PwRStatOrgService extends IService<RStatOrgQ> {
|
||||
|
||||
/**
|
||||
* 配网查询区域超标统计
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@@ -38,6 +39,7 @@ public interface PwRStatOrgService extends IService<RStatOrgQ> {
|
||||
|
||||
/**
|
||||
* 配网稳态指标合格率明细表
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@@ -45,13 +47,15 @@ public interface PwRStatOrgService extends IService<RStatOrgQ> {
|
||||
|
||||
/**
|
||||
* 配网区域稳态指标超标分类统计表
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<RStatSubstationOrg2VO.PwRStatSubstationOrgVO> getRStatSubstationOrg(StatSubstationBizBaseParam param);
|
||||
|
||||
/**
|
||||
*配网区域稳态指标超标明细
|
||||
* 配网区域稳态指标超标明细
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -71,20 +71,20 @@ public class PwRStatOrgServiceImpl extends ServiceImpl<PwRStatOrgMapper, RStatOr
|
||||
switch (String.valueOf(param.getType())) {
|
||||
//查询区域超标统计-年数据
|
||||
case BizParamConstant.STAT_BIZ_YEAR:
|
||||
info = pwRStatOrgMapper.selectListY(param,deptIds,distributionData.getId());
|
||||
info = pwRStatOrgMapper.selectListY(param, deptIds, distributionData.getId());
|
||||
break;
|
||||
//查询区域超标统计-季数据
|
||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||
info = pwRStatOrgMapper.selectListQ(param,deptIds,distributionData.getId());
|
||||
info = pwRStatOrgMapper.selectListQ(param, deptIds, distributionData.getId());
|
||||
break;
|
||||
//查询各区域超标统计-月数据
|
||||
case BizParamConstant.STAT_BIZ_MONTH:
|
||||
info = pwRStatOrgMapper.selectListM(param,deptIds,distributionData.getId());
|
||||
info = pwRStatOrgMapper.selectListM(param, deptIds, distributionData.getId());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if(CollectionUtil.isNotEmpty(info)){
|
||||
if (CollectionUtil.isNotEmpty(info)) {
|
||||
Map<String, List<RStatOrgVO.PwRStatOrgVO>> collect = info.stream().collect(
|
||||
Collectors.groupingBy(RStatOrgVO.PwRStatOrgVO::getOrgNo));
|
||||
collect.forEach((key, value) -> {
|
||||
@@ -98,7 +98,7 @@ public class PwRStatOrgServiceImpl extends ServiceImpl<PwRStatOrgMapper, RStatOr
|
||||
});
|
||||
return newList;
|
||||
}
|
||||
return Lists.newArrayList();
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -114,7 +114,7 @@ public class PwRStatOrgServiceImpl extends ServiceImpl<PwRStatOrgMapper, RStatOr
|
||||
|
||||
//获取配网信息
|
||||
DictData distributionData = dicDataFeignClient.getDicDataByCode(DicDataEnum.DISTRIBUTION_POINT.getCode()).getData();
|
||||
List<PwRStatOrgVO> info=new ArrayList<>();
|
||||
List<PwRStatOrgVO> info = new ArrayList<>();
|
||||
if (CollectionUtil.isNotEmpty(deptDTOList)) {
|
||||
// 过滤出部门id
|
||||
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||
@@ -153,7 +153,7 @@ public class PwRStatOrgServiceImpl extends ServiceImpl<PwRStatOrgMapper, RStatOr
|
||||
//初始化对象
|
||||
List<RStatOrgIndexVO> info = new ArrayList<>();
|
||||
// 获取当前用户的部门的子部门信息
|
||||
PwPmsMonitorParam pwPmsMonitorParam=new PwPmsMonitorParam();
|
||||
PwPmsMonitorParam pwPmsMonitorParam = new PwPmsMonitorParam();
|
||||
//部门id
|
||||
pwPmsMonitorParam.setOrgId(param.getId());
|
||||
//变电站
|
||||
@@ -165,10 +165,10 @@ public class PwRStatOrgServiceImpl extends ServiceImpl<PwRStatOrgMapper, RStatOr
|
||||
//监测点名称
|
||||
pwPmsMonitorParam.setMonitorName(param.getMonitorName());
|
||||
List<PwPmsMonitorDTO> monitorDTOList = pwMonitorClient.getPwMonitorList(pwPmsMonitorParam).getData();
|
||||
Map<String, PwPmsMonitorDTO> monitorDTOMap = monitorDTOList.stream().collect(
|
||||
Collectors.toMap(PwPmsMonitorDTO::getMonitorId, Function.identity(),(key1,key2) ->key2));
|
||||
|
||||
if (CollectionUtil.isNotEmpty(monitorDTOList)) {
|
||||
Map<String, PwPmsMonitorDTO> monitorDTOMap = monitorDTOList.stream().collect(
|
||||
Collectors.toMap(PwPmsMonitorDTO::getMonitorId, Function.identity(), (key1, key2) -> key2));
|
||||
//获取最新过滤的监测点id
|
||||
List<String> ids = monitorDTOList.stream().map(PwPmsMonitorDTO::getMonitorId).collect(Collectors.toList());
|
||||
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||
@@ -201,7 +201,7 @@ public class PwRStatOrgServiceImpl extends ServiceImpl<PwRStatOrgMapper, RStatOr
|
||||
if (monitorDTOMap.containsKey(Key)) {
|
||||
//根据监测点信息,进行属性赋值
|
||||
PwPmsMonitorDTO pwPmsMonitorDTO = monitorDTOMap.get(Key);
|
||||
PwRStatOrgVO.PwRStatOrgDetailVO pwRStatOrgVO=new PwRStatOrgVO.PwRStatOrgDetailVO();
|
||||
PwRStatOrgVO.PwRStatOrgDetailVO pwRStatOrgVO = new PwRStatOrgVO.PwRStatOrgDetailVO();
|
||||
pwRStatOrgVO.setMeasurementPointId(pwPmsMonitorDTO.getMonitorId());
|
||||
pwRStatOrgVO.setMeasurementPointName(pwPmsMonitorDTO.getMonitorName());
|
||||
pwRStatOrgVO.setMonitorVoltageName(pwPmsMonitorDTO.getVoltageLevel());
|
||||
@@ -241,15 +241,15 @@ public class PwRStatOrgServiceImpl extends ServiceImpl<PwRStatOrgMapper, RStatOr
|
||||
switch (param.getType().toString()) {
|
||||
case BizParamConstant.STAT_BIZ_YEAR:
|
||||
// 获取年区域暂态指标分类统计表
|
||||
temp = rStatOrgYMapper.getYearRStatHarmonicOrgInfo(param,deptIds, distributionData.getId());
|
||||
temp = rStatOrgYMapper.getYearRStatHarmonicOrgInfo(param, deptIds, distributionData.getId());
|
||||
break;
|
||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||
// 获取季区域暂态指标分类统计表
|
||||
temp = rStatOrgQMapper.getQuarterRStatHarmonicOrgInfo(param,deptIds,distributionData.getId());
|
||||
temp = rStatOrgQMapper.getQuarterRStatHarmonicOrgInfo(param, deptIds, distributionData.getId());
|
||||
break;
|
||||
case BizParamConstant.STAT_BIZ_MONTH:
|
||||
// 获取月区域暂态指标分类统计表
|
||||
temp = rStatOrgMMapper.getMonthRStatHarmonicOrgInfo(param,deptIds,distributionData.getId());
|
||||
temp = rStatOrgMMapper.getMonthRStatHarmonicOrgInfo(param, deptIds, distributionData.getId());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -389,7 +389,7 @@ public class PwRStatOrgServiceImpl extends ServiceImpl<PwRStatOrgMapper, RStatOr
|
||||
|
||||
@Override
|
||||
public List<RMpPartHarmonicDetailVO.PwRMpPartHarmonicDetailDVO> getRMpPartHarmonicDetail(RStatOrgParam.PwRStatOrgParam param) {
|
||||
PwPmsMonitorParam pwPmsMonitorParam=new PwPmsMonitorParam();
|
||||
PwPmsMonitorParam pwPmsMonitorParam = new PwPmsMonitorParam();
|
||||
//部门id
|
||||
pwPmsMonitorParam.setOrgId(param.getId());
|
||||
//电压等级
|
||||
@@ -401,7 +401,7 @@ public class PwRStatOrgServiceImpl extends ServiceImpl<PwRStatOrgMapper, RStatOr
|
||||
//获取配网监测点信息
|
||||
List<PwPmsMonitorDTO> pwPmsMonitorDTOS = pwMonitorClient.getPwMonitorList(pwPmsMonitorParam).getData();
|
||||
Map<String, PwPmsMonitorDTO> pwPmsMonitorDTOMap = pwPmsMonitorDTOS.stream().collect(
|
||||
Collectors.toMap(PwPmsMonitorDTO::getMonitorId,Function.identity(),(key1, key2) -> key2));
|
||||
Collectors.toMap(PwPmsMonitorDTO::getMonitorId, Function.identity(), (key1, key2) -> key2));
|
||||
|
||||
if (CollectionUtil.isNotEmpty(pwPmsMonitorDTOS)) {
|
||||
//获取监测点id
|
||||
@@ -410,8 +410,8 @@ public class PwRStatOrgServiceImpl extends ServiceImpl<PwRStatOrgMapper, RStatOr
|
||||
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||
baseParam.setIds(ids);
|
||||
List<RMpPartHarmonicDetailVO> rMpPartHarmonicDetail = rMpSurplusHarmonicDetailMMapper.getRMpPartHarmonicDetail(baseParam);
|
||||
List<RMpPartHarmonicDetailVO.PwRMpPartHarmonicDetailDVO> newList=BeanUtil.copyToList(
|
||||
rMpPartHarmonicDetail,RMpPartHarmonicDetailVO.PwRMpPartHarmonicDetailDVO.class);
|
||||
List<RMpPartHarmonicDetailVO.PwRMpPartHarmonicDetailDVO> newList = BeanUtil.copyToList(
|
||||
rMpPartHarmonicDetail, RMpPartHarmonicDetailVO.PwRMpPartHarmonicDetailDVO.class);
|
||||
if (CollectionUtil.isNotEmpty(newList)) {
|
||||
//因为只有月表,数据进行查询可能出现重复数据。进行分组
|
||||
Map<String, List<RMpPartHarmonicDetailVO.PwRMpPartHarmonicDetailDVO>> detailVOMap = newList.stream()
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author rui.wu
|
||||
@@ -22,6 +22,7 @@ public interface RStatHarmonicMService extends IService<RStatHarmonicM> {
|
||||
|
||||
/**
|
||||
* 主网查询查询监测点稳态指标 日/月点数
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@@ -29,6 +30,7 @@ public interface RStatHarmonicMService extends IService<RStatHarmonicM> {
|
||||
|
||||
/**
|
||||
* 主网稳态电铁-频率偏差-电压统计图
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@@ -36,6 +38,7 @@ public interface RStatHarmonicMService extends IService<RStatHarmonicM> {
|
||||
|
||||
/**
|
||||
* 主网稳态电铁-频率偏差-越线日期统计图
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@@ -43,6 +46,7 @@ public interface RStatHarmonicMService extends IService<RStatHarmonicM> {
|
||||
|
||||
/**
|
||||
* 配网查询监测点稳态指标(月)
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@@ -50,6 +54,7 @@ public interface RStatHarmonicMService extends IService<RStatHarmonicM> {
|
||||
|
||||
/**
|
||||
* 配网监测点-频率偏差-越线日期统计图
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.njcn.harmonic.service.majornetwork;
|
||||
|
||||
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
||||
import com.njcn.harmonic.pojo.param.OverviewParam;
|
||||
import com.njcn.harmonic.pojo.param.RStatHarmonicMParam;
|
||||
import com.njcn.harmonic.pojo.po.RStatHarmonicOrgM;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.harmonic.pojo.vo.OverviewVO;
|
||||
import com.njcn.harmonic.pojo.vo.RArrayVO;
|
||||
import com.njcn.harmonic.pojo.vo.RIconVO;
|
||||
|
||||
@@ -50,4 +52,13 @@ public interface RStatHarmonicOrgMService extends IService<RStatHarmonicOrgM> {
|
||||
* @return
|
||||
*/
|
||||
List<RIconVO> getPwRStatHarmonicOrgMIcon(RStatHarmonicMParam param);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 分布式光伏概览-稳态指标超标占比
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<OverviewVO.GroupVO> getExcessiveProportion(OverviewParam param);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public interface RStatHarmonicOrgYService extends IService<RStatHarmonicOrgY> {
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<RIconVO> getPwRStatHarmonicOrgYOldIcon(RStatHarmonicMParam param,Integer type);
|
||||
List<RIconVO> getPwRStatHarmonicOrgYOldIcon(RStatHarmonicMParam param, Integer type);
|
||||
|
||||
|
||||
/**
|
||||
@@ -50,7 +50,7 @@ public interface RStatHarmonicOrgYService extends IService<RStatHarmonicOrgY> {
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<RArrayVO> getPwRStatHarmonicYOldAll(StatisticsBizBaseParam param,Integer type);
|
||||
List<RArrayVO> getPwRStatHarmonicYOldAll(StatisticsBizBaseParam param, Integer type);
|
||||
|
||||
/**
|
||||
* 配网查询各单位稳态指标(年 )统计暂不使用
|
||||
@@ -69,5 +69,4 @@ public interface RStatHarmonicOrgYService extends IService<RStatHarmonicOrgY> {
|
||||
List<RIconVO> getPwRStatHarmonicOrgYIcon(RStatHarmonicMParam param);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -9,23 +9,25 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author rui.wu
|
||||
* @author wr
|
||||
* @since 2022-10-12
|
||||
*/
|
||||
public interface RStatHarmonicQService extends IService<RStatHarmonicQ> {
|
||||
|
||||
/**
|
||||
* 主网查询监测点稳态指标(季)
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<RArrayVO> getRStatHarmonicQAll(StatisticsBizBaseParam param);
|
||||
|
||||
/**
|
||||
* 配网查询监测点稳态指标(季)
|
||||
* 配网查询监测点稳态指标(季)
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -9,10 +9,10 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* 配网指标分类概览-监测点分类总览
|
||||
* </p>
|
||||
*
|
||||
* @author rui.wu
|
||||
* @author wr
|
||||
* @since 2022-10-12
|
||||
*/
|
||||
public interface RStatHarmonicYService extends IService<RStatHarmonicY> {
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author rui.wu
|
||||
@@ -19,6 +19,7 @@ public interface RStatLoadTypeService extends IService<RStatLoadTypeM> {
|
||||
|
||||
/**
|
||||
* 区域干扰源电流类指标超标统计
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -19,6 +19,7 @@ public interface RStatOrgMService extends IService<RStatOrgM> {
|
||||
|
||||
/**
|
||||
* 查询区域超标统计-月数据
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -19,6 +19,7 @@ public interface RStatOrgQService extends IService<RStatOrgQ> {
|
||||
|
||||
/**
|
||||
* 查询区域超标统计-季数据
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -80,10 +80,10 @@ public class RStatHarmonicMServiceImpl extends ServiceImpl<RStatHarmonicMMapper,
|
||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
|
||||
StatSubstationBizBaseParam baseParam=BeanUtil.copyProperties(param,StatSubstationBizBaseParam.class);
|
||||
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||
baseParam.setIds(deptIds);
|
||||
//数据库查询
|
||||
List<RStatHarmonicM> list = rStatHarmonicMMapper.selectInfoList(baseParam,mainnetData.getId());
|
||||
List<RStatHarmonicM> list = rStatHarmonicMMapper.selectInfoList(baseParam, mainnetData.getId());
|
||||
|
||||
//初始化指标类型(横向)
|
||||
List<RArrayVO> arrayVOList = new ArrayList<>();
|
||||
@@ -119,7 +119,7 @@ public class RStatHarmonicMServiceImpl extends ServiceImpl<RStatHarmonicMMapper,
|
||||
List<RStatHarmonicMVO> b = new ArrayList<>();
|
||||
b.addAll(rm);
|
||||
for (RStatHarmonicM rStatHarmonicM : value) {
|
||||
if(interferenceMap.containsKey(rStatHarmonicM.getMeasurementTypeClass())){
|
||||
if (interferenceMap.containsKey(rStatHarmonicM.getMeasurementTypeClass())) {
|
||||
RStatHarmonicMVO r = BeanUtil.copyProperties(rStatHarmonicM, RStatHarmonicMVO.class);
|
||||
DictData data1 = interferenceMap.get(rStatHarmonicM.getMeasurementTypeClass());
|
||||
r.setHarmonicName(data1.getName());
|
||||
@@ -196,11 +196,11 @@ public class RStatHarmonicMServiceImpl extends ServiceImpl<RStatHarmonicMMapper,
|
||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
|
||||
StatSubstationBizBaseParam baseParam=BeanUtil.copyProperties(param,StatSubstationBizBaseParam.class);
|
||||
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||
baseParam.setIds(deptIds);
|
||||
//数据库查询
|
||||
List<RStatHarmonicVoltageM> rStatHarmonicVoltageMS = rStatHarmonicVoltageMMapper
|
||||
.selectInfoList(baseParam,mainnetData.getId(), measurementDate.getId(),harmonicDate.getId());
|
||||
.selectInfoList(baseParam, mainnetData.getId(), measurementDate.getId(), harmonicDate.getId());
|
||||
|
||||
//将数据转换为map进行便利
|
||||
Map<String, RStatHarmonicVoltageM> voltageMMap = rStatHarmonicVoltageMS.stream()
|
||||
@@ -283,11 +283,11 @@ public class RStatHarmonicMServiceImpl extends ServiceImpl<RStatHarmonicMMapper,
|
||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
|
||||
StatSubstationBizBaseParam baseParam=BeanUtil.copyProperties(param,StatSubstationBizBaseParam.class);
|
||||
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||
baseParam.setIds(deptIds);
|
||||
//数据库查询
|
||||
List<RStatHarmonicD> rStatHarmonicVoltageMS = rStatHarmonicDMapper
|
||||
.selectInfoList(baseParam,mainnetData.getId(), measurementDate.getId(),harmonicDate.getId());
|
||||
.selectInfoList(baseParam, mainnetData.getId(), measurementDate.getId(), harmonicDate.getId());
|
||||
|
||||
Map<LocalDate, List<RStatHarmonicD>> collect =
|
||||
rStatHarmonicVoltageMS.stream().collect(Collectors.groupingBy(RStatHarmonicD::getDataDate));
|
||||
@@ -349,10 +349,10 @@ public class RStatHarmonicMServiceImpl extends ServiceImpl<RStatHarmonicMMapper,
|
||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
|
||||
StatSubstationBizBaseParam baseParam=BeanUtil.copyProperties(param,StatSubstationBizBaseParam.class);
|
||||
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||
baseParam.setIds(deptIds);
|
||||
//数据库查询
|
||||
List<RStatHarmonicM> list = rStatHarmonicMMapper.selectInfoList(baseParam,distributionData.getId());
|
||||
List<RStatHarmonicM> list = rStatHarmonicMMapper.selectInfoList(baseParam, distributionData.getId());
|
||||
|
||||
//根据稳态指标分组
|
||||
Map<String, List<RStatHarmonicM>> measurementMap = list.stream().collect(Collectors.groupingBy(RStatHarmonicM::getHarmonicType));
|
||||
@@ -368,7 +368,7 @@ public class RStatHarmonicMServiceImpl extends ServiceImpl<RStatHarmonicMMapper,
|
||||
arrayVO.setRowName(data.getName());
|
||||
arrayVO.setSort(data.getSort());
|
||||
for (RStatHarmonicM statHarmonic : value) {
|
||||
if(lineMap.containsKey(statHarmonic.getMeasurementTypeClass())){
|
||||
if (lineMap.containsKey(statHarmonic.getMeasurementTypeClass())) {
|
||||
RStatHarmonicMVO r = BeanUtil.copyProperties(statHarmonic, RStatHarmonicMVO.class);
|
||||
DictData data1 = lineMap.get(statHarmonic.getMeasurementTypeClass());
|
||||
r.setHarmonicName(data1.getName());
|
||||
@@ -445,11 +445,11 @@ public class RStatHarmonicMServiceImpl extends ServiceImpl<RStatHarmonicMMapper,
|
||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
|
||||
StatSubstationBizBaseParam baseParam=BeanUtil.copyProperties(param,StatSubstationBizBaseParam.class);
|
||||
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||
baseParam.setIds(deptIds);
|
||||
//数据库查询
|
||||
List<RStatHarmonicD> rStatHarmonicVoltageMS = rStatHarmonicDMapper
|
||||
.selectInfoList(baseParam,distributionData.getId(), measurementDate.getId(),harmonicDate.getId());
|
||||
.selectInfoList(baseParam, distributionData.getId(), measurementDate.getId(), harmonicDate.getId());
|
||||
|
||||
Map<LocalDate, List<RStatHarmonicD>> collect =
|
||||
rStatHarmonicVoltageMS.stream().collect(Collectors.groupingBy(RStatHarmonicD::getDataDate));
|
||||
|
||||
@@ -2,14 +2,18 @@ package com.njcn.harmonic.service.majornetwork.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
||||
import com.njcn.harmonic.pojo.param.OverviewParam;
|
||||
import com.njcn.harmonic.pojo.param.RStatHarmonicMParam;
|
||||
import com.njcn.harmonic.pojo.po.RStatHarmonicOrgM;
|
||||
import com.njcn.harmonic.mapper.StatHarmonicOrgMMapper;
|
||||
import com.njcn.harmonic.pojo.po.RStatHarmonicOrgQ;
|
||||
import com.njcn.harmonic.pojo.vo.OverviewVO;
|
||||
import com.njcn.harmonic.pojo.vo.RArrayVO;
|
||||
import com.njcn.harmonic.pojo.vo.RIconVO;
|
||||
import com.njcn.harmonic.pojo.vo.RStatHarmonicMVO;
|
||||
@@ -24,8 +28,10 @@ import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.dto.DeptDTO;
|
||||
import com.njcn.web.utils.WebUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.checkerframework.checker.units.qual.K;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.security.Key;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
@@ -51,7 +57,7 @@ public class RStatHarmonicOrgMServiceImpl extends ServiceImpl<StatHarmonicOrgMMa
|
||||
public List<RArrayVO> getRStatHarmonicMAll(StatisticsBizBaseParam param) {
|
||||
//子节点 获取所有得各单位类型
|
||||
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||
List<DeptDTO> deptDTOList = DeptUtil.getDeptSubsetVOList(deptList, param.getId());
|
||||
|
||||
//获取部门id集合
|
||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
@@ -142,7 +148,7 @@ public class RStatHarmonicOrgMServiceImpl extends ServiceImpl<StatHarmonicOrgMMa
|
||||
public List<RIconVO> getRStatHarmonicOrgMIcon(RStatHarmonicMParam param) {
|
||||
//子节点 获取所有得各单位类型
|
||||
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||
List<DeptDTO> deptDTOList = DeptUtil.getDeptSubsetVOList(deptList, param.getId());
|
||||
|
||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
||||
//获取部门id集合
|
||||
@@ -231,7 +237,7 @@ public class RStatHarmonicOrgMServiceImpl extends ServiceImpl<StatHarmonicOrgMMa
|
||||
|
||||
//子节点 获取所有得各单位类型
|
||||
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||
List<DeptDTO> deptDTOList = DeptUtil.getDeptSubsetVOList(deptList, param.getId());
|
||||
|
||||
//获取部门id集合
|
||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
@@ -260,7 +266,7 @@ public class RStatHarmonicOrgMServiceImpl extends ServiceImpl<StatHarmonicOrgMMa
|
||||
arrayVO.setRowName(data.getName());
|
||||
arrayVO.setSort(data.getSort());
|
||||
for (RStatHarmonicOrgM statHarmonic : value) {
|
||||
if(deptMap.containsKey(statHarmonic.getOrgNo())){
|
||||
if (deptMap.containsKey(statHarmonic.getOrgNo())) {
|
||||
RStatHarmonicMVO r = BeanUtil.copyProperties(statHarmonic, RStatHarmonicMVO.class);
|
||||
DeptDTO deptDTO = deptMap.get(statHarmonic.getOrgNo());
|
||||
r.setHarmonicName(deptDTO.getName());
|
||||
@@ -303,8 +309,8 @@ public class RStatHarmonicOrgMServiceImpl extends ServiceImpl<StatHarmonicOrgMMa
|
||||
public List<RIconVO> getPwRStatHarmonicOrgMIcon(RStatHarmonicMParam param) {
|
||||
//各单位类型
|
||||
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||
|
||||
List<DeptDTO> deptDTOList = DeptUtil.getDeptSubsetVOList(deptList, param.getId());
|
||||
|
||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
||||
//获取部门id集合
|
||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
@@ -382,6 +388,81 @@ public class RStatHarmonicOrgMServiceImpl extends ServiceImpl<StatHarmonicOrgMMa
|
||||
return arrayVOList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OverviewVO.GroupVO> getExcessiveProportion(OverviewParam param) {
|
||||
List<OverviewVO.GroupVO> info=new ArrayList<>();
|
||||
//指标类型
|
||||
List<DictData> steadyData = dicDataFeignClient.getDicDataByTypeCode
|
||||
(DicDataTypeEnum.STEADY_STATIS.getCode()).getData();
|
||||
//监测点类型
|
||||
List<DictData> lineData = dicDataFeignClient.getDicDataByTypeCode
|
||||
(DicDataTypeEnum.LINE_SORT.getCode()).getData();
|
||||
|
||||
//获取部门数据
|
||||
List<DeptDTO> deptDTOS = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
if(CollectionUtil.isNotEmpty(deptDTOS)){
|
||||
List<String> collect = deptDTOS.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
//获取配网数据类型
|
||||
DictData data = dicDataFeignClient.getDicDataByCode(DicDataEnum.DISTRIBUTION_POINT.getCode()).getData();
|
||||
List<OverviewVO> overviewVOS = statHarmonicOrgMMapper.selectYoY(param, collect, data.getId());
|
||||
|
||||
Map<String, List<OverviewVO>> overviewVOMap = overviewVOS.stream().collect(
|
||||
Collectors.groupingBy(OverviewVO::getMonitorSort));
|
||||
|
||||
overviewVOMap.forEach((key,value)->{
|
||||
OverviewVO.GroupVO groupVO = new OverviewVO.GroupVO();
|
||||
|
||||
Map<String, List<OverviewVO>> listMap = value.stream().collect(Collectors.groupingBy(OverviewVO::getHarmonicType));
|
||||
List<DictData> notDict = steadyData.stream().filter(r -> !listMap.containsKey(r.getId()))
|
||||
.collect(Collectors.toList());
|
||||
//生成默认值
|
||||
if(CollectionUtil.isNotEmpty(notDict)){
|
||||
groupVO.setMonitorSort(key);
|
||||
OverviewVO overviewVO;
|
||||
for (DictData dictData : notDict) {
|
||||
overviewVO=new OverviewVO();
|
||||
overviewVO.setMonitorSort(key);
|
||||
overviewVO.setHarmonicType(dictData.getId());
|
||||
overviewVO.setSumNum("0");
|
||||
overviewVO.setYtbSumNum("0");
|
||||
overviewVO.setYhbSumNum("0");
|
||||
overviewVO.setSameNum("0");
|
||||
overviewVO.setRingNum("0");
|
||||
value.add(overviewVO);
|
||||
}
|
||||
groupVO.setSubset(value);
|
||||
}
|
||||
info.add(groupVO);
|
||||
});
|
||||
|
||||
List<DictData> notDict = lineData.stream().filter(r -> !overviewVOMap.containsKey(r.getId()))
|
||||
.collect(Collectors.toList());
|
||||
if(CollectionUtil.isNotEmpty(notDict)){
|
||||
OverviewVO.GroupVO overviewVO;
|
||||
OverviewVO vo;
|
||||
for (DictData dictData : notDict) {
|
||||
overviewVO=new OverviewVO.GroupVO();
|
||||
overviewVO.setMonitorSort(dictData.getId());
|
||||
List<OverviewVO> vos=new ArrayList<>();
|
||||
for (DictData lineDatum : steadyData) {
|
||||
vo=new OverviewVO();
|
||||
vo.setMonitorSort(dictData.getId());
|
||||
vo.setHarmonicType(lineDatum.getId());
|
||||
vo.setSumNum("0");
|
||||
vo.setYtbSumNum("0");
|
||||
vo.setYhbSumNum("0");
|
||||
vo.setSameNum("0");
|
||||
vo.setRingNum("0");
|
||||
vos.add(vo);
|
||||
}
|
||||
overviewVO.setSubset(vos);
|
||||
info.add(overviewVO);
|
||||
}
|
||||
}
|
||||
}
|
||||
return info;
|
||||
}
|
||||
|
||||
/**
|
||||
* 便利赋值
|
||||
*
|
||||
|
||||
@@ -56,7 +56,7 @@ public class RStatHarmonicOrgQServiceImpl extends ServiceImpl<StatHarmonicOrgQMa
|
||||
|
||||
//子节点 获取所有得各单位类型
|
||||
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||
List<DeptDTO> deptDTOList = DeptUtil.getDeptSubsetVOList(deptList, param.getId());
|
||||
|
||||
//获取部门id集合
|
||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
@@ -85,7 +85,7 @@ public class RStatHarmonicOrgQServiceImpl extends ServiceImpl<StatHarmonicOrgQMa
|
||||
arrayVO.setRowName(data.getName());
|
||||
arrayVO.setSort(data.getSort());
|
||||
for (RStatHarmonicOrgQ statHarmonic : value) {
|
||||
if(deptMap.containsKey(statHarmonic.getOrgNo())){
|
||||
if (deptMap.containsKey(statHarmonic.getOrgNo())) {
|
||||
RStatHarmonicMVO r = BeanUtil.copyProperties(statHarmonic, RStatHarmonicMVO.class);
|
||||
DeptDTO deptDTO = deptMap.get(statHarmonic.getOrgNo());
|
||||
r.setHarmonicName(deptDTO.getName());
|
||||
@@ -124,7 +124,7 @@ public class RStatHarmonicOrgQServiceImpl extends ServiceImpl<StatHarmonicOrgQMa
|
||||
public List<RIconVO> getRStatHarmonicOrgQIcon(RStatHarmonicMParam param) {
|
||||
//子节点 获取所有得各单位类型
|
||||
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||
List<DeptDTO> deptDTOList = DeptUtil.getDeptSubsetVOList(deptList, param.getId());
|
||||
|
||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
||||
//获取部门id集合
|
||||
@@ -210,7 +210,7 @@ public class RStatHarmonicOrgQServiceImpl extends ServiceImpl<StatHarmonicOrgQMa
|
||||
|
||||
//子节点 获取所有得各单位类型
|
||||
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||
List<DeptDTO> deptDTOList = DeptUtil.getDeptSubsetVOList(deptList, param.getId());
|
||||
|
||||
//获取部门id集合
|
||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
@@ -239,7 +239,7 @@ public class RStatHarmonicOrgQServiceImpl extends ServiceImpl<StatHarmonicOrgQMa
|
||||
arrayVO.setRowName(data.getName());
|
||||
arrayVO.setSort(data.getSort());
|
||||
for (RStatHarmonicOrgQ statHarmonic : value) {
|
||||
if(deptMap.containsKey(statHarmonic.getOrgNo())){
|
||||
if (deptMap.containsKey(statHarmonic.getOrgNo())) {
|
||||
RStatHarmonicMVO r = BeanUtil.copyProperties(statHarmonic, RStatHarmonicMVO.class);
|
||||
DeptDTO deptDTO = deptMap.get(statHarmonic.getOrgNo());
|
||||
r.setHarmonicName(deptDTO.getName());
|
||||
@@ -278,7 +278,7 @@ public class RStatHarmonicOrgQServiceImpl extends ServiceImpl<StatHarmonicOrgQMa
|
||||
public List<RIconVO> getPwRStatHarmonicOrgQIcon(RStatHarmonicMParam param) {
|
||||
//各单位类型
|
||||
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||
List<DeptDTO> deptDTOList = DeptUtil.getDeptSubsetVOList(deptList, param.getId());
|
||||
|
||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
||||
//获取部门id集合
|
||||
|
||||
@@ -34,7 +34,7 @@ import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author rui.wu
|
||||
@@ -73,15 +73,15 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
||||
StatSubstationBizBaseParam baseParam;
|
||||
//初始化指标类型(横向)
|
||||
List<RArrayVO> arrayVOList = new ArrayList<>();
|
||||
List<RStatHarmonicVO> newList=new ArrayList<>();
|
||||
List<RStatHarmonicVO> newList = new ArrayList<>();
|
||||
for (DeptLevelVO deptLevelVO : deptLevelVOList) {
|
||||
//数据库查询
|
||||
baseParam=BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||
baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||
//没有子部门说明就是最底层部门
|
||||
if(CollUtil.isNotEmpty(deptLevelVO.getDeptList())){
|
||||
if (CollUtil.isNotEmpty(deptLevelVO.getDeptList())) {
|
||||
List<String> deptCodeS = deptLevelVO.getDeptList().stream().map(DeptLevelVO::getCode).collect(Collectors.toList());
|
||||
baseParam.setIds(deptCodeS);
|
||||
}else{
|
||||
} else {
|
||||
baseParam.setIds(Arrays.asList(deptLevelVO.getCode()));
|
||||
}
|
||||
//区分 年 季 月
|
||||
@@ -90,15 +90,15 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
||||
switch (string) {
|
||||
//查询各单位累计超标监测点数-年数据
|
||||
case BizParamConstant.STAT_BIZ_YEAR:
|
||||
list = statHarmonicOrgYMapper.selectInfoList(baseParam,steadyDataIds,mainnetData.getId());
|
||||
list = statHarmonicOrgYMapper.selectInfoList(baseParam, steadyDataIds, mainnetData.getId());
|
||||
break;
|
||||
//查询各单位累计超标监测点数-季数据
|
||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||
list = statHarmonicOrgQMapper.selectInfoList(baseParam,steadyDataIds,mainnetData.getId());
|
||||
list = statHarmonicOrgQMapper.selectInfoList(baseParam, steadyDataIds, mainnetData.getId());
|
||||
break;
|
||||
//查询各单位累计超标监测点数-月数据
|
||||
case BizParamConstant.STAT_BIZ_MONTH:
|
||||
list = statHarmonicOrgMMapper.selectInfoList(baseParam,steadyDataIds,mainnetData.getId());
|
||||
list = statHarmonicOrgMMapper.selectInfoList(baseParam, steadyDataIds, mainnetData.getId());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -114,7 +114,7 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
||||
}
|
||||
RStatHarmonicVO org;
|
||||
for (DictData notData : notMeasurementList) {
|
||||
org=new RStatHarmonicVO();
|
||||
org = new RStatHarmonicVO();
|
||||
org.setOrgNo(deptLevelVO.getCode());
|
||||
org.setHarmonicType(notData.getId());
|
||||
org.setOverLimitMeasurementAverage(0);
|
||||
@@ -132,16 +132,16 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
||||
|
||||
//重新生成数据结构
|
||||
harmonicMap.forEach((key, value) -> {
|
||||
if(lineTypeMap.containsKey(key)){
|
||||
RArrayVO arrayVO=new RArrayVO();
|
||||
if (lineTypeMap.containsKey(key)) {
|
||||
RArrayVO arrayVO = new RArrayVO();
|
||||
DictData data = lineTypeMap.get(key);
|
||||
arrayVO.setRowName(data.getName());
|
||||
arrayVO.setSort(data.getSort());
|
||||
List<RStatHarmonicMVO> b=new ArrayList<>();
|
||||
List<RStatHarmonicMVO> b = new ArrayList<>();
|
||||
for (RStatHarmonicVO orgY : value) {
|
||||
RStatHarmonicMVO r = BeanUtil.copyProperties(orgY, RStatHarmonicMVO.class);
|
||||
DeptLevelVO data1 = deptMap.get(orgY.getOrgNo());
|
||||
if (ObjectUtil.isNotNull(data1)){
|
||||
if (ObjectUtil.isNotNull(data1)) {
|
||||
r.setHarmonicName(data1.getName());
|
||||
r.setSort(data1.getSort());
|
||||
r.setOverDay(0);
|
||||
@@ -172,21 +172,21 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
||||
|
||||
DictData harmonicData;
|
||||
//判断是是否传入检测点信息值(电压)
|
||||
if(StrUtil.isBlank(param.getStasisID())&&StrUtil.isBlank(param.getMonitorID())){
|
||||
if (StrUtil.isBlank(param.getStasisID()) && StrUtil.isBlank(param.getMonitorID())) {
|
||||
//指标对象类型
|
||||
List<DictData> indicatorTypeDate = dicDataFeignClient.getDicDataByTypeCode(
|
||||
DicDataTypeEnum.STEADY_STATIS.getCode()).getData();
|
||||
indicatorTypeDate.sort(Comparator.comparing(data -> data.getSort()));
|
||||
harmonicData =indicatorTypeDate.get(0);
|
||||
}else{
|
||||
harmonicData = indicatorTypeDate.get(0);
|
||||
} else {
|
||||
//获取指标对象(频率偏差)
|
||||
harmonicData= dicDataFeignClient.getDicDataById(
|
||||
harmonicData = dicDataFeignClient.getDicDataById(
|
||||
param.getStasisID()).getData();
|
||||
}
|
||||
|
||||
//初始化指标类型(横向)
|
||||
StatSubstationBizBaseParam baseParam;
|
||||
List<RIconVO> arrayVOList=new ArrayList<>();
|
||||
List<RIconVO> arrayVOList = new ArrayList<>();
|
||||
for (DeptLevelVO deptLevelVO : deptLevelVOList) {
|
||||
//数据库查询
|
||||
baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||
@@ -220,13 +220,13 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
||||
RIconVO rIconVO = new RIconVO();
|
||||
rIconVO.setRowName(deptLevelVO.getName());
|
||||
rIconVO.setSort(deptLevelVO.getSort());
|
||||
if(CollUtil.isNotEmpty(list)){
|
||||
if (CollUtil.isNotEmpty(list)) {
|
||||
rIconVO.setOverLimitMeasurementAccrued(list.get(0).getOverLimitMeasurementAccrued());
|
||||
rIconVO.setOverLimitMeasurementAverage(list.get(0).getOverLimitMeasurementAverage());
|
||||
rIconVO.setOverLimitMeasurementRatioAccrued(list.get(0).getOverLimitMeasurementRatioAccrued());
|
||||
rIconVO.setOverLimitMeasurementRatioAverage(list.get(0).getOverLimitMeasurementRatioAverage());
|
||||
rIconVO.setAverageOverDay(list.get(0).getAverageOverDay());
|
||||
}else{
|
||||
} else {
|
||||
rIconVO.setOverLimitMeasurementAverage(0);
|
||||
rIconVO.setOverLimitMeasurementAccrued(0);
|
||||
rIconVO.setOverLimitMeasurementRatioAverage(0.0F);
|
||||
@@ -263,15 +263,15 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
||||
StatSubstationBizBaseParam baseParam;
|
||||
//初始化指标类型(横向)
|
||||
List<RArrayVO> arrayVOList = new ArrayList<>();
|
||||
List<RStatHarmonicVO> newList=new ArrayList<>();
|
||||
List<RStatHarmonicVO> newList = new ArrayList<>();
|
||||
for (DeptLevelVO deptLevelVO : deptLevelVOList) {
|
||||
//数据库查询
|
||||
baseParam=BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||
baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||
//没有子部门说明就是最底层部门
|
||||
if(CollUtil.isNotEmpty(deptLevelVO.getDeptList())){
|
||||
if (CollUtil.isNotEmpty(deptLevelVO.getDeptList())) {
|
||||
List<String> deptCodeS = deptLevelVO.getDeptList().stream().map(DeptLevelVO::getCode).collect(Collectors.toList());
|
||||
baseParam.setIds(deptCodeS);
|
||||
}else{
|
||||
} else {
|
||||
baseParam.setIds(Arrays.asList(deptLevelVO.getCode()));
|
||||
}
|
||||
//区分 年 季 月
|
||||
@@ -280,15 +280,15 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
||||
switch (string) {
|
||||
//查询各单位累计超标监测点数-年数据
|
||||
case BizParamConstant.STAT_BIZ_YEAR:
|
||||
list = statHarmonicOrgYMapper.selectInfoList(baseParam,steadyDataIds,distributionData.getId());
|
||||
list = statHarmonicOrgYMapper.selectInfoList(baseParam, steadyDataIds, distributionData.getId());
|
||||
break;
|
||||
//查询各单位累计超标监测点数-季数据
|
||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||
list = statHarmonicOrgQMapper.selectInfoList(baseParam,steadyDataIds,distributionData.getId());
|
||||
list = statHarmonicOrgQMapper.selectInfoList(baseParam, steadyDataIds, distributionData.getId());
|
||||
break;
|
||||
//查询各单位累计超标监测点数-月数据
|
||||
case BizParamConstant.STAT_BIZ_MONTH:
|
||||
list = statHarmonicOrgMMapper.selectInfoList(baseParam,steadyDataIds,distributionData.getId());
|
||||
list = statHarmonicOrgMMapper.selectInfoList(baseParam, steadyDataIds, distributionData.getId());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -305,7 +305,7 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
||||
}
|
||||
RStatHarmonicVO org;
|
||||
for (DictData notData : notMeasurementList) {
|
||||
org=new RStatHarmonicVO();
|
||||
org = new RStatHarmonicVO();
|
||||
org.setOrgNo(deptLevelVO.getCode());
|
||||
org.setHarmonicType(notData.getId());
|
||||
org.setOverLimitMeasurementAverage(0);
|
||||
@@ -323,16 +323,16 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
||||
|
||||
//重新生成数据结构
|
||||
harmonicMap.forEach((key, value) -> {
|
||||
if(lineTypeMap.containsKey(key)){
|
||||
RArrayVO arrayVO=new RArrayVO();
|
||||
if (lineTypeMap.containsKey(key)) {
|
||||
RArrayVO arrayVO = new RArrayVO();
|
||||
DictData data = lineTypeMap.get(key);
|
||||
arrayVO.setRowName(data.getName());
|
||||
arrayVO.setSort(data.getSort());
|
||||
List<RStatHarmonicMVO> b=new ArrayList<>();
|
||||
List<RStatHarmonicMVO> b = new ArrayList<>();
|
||||
for (RStatHarmonicVO orgY : value) {
|
||||
RStatHarmonicMVO r = BeanUtil.copyProperties(orgY, RStatHarmonicMVO.class);
|
||||
DeptLevelVO data1 = deptMap.get(orgY.getOrgNo());
|
||||
if (ObjectUtil.isNotNull(data1)){
|
||||
if (ObjectUtil.isNotNull(data1)) {
|
||||
r.setHarmonicName(data1.getName());
|
||||
r.setSort(data1.getSort());
|
||||
r.setOverDay(0);
|
||||
@@ -350,7 +350,7 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RArrayVO> getPwRStatHarmonicYOldAll(StatisticsBizBaseParam param,Integer type) {
|
||||
public List<RArrayVO> getPwRStatHarmonicYOldAll(StatisticsBizBaseParam param, Integer type) {
|
||||
//对象主节点 获取所有的稳态类型
|
||||
List<DictData> steadyData = dicDataFeignClient.getDicDataByTypeCode(
|
||||
DicDataTypeEnum.STEADY_STATIS.getCode()).getData();
|
||||
@@ -359,17 +359,17 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
||||
|
||||
//子节点 获取所有得各单位类型
|
||||
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||
List<DeptDTO> deptDTOList = DeptUtil.getDeptSubsetVOList(deptList, param.getId());
|
||||
|
||||
//获取部门id集合
|
||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
||||
|
||||
DictData dictData ;
|
||||
if(type==1){
|
||||
DictData dictData;
|
||||
if (type == 1) {
|
||||
//获取主网信息
|
||||
dictData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
||||
}else{
|
||||
} else {
|
||||
//获取配网信息
|
||||
dictData = dicDataFeignClient.getDicDataByCode(DicDataEnum.DISTRIBUTION_POINT.getCode()).getData();
|
||||
}
|
||||
@@ -395,7 +395,7 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
||||
arrayVO.setRowName(data.getName());
|
||||
arrayVO.setSort(data.getSort());
|
||||
for (RStatHarmonicOrgY statHarmonic : value) {
|
||||
if(deptMap.containsKey(statHarmonic.getOrgNo())){
|
||||
if (deptMap.containsKey(statHarmonic.getOrgNo())) {
|
||||
RStatHarmonicMVO r = BeanUtil.copyProperties(statHarmonic, RStatHarmonicMVO.class);
|
||||
DeptDTO deptDTO = deptMap.get(statHarmonic.getOrgNo());
|
||||
r.setHarmonicName(deptDTO.getName());
|
||||
@@ -443,21 +443,21 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
||||
|
||||
DictData harmonicData;
|
||||
//判断是是否传入检测点信息值(电压)
|
||||
if(StrUtil.isBlank(param.getStasisID())&&StrUtil.isBlank(param.getMonitorID())){
|
||||
if (StrUtil.isBlank(param.getStasisID()) && StrUtil.isBlank(param.getMonitorID())) {
|
||||
//指标对象类型
|
||||
List<DictData> indicatorTypeDate = dicDataFeignClient.getDicDataByTypeCode(
|
||||
DicDataTypeEnum.STEADY_STATIS.getCode()).getData();
|
||||
indicatorTypeDate.sort(Comparator.comparing(data -> data.getSort()));
|
||||
harmonicData =indicatorTypeDate.get(0);
|
||||
}else{
|
||||
harmonicData = indicatorTypeDate.get(0);
|
||||
} else {
|
||||
//获取指标对象(频率偏差)
|
||||
harmonicData= dicDataFeignClient.getDicDataById(
|
||||
harmonicData = dicDataFeignClient.getDicDataById(
|
||||
param.getStasisID()).getData();
|
||||
}
|
||||
|
||||
//初始化指标类型(横向)
|
||||
StatSubstationBizBaseParam baseParam;
|
||||
List<RIconVO> arrayVOList=new ArrayList<>();
|
||||
List<RIconVO> arrayVOList = new ArrayList<>();
|
||||
for (DeptLevelVO deptLevelVO : deptLevelVOList) {
|
||||
//数据库查询
|
||||
baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||
@@ -491,13 +491,13 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
||||
RIconVO rIconVO = new RIconVO();
|
||||
rIconVO.setRowName(deptLevelVO.getName());
|
||||
rIconVO.setSort(deptLevelVO.getSort());
|
||||
if(CollUtil.isNotEmpty(list)){
|
||||
if (CollUtil.isNotEmpty(list)) {
|
||||
rIconVO.setOverLimitMeasurementAccrued(list.get(0).getOverLimitMeasurementAccrued());
|
||||
rIconVO.setOverLimitMeasurementAverage(list.get(0).getOverLimitMeasurementAverage());
|
||||
rIconVO.setOverLimitMeasurementRatioAccrued(list.get(0).getOverLimitMeasurementRatioAccrued());
|
||||
rIconVO.setOverLimitMeasurementRatioAverage(list.get(0).getOverLimitMeasurementRatioAverage());
|
||||
rIconVO.setAverageOverDay(list.get(0).getAverageOverDay());
|
||||
}else{
|
||||
} else {
|
||||
rIconVO.setOverLimitMeasurementAverage(0);
|
||||
rIconVO.setOverLimitMeasurementAccrued(0);
|
||||
rIconVO.setOverLimitMeasurementRatioAverage(0.0F);
|
||||
@@ -512,10 +512,10 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RIconVO> getPwRStatHarmonicOrgYOldIcon(RStatHarmonicMParam param,Integer type) {
|
||||
public List<RIconVO> getPwRStatHarmonicOrgYOldIcon(RStatHarmonicMParam param, Integer type) {
|
||||
//各单位类型
|
||||
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
List<DeptDTO> deptDTOList= DeptUtil.getDeptSubsetVOList(deptList,param.getId());
|
||||
List<DeptDTO> deptDTOList = DeptUtil.getDeptSubsetVOList(deptList, param.getId());
|
||||
|
||||
Map<String, DeptDTO> deptMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, Function.identity()));
|
||||
//获取部门id集合
|
||||
@@ -538,11 +538,11 @@ public class RStatHarmonicOrgYServiceImpl extends ServiceImpl<StatHarmonicOrgYMa
|
||||
Assert.isTrue(
|
||||
CollUtil.isNotEmpty(deptDTOList) || ObjectUtil.isNotNull(harmonicData)
|
||||
, "各单位或者指标类型为空,请检查入参是否准确");
|
||||
DictData dictData ;
|
||||
if(type==1){
|
||||
DictData dictData;
|
||||
if (type == 1) {
|
||||
//获取主网信息
|
||||
dictData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
||||
}else{
|
||||
} else {
|
||||
//获取配网信息
|
||||
dictData = dicDataFeignClient.getDicDataByCode(DicDataEnum.DISTRIBUTION_POINT.getCode()).getData();
|
||||
}
|
||||
|
||||
@@ -60,10 +60,10 @@ public class RStatHarmonicQServiceImpl extends ServiceImpl<RStatHarmonicQMapper,
|
||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
|
||||
StatSubstationBizBaseParam baseParam=BeanUtil.copyProperties(param,StatSubstationBizBaseParam.class);
|
||||
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||
baseParam.setIds(deptIds);
|
||||
//数据库查询
|
||||
List<RStatHarmonicQ> list = rStatHarmonicQMapper.selectInfoList(baseParam,mainnetData.getId());
|
||||
List<RStatHarmonicQ> list = rStatHarmonicQMapper.selectInfoList(baseParam, mainnetData.getId());
|
||||
|
||||
//初始化指标类型(横向)
|
||||
List<RArrayVO> arrayVOList = new ArrayList<>();
|
||||
@@ -100,7 +100,7 @@ public class RStatHarmonicQServiceImpl extends ServiceImpl<RStatHarmonicQMapper,
|
||||
List<RStatHarmonicMVO> b = new ArrayList<>();
|
||||
b.addAll(rm);
|
||||
for (RStatHarmonicQ rStatHarmonicQ : value) {
|
||||
if(interferenceMap.containsKey(rStatHarmonicQ.getMeasurementTypeClass())){
|
||||
if (interferenceMap.containsKey(rStatHarmonicQ.getMeasurementTypeClass())) {
|
||||
RStatHarmonicMVO r = BeanUtil.copyProperties(rStatHarmonicQ, RStatHarmonicMVO.class);
|
||||
DictData data1 = interferenceMap.get(rStatHarmonicQ.getMeasurementTypeClass());
|
||||
r.setHarmonicName(data1.getName());
|
||||
@@ -152,10 +152,10 @@ public class RStatHarmonicQServiceImpl extends ServiceImpl<RStatHarmonicQMapper,
|
||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
|
||||
StatSubstationBizBaseParam baseParam=BeanUtil.copyProperties(param,StatSubstationBizBaseParam.class);
|
||||
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||
baseParam.setIds(deptIds);
|
||||
//数据库查询
|
||||
List<RStatHarmonicQ> list = rStatHarmonicQMapper.selectInfoList(baseParam,distributionData.getId());
|
||||
List<RStatHarmonicQ> list = rStatHarmonicQMapper.selectInfoList(baseParam, distributionData.getId());
|
||||
|
||||
//根据稳态指标分组
|
||||
Map<String, List<RStatHarmonicQ>> measurementMap = list.stream().collect(Collectors.groupingBy(RStatHarmonicQ::getHarmonicType));
|
||||
@@ -171,7 +171,7 @@ public class RStatHarmonicQServiceImpl extends ServiceImpl<RStatHarmonicQMapper,
|
||||
arrayVO.setRowName(data.getName());
|
||||
arrayVO.setSort(data.getSort());
|
||||
for (RStatHarmonicQ statHarmonic : value) {
|
||||
if(lineMap.containsKey(statHarmonic.getMeasurementTypeClass())){
|
||||
if (lineMap.containsKey(statHarmonic.getMeasurementTypeClass())) {
|
||||
RStatHarmonicMVO r = BeanUtil.copyProperties(statHarmonic, RStatHarmonicMVO.class);
|
||||
DictData data1 = lineMap.get(statHarmonic.getMeasurementTypeClass());
|
||||
r.setHarmonicName(data1.getName());
|
||||
|
||||
@@ -16,7 +16,6 @@ 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 com.njcn.web.utils.RequestUtil;
|
||||
import com.njcn.web.utils.WebUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -30,7 +29,7 @@ import java.util.stream.Collectors;
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author rui.wu
|
||||
* @author wr
|
||||
* @since 2022-10-12
|
||||
*/
|
||||
@Service
|
||||
@@ -60,10 +59,10 @@ public class RStatHarmonicYServiceImpl extends ServiceImpl<RStatHarmonicYMapper,
|
||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
|
||||
StatSubstationBizBaseParam baseParam=BeanUtil.copyProperties(param,StatSubstationBizBaseParam.class);
|
||||
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||
baseParam.setIds(deptIds);
|
||||
//数据库查询
|
||||
List<RStatHarmonicY> list = rStatHarmonicYMapper.selectInfoList(baseParam,mainnetData.getId());
|
||||
List<RStatHarmonicY> list = rStatHarmonicYMapper.selectInfoList(baseParam, mainnetData.getId());
|
||||
|
||||
//初始化指标类型(横向)
|
||||
List<RArrayVO> arrayVOList = new ArrayList<>();
|
||||
@@ -102,7 +101,7 @@ public class RStatHarmonicYServiceImpl extends ServiceImpl<RStatHarmonicYMapper,
|
||||
List<RStatHarmonicMVO> b = new ArrayList<>();
|
||||
b.addAll(rm);
|
||||
for (RStatHarmonicY rStatHarmonicY : value) {
|
||||
if(interferenceMap.containsKey(rStatHarmonicY.getMeasurementTypeClass())){
|
||||
if (interferenceMap.containsKey(rStatHarmonicY.getMeasurementTypeClass())) {
|
||||
RStatHarmonicMVO r = BeanUtil.copyProperties(rStatHarmonicY, RStatHarmonicMVO.class);
|
||||
DictData data1 = interferenceMap.get(rStatHarmonicY.getMeasurementTypeClass());
|
||||
r.setHarmonicName(data1.getName());
|
||||
@@ -154,16 +153,16 @@ public class RStatHarmonicYServiceImpl extends ServiceImpl<RStatHarmonicYMapper,
|
||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
|
||||
StatSubstationBizBaseParam baseParam=BeanUtil.copyProperties(param,StatSubstationBizBaseParam.class);
|
||||
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||
baseParam.setIds(deptIds);
|
||||
//数据库查询
|
||||
List<RStatHarmonicY> list = rStatHarmonicYMapper.selectInfoList(baseParam,distributionData.getId());
|
||||
List<RStatHarmonicY> list = rStatHarmonicYMapper.selectInfoList(baseParam, distributionData.getId());
|
||||
|
||||
//根据稳态指标分组
|
||||
Map<String, List<RStatHarmonicY>> measurementMap = list.stream().collect(Collectors.groupingBy(RStatHarmonicY::getHarmonicType));
|
||||
|
||||
//判断对象是否为空
|
||||
if(CollUtil.isNotEmpty(list)){
|
||||
if (CollUtil.isNotEmpty(list)) {
|
||||
//重新生成数据结构
|
||||
measurementMap.forEach((key, value) -> {
|
||||
List<RStatHarmonicMVO> eventVO = new ArrayList<>();
|
||||
@@ -173,7 +172,7 @@ public class RStatHarmonicYServiceImpl extends ServiceImpl<RStatHarmonicYMapper,
|
||||
arrayVO.setRowName(data.getName());
|
||||
arrayVO.setSort(data.getSort());
|
||||
for (RStatHarmonicY statHarmonic : value) {
|
||||
if(lineMap.containsKey(statHarmonic.getMeasurementTypeClass())){
|
||||
if (lineMap.containsKey(statHarmonic.getMeasurementTypeClass())) {
|
||||
RStatHarmonicMVO r = BeanUtil.copyProperties(statHarmonic, RStatHarmonicMVO.class);
|
||||
DictData data1 = lineMap.get(statHarmonic.getMeasurementTypeClass());
|
||||
r.setHarmonicName(data1.getName());
|
||||
|
||||
@@ -82,7 +82,7 @@ public class RStatLoadTypeServiceImpl extends ServiceImpl<RStatLoadTypeMMapper,
|
||||
|
||||
}
|
||||
|
||||
if(CollectionUtil.isNotEmpty(temp)){
|
||||
if (CollectionUtil.isNotEmpty(temp)) {
|
||||
// 匹配单位名称
|
||||
for (DeptDTO dto : data) {
|
||||
for (RStatLoadTypeVO vo : temp) {
|
||||
|
||||
@@ -78,7 +78,7 @@ public class RStatOrgBusbarVoltageServiceImpl extends ServiceImpl<RStatOrgBusbar
|
||||
if (CollectionUtil.isNotEmpty(temp)) {
|
||||
//获取母线集合
|
||||
List<String> busbarIds = temp.stream().map(RStatOrgBusbarVoltageVO::getBusbarId).collect(Collectors.toList());
|
||||
PmsGeneratrixParam generatrixParam=new PmsGeneratrixParam();
|
||||
PmsGeneratrixParam generatrixParam = new PmsGeneratrixParam();
|
||||
generatrixParam.setGeneratrixIds(busbarIds);
|
||||
generatrixParam.setGeneratrixVoltageLevel(param.getIds());
|
||||
List<GeneratrixAndPowerStationDTO> generatrixDTO = pmsGeneratrixClient.getGeneratrixAndPowerStationInfo(generatrixParam).getData();
|
||||
@@ -89,7 +89,7 @@ public class RStatOrgBusbarVoltageServiceImpl extends ServiceImpl<RStatOrgBusbar
|
||||
if (deptMap.containsKey(key)) {
|
||||
DeptDTO deptDTO = deptMap.get(key);
|
||||
value.setOrgName(deptDTO.getName());
|
||||
if(generatrixMap.containsKey(value.getBusbarId())){
|
||||
if (generatrixMap.containsKey(value.getBusbarId())) {
|
||||
GeneratrixAndPowerStationDTO dto = generatrixMap.get(value.getBusbarId());
|
||||
value.setBusbarVoltageLevel(dto.getGeneratrixVoltageLevel());
|
||||
value.setPowerStationName(dto.getPowerName());
|
||||
|
||||
@@ -130,20 +130,20 @@ public class RStatOrgYServiceImpl extends ServiceImpl<RStatOrgYMapper, RStatOrgY
|
||||
switch (param.getType().toString()) {
|
||||
case BizParamConstant.STAT_BIZ_YEAR:
|
||||
// 获取年区域暂态指标分类统计表
|
||||
temp = rStatOrgYMapper.getYearRStatHarmonicOrgInfo(baseParam,deptIds, mainnetData.getId());
|
||||
temp = rStatOrgYMapper.getYearRStatHarmonicOrgInfo(baseParam, deptIds, mainnetData.getId());
|
||||
break;
|
||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||
// 获取季区域暂态指标分类统计表
|
||||
temp = rStatOrgQMapper.getQuarterRStatHarmonicOrgInfo(baseParam,deptIds, mainnetData.getId());
|
||||
temp = rStatOrgQMapper.getQuarterRStatHarmonicOrgInfo(baseParam, deptIds, mainnetData.getId());
|
||||
break;
|
||||
case BizParamConstant.STAT_BIZ_MONTH:
|
||||
// 获取月区域暂态指标分类统计表
|
||||
temp = rStatOrgMMapper.getMonthRStatHarmonicOrgInfo(baseParam,deptIds, mainnetData.getId());
|
||||
temp = rStatOrgMMapper.getMonthRStatHarmonicOrgInfo(baseParam, deptIds, mainnetData.getId());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if(CollUtil.isNotEmpty(temp)){
|
||||
if (CollUtil.isNotEmpty(temp)) {
|
||||
Map<String, List<RStatSubstationOrgVO>> map = temp
|
||||
.stream().collect(Collectors.groupingBy(RStatSubstationOrgVO::getOrgNo));
|
||||
map.forEach((key, value) -> {
|
||||
@@ -305,9 +305,9 @@ public class RStatOrgYServiceImpl extends ServiceImpl<RStatOrgYMapper, RStatOrgY
|
||||
List<String> infoIds = new ArrayList<>();
|
||||
Map<String, PmsMonitorDTO> pmsMonitorDTOMap = pmsMonitorDTOS.stream().filter(
|
||||
v -> {
|
||||
if(infoIds.contains(v.getPowerrId())){
|
||||
if (infoIds.contains(v.getPowerrId())) {
|
||||
return false;
|
||||
}else {
|
||||
} else {
|
||||
infoIds.add(v.getPowerrId());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.njcn.harmonic.service.specialanalysis;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
||||
import com.njcn.harmonic.pojo.param.PowerQualityParam;
|
||||
import com.njcn.harmonic.pojo.vo.RMpPvPowerDetailVO;
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ public interface RMpWpPowerDetailMService extends IService<RMpWpPowerDetailM> {
|
||||
|
||||
/**
|
||||
* 详细数据表分页查询
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@@ -26,6 +27,7 @@ public interface RMpWpPowerDetailMService extends IService<RMpWpPowerDetailM> {
|
||||
|
||||
/**
|
||||
* 电气化铁路分页查询
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -2,11 +2,15 @@ package com.njcn.harmonic.service.specialanalysis;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.harmonic.pojo.param.OverviewParam;
|
||||
import com.njcn.harmonic.pojo.param.PowerQualityParam;
|
||||
import com.njcn.harmonic.pojo.po.RStatOrgPvPowerQualityQPO;
|
||||
import com.njcn.harmonic.pojo.vo.OverviewVO;
|
||||
import com.njcn.harmonic.pojo.vo.RStatOrgPvDetailVO;
|
||||
import com.njcn.harmonic.pojo.vo.RStatOrgPvPowerStreamVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 分布式光伏_台区电能质量明细
|
||||
*
|
||||
@@ -17,6 +21,7 @@ public interface RStatOrgPvPowerQualityService extends IService<RStatOrgPvPowerQ
|
||||
|
||||
/**
|
||||
* 低功率因数统计分页查询
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@@ -24,8 +29,17 @@ public interface RStatOrgPvPowerQualityService extends IService<RStatOrgPvPowerQ
|
||||
|
||||
/**
|
||||
* 详细数据表分页查询
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Page<RStatOrgPvDetailVO> getPowerQualityInfo(PowerQualityParam.PowerQualityDetailInfoParam param);
|
||||
|
||||
|
||||
/**
|
||||
* 分布式光伏概览-电压问题
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<OverviewVO.GroupVO> getVoltage(OverviewParam param);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ import org.springframework.stereotype.Service;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,14 +4,12 @@ import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
||||
import com.njcn.device.pms.api.PwMonitorClient;
|
||||
import com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO;
|
||||
import com.njcn.device.pms.pojo.param.PwPmsMonitorParam;
|
||||
import com.njcn.harmonic.pojo.param.PowerQualityParam;
|
||||
import com.njcn.harmonic.pojo.po.RMpPvPowerDetailMPO;
|
||||
import com.njcn.harmonic.pojo.vo.RMpPvPowerDetailVO;
|
||||
import com.njcn.harmonic.pojo.vo.RMpWpPowerDetailVO;
|
||||
import com.njcn.harmonic.service.specialanalysis.DistributedPvVolOverService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@@ -26,7 +26,6 @@ import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -81,47 +81,47 @@ public class RMpWpPowerDetailMServiceImpl extends ServiceImpl<RMpWpPowerDetailMM
|
||||
//查询区域超标统计-年数据
|
||||
case BizParamConstant.STAT_BIZ_YEAR:
|
||||
Page<RMpWpPowerDetailY> pageY = rMpWpPowerDetailYMapper.selectPage(new Page<>(param.getPageNum(), param.getPageSize())
|
||||
,new LambdaQueryWrapper<RMpWpPowerDetailY>()
|
||||
.in(RMpWpPowerDetailY::getMeasurementPointId,monitorIds)
|
||||
.eq(RMpWpPowerDetailY::getMonitorTag,param.getMonitorTag())
|
||||
, new LambdaQueryWrapper<RMpWpPowerDetailY>()
|
||||
.in(RMpWpPowerDetailY::getMeasurementPointId, monitorIds)
|
||||
.eq(RMpWpPowerDetailY::getMonitorTag, param.getMonitorTag())
|
||||
.ge(StrUtil.isNotBlank(param.getStartTime()), RMpWpPowerDetailY::getDataDate, param.getStartTime())
|
||||
.le(StrUtil.isNotBlank(param.getEndTime()), RMpWpPowerDetailY::getDataDate, param.getEndTime())
|
||||
);
|
||||
List<RMpWpPowerDetailVO> rMpWpPowerDetailVOS = BeanUtil.copyToList(pageY.getRecords(), RMpWpPowerDetailVO.class);
|
||||
page=BeanUtil.copyProperties(pageY,Page.class);
|
||||
page = BeanUtil.copyProperties(pageY, Page.class);
|
||||
page.setRecords(rMpWpPowerDetailVOS);
|
||||
break;
|
||||
//查询区域超标统计-季数据
|
||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||
Page<RMpWpPowerDetailQ> pageList = rMpWpPowerDetailQMapper.selectPage(new Page<>(param.getPageNum(), param.getPageSize())
|
||||
,new LambdaQueryWrapper<RMpWpPowerDetailQ>()
|
||||
.in(RMpWpPowerDetailQ::getMeasurementPointId,monitorIds)
|
||||
.eq(RMpWpPowerDetailQ::getMonitorTag,param.getMonitorTag())
|
||||
, new LambdaQueryWrapper<RMpWpPowerDetailQ>()
|
||||
.in(RMpWpPowerDetailQ::getMeasurementPointId, monitorIds)
|
||||
.eq(RMpWpPowerDetailQ::getMonitorTag, param.getMonitorTag())
|
||||
.ge(StrUtil.isNotBlank(param.getStartTime()), RMpWpPowerDetailQ::getDataDate, param.getStartTime())
|
||||
.le(StrUtil.isNotBlank(param.getEndTime()), RMpWpPowerDetailQ::getDataDate, param.getEndTime())
|
||||
);
|
||||
List<RMpWpPowerDetailVO> rMpWpPowerDetailVOS2 = BeanUtil.copyToList(pageList.getRecords(), RMpWpPowerDetailVO.class);
|
||||
page=BeanUtil.copyProperties(pageList,Page.class);
|
||||
page = BeanUtil.copyProperties(pageList, Page.class);
|
||||
page.setRecords(rMpWpPowerDetailVOS2);
|
||||
break;
|
||||
//查询各区域超标统计-月数据
|
||||
case BizParamConstant.STAT_BIZ_MONTH:
|
||||
Page<RMpWpPowerDetailM> page1= this.page(new Page<>(param.getPageNum(), param.getPageSize())
|
||||
,new LambdaQueryWrapper<RMpWpPowerDetailM>()
|
||||
.in(RMpWpPowerDetailM::getMeasurementPointId,monitorIds)
|
||||
.eq(RMpWpPowerDetailM::getMonitorTag,param.getMonitorTag())
|
||||
Page<RMpWpPowerDetailM> page1 = this.page(new Page<>(param.getPageNum(), param.getPageSize())
|
||||
, new LambdaQueryWrapper<RMpWpPowerDetailM>()
|
||||
.in(RMpWpPowerDetailM::getMeasurementPointId, monitorIds)
|
||||
.eq(RMpWpPowerDetailM::getMonitorTag, param.getMonitorTag())
|
||||
.ge(StrUtil.isNotBlank(param.getStartTime()), RMpWpPowerDetailM::getDataDate, param.getStartTime())
|
||||
.le(StrUtil.isNotBlank(param.getEndTime()), RMpWpPowerDetailM::getDataDate, param.getEndTime())
|
||||
);
|
||||
List<RMpWpPowerDetailVO> rMpWpPowerDetailVOS3 = BeanUtil.copyToList(page1.getRecords(), RMpWpPowerDetailVO.class);
|
||||
page=BeanUtil.copyProperties(page1,Page.class);
|
||||
page = BeanUtil.copyProperties(page1, Page.class);
|
||||
page.setRecords(rMpWpPowerDetailVOS3);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
page.getRecords().stream().forEach(vo->{
|
||||
if(monitorMap.containsKey(vo.getMeasurementPointId())){
|
||||
page.getRecords().stream().forEach(vo -> {
|
||||
if (monitorMap.containsKey(vo.getMeasurementPointId())) {
|
||||
PmsMonitorDTO monitorDTO = monitorMap.get(vo.getMeasurementPointId());
|
||||
vo.setOrgName(monitorDTO.getOrgName());
|
||||
vo.setMeasurementPointName(monitorDTO.getName());
|
||||
@@ -137,7 +137,7 @@ public class RMpWpPowerDetailMServiceImpl extends ServiceImpl<RMpWpPowerDetailMM
|
||||
List<String> deptIds = deptDTOS.stream().map(Dept::getCode).collect(Collectors.toList());
|
||||
|
||||
//根据部门信息,获取牵引站信息
|
||||
PmsTractionStationParam stationParam=new PmsTractionStationParam();
|
||||
PmsTractionStationParam stationParam = new PmsTractionStationParam();
|
||||
stationParam.setOrgIds(deptIds);
|
||||
List<PmsTractionStationDTO> tractionStationDTOS = tractionStationClient.getPmsTractionStationInfo(stationParam).getData();
|
||||
|
||||
@@ -153,18 +153,18 @@ public class RMpWpPowerDetailMServiceImpl extends ServiceImpl<RMpWpPowerDetailMM
|
||||
);
|
||||
|
||||
List<RMpRailwayTractionDetailVO> newList = BeanUtil.copyToList(oldPage.getRecords(), RMpRailwayTractionDetailVO.class);
|
||||
newList.stream().forEach(vo->{
|
||||
if(dtoMap.containsKey(vo.getTractionStationId())){
|
||||
PmsTractionStationDTO dto = dtoMap.get(vo.getTractionStationId());
|
||||
vo.setOrgName(dto.getOrgName());
|
||||
vo.setRailwayType(dto.getRailwayType());
|
||||
vo.setTractionStationName(dto.getName());
|
||||
vo.setRailwayLineName(dto.getRailwayLineName());
|
||||
vo.setVoltageLevel(dto.getVoltageLevel());
|
||||
vo.setRatedCapacity(dto.getRatedCapacity());
|
||||
}
|
||||
newList.stream().forEach(vo -> {
|
||||
if (dtoMap.containsKey(vo.getTractionStationId())) {
|
||||
PmsTractionStationDTO dto = dtoMap.get(vo.getTractionStationId());
|
||||
vo.setOrgName(dto.getOrgName());
|
||||
vo.setRailwayType(dto.getRailwayType());
|
||||
vo.setTractionStationName(dto.getName());
|
||||
vo.setRailwayLineName(dto.getRailwayLineName());
|
||||
vo.setVoltageLevel(dto.getVoltageLevel());
|
||||
vo.setRatedCapacity(dto.getRatedCapacity());
|
||||
}
|
||||
});
|
||||
Page<RMpRailwayTractionDetailVO> page=BeanUtil.copyProperties(oldPage,Page.class);
|
||||
Page<RMpRailwayTractionDetailVO> page = BeanUtil.copyProperties(oldPage, Page.class);
|
||||
page.setRecords(newList);
|
||||
return page;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.lang.Console;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
@@ -12,10 +13,14 @@ import com.njcn.device.pms.api.PwMonitorClient;
|
||||
import com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO;
|
||||
import com.njcn.device.pms.pojo.param.PwPmsMonitorParam;
|
||||
import com.njcn.harmonic.mapper.specialanalysis.*;
|
||||
import com.njcn.harmonic.pojo.param.OverviewParam;
|
||||
import com.njcn.harmonic.pojo.param.PowerQualityParam;
|
||||
import com.njcn.harmonic.pojo.po.RStatOrgPvPowerQualityMPO;
|
||||
import com.njcn.harmonic.pojo.po.RStatOrgPvPowerQualityQPO;
|
||||
import com.njcn.harmonic.pojo.vo.OverviewVO;
|
||||
import com.njcn.harmonic.pojo.vo.RStatOrgPvDetailVO;
|
||||
import com.njcn.harmonic.pojo.vo.RStatOrgPvPowerStreamVO;
|
||||
import com.njcn.harmonic.service.specialanalysis.RStatOrgPvPowerQualityMService;
|
||||
import com.njcn.harmonic.service.specialanalysis.RStatOrgPvPowerQualityService;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.enums.DicDataEnum;
|
||||
@@ -46,42 +51,43 @@ public class RStatOrgPvPowerQualityServiceImpl extends ServiceImpl<RStatOrgPvPow
|
||||
private final DicDataFeignClient dicDataFeignClient;
|
||||
private final DeptFeignClient deptFeignClient;
|
||||
private final PwMonitorClient pwMonitorClient;
|
||||
private final RStatOrgPvPowerQualityMMapper rStatOrgPvPowerQualityMMapper;
|
||||
|
||||
@Override
|
||||
public Page<RStatOrgPvPowerStreamVO> getPowerQualityStream(PowerQualityParam param) {
|
||||
PowerQualityParam.PowerQualityDetailParam bearParam= BeanUtil.copyProperties(param, PowerQualityParam.PowerQualityDetailParam.class);
|
||||
Map<String,String> list=new HashMap<>(3);
|
||||
PowerQualityParam.PowerQualityDetailParam bearParam = BeanUtil.copyProperties(param, PowerQualityParam.PowerQualityDetailParam.class);
|
||||
Map<String, String> list = new HashMap<>(3);
|
||||
List<DictData> dictDataList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.AREA_PQ_EVENT_TYPE.getCode()).getData();
|
||||
if(CollectionUtil.isEmpty(dictDataList)){
|
||||
throw new BusinessException(CommonResponseEnum.NO_DATA, "台区电能质量事件类型为空");
|
||||
if (CollectionUtil.isEmpty(dictDataList)) {
|
||||
throw new BusinessException(CommonResponseEnum.NO_DATA, "台区电能质量事件类型为空");
|
||||
}
|
||||
//获取部门id集合
|
||||
List<Dept> deptDTOS = deptFeignClient.getDirectSonSelf(param.getId()).getData();
|
||||
if(CollectionUtil.isEmpty(deptDTOS)){
|
||||
throw new BusinessException(CommonResponseEnum.NO_DATA, "获取部门信息为空");
|
||||
if (CollectionUtil.isEmpty(deptDTOS)) {
|
||||
throw new BusinessException(CommonResponseEnum.NO_DATA, "获取部门信息为空");
|
||||
}
|
||||
Map<String, Dept> deptDTOMap = deptDTOS.stream().collect
|
||||
(Collectors.toMap(Dept::getCode, Function.identity(), (key, key2) -> key2));
|
||||
List<String> OrgNOS = deptDTOS.stream().map(Dept::getCode).collect(Collectors.toList());
|
||||
//根据字典Code,取出字典id,拼入sql中
|
||||
dictDataList.stream().forEach(dictData ->{
|
||||
if(DicDataEnum.EVENT_TYPE_L.getCode().equals(dictData.getCode())){
|
||||
list.put("eventTypeL",dictData.getId());
|
||||
}
|
||||
if(DicDataEnum.EVENT_TYPE_P.getCode().equals(dictData.getCode())){
|
||||
Console.log(list);
|
||||
list.put("eventTypeP",dictData.getId());
|
||||
}
|
||||
if(DicDataEnum.EVENT_TYPE_O.getCode().equals(dictData.getCode())){
|
||||
list.put("eventTypeO",dictData.getId());
|
||||
}
|
||||
});
|
||||
dictDataList.stream().forEach(dictData -> {
|
||||
if (DicDataEnum.EVENT_TYPE_L.getCode().equals(dictData.getCode())) {
|
||||
list.put("eventTypeL", dictData.getId());
|
||||
}
|
||||
if (DicDataEnum.EVENT_TYPE_P.getCode().equals(dictData.getCode())) {
|
||||
Console.log(list);
|
||||
list.put("eventTypeP", dictData.getId());
|
||||
}
|
||||
if (DicDataEnum.EVENT_TYPE_O.getCode().equals(dictData.getCode())) {
|
||||
list.put("eventTypeO", dictData.getId());
|
||||
}
|
||||
});
|
||||
bearParam.setMapId(list);
|
||||
bearParam.setOrgNos(OrgNOS);
|
||||
//数据分页查询
|
||||
Page<RStatOrgPvPowerStreamVO> page = rStatOrgPvPowerQualityYPOMapper.selectListPage(new Page<>(param.getPageNum(), param.getPageSize()), bearParam);
|
||||
page.getRecords().stream().forEach(vo->{
|
||||
if(deptDTOMap.containsKey(vo.getOrgNo())){
|
||||
page.getRecords().stream().forEach(vo -> {
|
||||
if (deptDTOMap.containsKey(vo.getOrgNo())) {
|
||||
Dept deptDTO = deptDTOMap.get(vo.getOrgNo());
|
||||
vo.setOrgNo(deptDTO.getName());
|
||||
}
|
||||
@@ -98,7 +104,7 @@ public class RStatOrgPvPowerQualityServiceImpl extends ServiceImpl<RStatOrgPvPow
|
||||
//监测点类别
|
||||
pwPmsMonitorParam.setMonitorSort(param.getMonitorSort());
|
||||
//获取监测点信息
|
||||
PowerQualityParam.PowerQualityDetailParam bearParam= BeanUtil.copyProperties(param, PowerQualityParam.PowerQualityDetailParam.class);
|
||||
PowerQualityParam.PowerQualityDetailParam bearParam = BeanUtil.copyProperties(param, PowerQualityParam.PowerQualityDetailParam.class);
|
||||
List<PwPmsMonitorDTO> pwMonitorList = pwMonitorClient.getPwPhotovoltaicMonitorList(pwPmsMonitorParam).getData();
|
||||
if (CollUtil.isEmpty(pwMonitorList)) {
|
||||
return new Page<>();
|
||||
@@ -112,8 +118,8 @@ public class RStatOrgPvPowerQualityServiceImpl extends ServiceImpl<RStatOrgPvPow
|
||||
bearParam.setOrgNos(monitorIds);
|
||||
//数据库分页查询
|
||||
Page<RStatOrgPvDetailVO> page = rStatOrgPvPowerQualityYPOMapper.selectDetailListPage(new Page<>(param.getPageNum(), param.getPageSize()), bearParam);
|
||||
page.getRecords().stream().forEach(vo->{
|
||||
if(monitorMap.containsKey(vo.getMeasurementPointId())){
|
||||
page.getRecords().stream().forEach(vo -> {
|
||||
if (monitorMap.containsKey(vo.getMeasurementPointId())) {
|
||||
PwPmsMonitorDTO monitorDTO = monitorMap.get(vo.getMeasurementPointId());
|
||||
vo.setOrgNo(monitorDTO.getOrgId());
|
||||
vo.setOrgName(monitorDTO.getOrgName());
|
||||
@@ -124,4 +130,58 @@ public class RStatOrgPvPowerQualityServiceImpl extends ServiceImpl<RStatOrgPvPow
|
||||
});
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OverviewVO.GroupVO> getVoltage(OverviewParam param) {
|
||||
List<OverviewVO.GroupVO> vos=new ArrayList<>();
|
||||
//获取部门信息
|
||||
List<DeptDTO> deptDTOS = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
|
||||
if(CollectionUtil.isNotEmpty(deptDTOS)){
|
||||
//获取台区电能质量事件类型
|
||||
List<DictData> areaType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.AREA_PQ_EVENT_TYPE.getCode()).getData();
|
||||
if(CollectionUtil.isNotEmpty(deptDTOS)){
|
||||
List<String> typeID=new ArrayList<>();
|
||||
//取出电压相关的字典
|
||||
for (DictData dictData : areaType) {
|
||||
//电压 电压越上限15%以上
|
||||
if(DicDataEnum.EVENT_TYPE_T.getCode().equals(dictData.getCode())){
|
||||
typeID.add(dictData.getId());
|
||||
}
|
||||
//电压 电压越上限7%-15%
|
||||
if(DicDataEnum.EVENT_TYPE_R.getCode().equals(dictData.getCode())){
|
||||
typeID.add(dictData.getId());
|
||||
}
|
||||
//电压 超标3%-10%
|
||||
if(DicDataEnum.EVENT_TYPE_Z.getCode().equals(dictData.getCode())){
|
||||
typeID.add(dictData.getId());
|
||||
}
|
||||
//电压 超标10%以下
|
||||
if(DicDataEnum.EVENT_TYPE_X.getCode().equals(dictData.getCode())){
|
||||
typeID.add(dictData.getId());
|
||||
}
|
||||
|
||||
}
|
||||
//数据库查询
|
||||
List<String> deptCodes = deptDTOS.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
List<OverviewVO.VoltageVO> voltageVOS = rStatOrgPvPowerQualityMMapper.selectVoltage(deptCodes, typeID);
|
||||
if(CollectionUtil.isNotEmpty(voltageVOS)){
|
||||
Map<String, List<OverviewVO.VoltageVO>> voltageMap = voltageVOS.stream().collect(
|
||||
Collectors.groupingBy(OverviewVO.VoltageVO::getMonitoringObject));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user