1.监测点异常统计报表
This commit is contained in:
@@ -136,6 +136,9 @@ public class AreaLineInfoVO implements Serializable {
|
|||||||
@ApiModelProperty(name = "objId",value = "对象id")
|
@ApiModelProperty(name = "objId",value = "对象id")
|
||||||
private String objId;
|
private String objId;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "powerSubstationName", value = "电网侧变电站")
|
||||||
|
private String powerSubstationName;
|
||||||
|
|
||||||
@ApiModelProperty(name = "vHarmonicValue",value = "污染值")
|
@ApiModelProperty(name = "vHarmonicValue",value = "污染值")
|
||||||
private Double vHarmonicValue;
|
private Double vHarmonicValue;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,194 @@
|
|||||||
|
package com.njcn.device.pq.pojo.vo.dataClean;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @version 1.0.0
|
||||||
|
* @author: chenchao
|
||||||
|
* @date: 2022/07/18 11:04
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@EqualsAndHashCode
|
||||||
|
public class DataVerifyExcel implements Serializable {
|
||||||
|
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "供电公司")
|
||||||
|
@Excel(name = "供电公司")
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "所属变电站")
|
||||||
|
@Excel(name = "所属变电站")
|
||||||
|
private String stationName;
|
||||||
|
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "终端名称")
|
||||||
|
@Excel(name = "终端名称")
|
||||||
|
private String devName;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "监测点名称")
|
||||||
|
@Excel(name = "监测点名称")
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "IP")
|
||||||
|
@Excel(name = "IP")
|
||||||
|
private String ip;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "干扰源类型")
|
||||||
|
@Excel(name = "干扰源类型")
|
||||||
|
private String loadType;
|
||||||
|
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "监测对象名称")
|
||||||
|
@Excel(name = "监测对象名称")
|
||||||
|
private String objName;
|
||||||
|
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "电网侧变电站")
|
||||||
|
@Excel(name = "电网侧变电站")
|
||||||
|
private String powerSubstationName;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "厂商")
|
||||||
|
@Excel(name = "厂商")
|
||||||
|
private String manufacturer;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "总指标异常时间")
|
||||||
|
@Excel(name = "总")
|
||||||
|
private Integer allTime;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "频率")
|
||||||
|
@Excel(name = "频率")
|
||||||
|
private Integer freqTime;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "频率偏差")
|
||||||
|
@Excel(name = "频率偏差")
|
||||||
|
private Integer freqDevTime;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "相电压有效值")
|
||||||
|
@Excel(name = "相电压有效值")
|
||||||
|
private Integer vRmsTime;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "正序电压")
|
||||||
|
@Excel(name = "正序电压")
|
||||||
|
private Integer vPosTime;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "负序电压")
|
||||||
|
@Excel(name = "负序电压")
|
||||||
|
private Integer vNegTime;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "零序电压")
|
||||||
|
@Excel(name = "零序电压")
|
||||||
|
private Integer vZeroTime;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "电压不平衡度")
|
||||||
|
@Excel(name = "电压不平衡度")
|
||||||
|
private Integer vUnbalanceTime;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "线电压有效值")
|
||||||
|
@Excel(name = "线电压有效值")
|
||||||
|
private Integer rmsLvrTime;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "电压正偏差")
|
||||||
|
@Excel(name = "电压正偏差")
|
||||||
|
private Integer vuDevTime;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "电压负偏差")
|
||||||
|
@Excel(name = "电压负偏差")
|
||||||
|
private Integer vlDevTime;
|
||||||
|
|
||||||
|
@ColumnWidth(25)
|
||||||
|
@ExcelProperty(value = "电压总谐波畸变率")
|
||||||
|
@Excel(name = "电压总谐波畸变率")
|
||||||
|
private Integer vThdTime;
|
||||||
|
|
||||||
|
@ColumnWidth(25)
|
||||||
|
@ExcelProperty(value = "相电压基波有效值")
|
||||||
|
@Excel(name = "相电压基波有效值")
|
||||||
|
private Integer vTime;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "电流有效值")
|
||||||
|
@Excel(name = "电流有效值")
|
||||||
|
private Integer iRmsTime;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "长时闪变")
|
||||||
|
@Excel(name = "长时闪变")
|
||||||
|
private Integer pltTime;
|
||||||
|
|
||||||
|
@ColumnWidth(25)
|
||||||
|
@ExcelProperty(value = "间谐波电压含有率")
|
||||||
|
@Excel(name = "间谐波电压含有率")
|
||||||
|
private Integer vInharmTime;
|
||||||
|
|
||||||
|
@ColumnWidth(25)
|
||||||
|
@ExcelProperty(value = "谐波电压含有率")
|
||||||
|
@Excel(name = "谐波电压含有率")
|
||||||
|
private Integer vHarmTime;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "功率因数")
|
||||||
|
@Excel(name = "功率因数")
|
||||||
|
private Integer pfTime;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "谐波电压相角")
|
||||||
|
@Excel(name = "谐波电压相角")
|
||||||
|
private Integer vPhasicTime;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "谐波电压基波相角")
|
||||||
|
@Excel(name = "谐波电压基波相角")
|
||||||
|
private Integer v1PhasicTime;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "电压波动")
|
||||||
|
@Excel(name = "电压波动")
|
||||||
|
private Integer flucTime;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "短时闪变")
|
||||||
|
@Excel(name = "短时闪变")
|
||||||
|
private Integer pstTime;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "电压暂降")
|
||||||
|
@Excel(name = "电压暂降")
|
||||||
|
private Integer dipTime;
|
||||||
|
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "电压暂升")
|
||||||
|
@Excel(name = "电压暂升")
|
||||||
|
private Integer riseTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -16,13 +16,13 @@ import com.njcn.device.pq.service.IPqDataVerifyBakService;
|
|||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -79,7 +79,6 @@ public class DataVerifyController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取稳态告警监测点相关信息
|
* 获取稳态告警监测点相关信息
|
||||||
*/
|
*/
|
||||||
@@ -93,7 +92,6 @@ public class DataVerifyController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取稳态告警数据
|
* 获取稳态告警数据
|
||||||
*/
|
*/
|
||||||
@@ -150,5 +148,16 @@ public class DataVerifyController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@GetMapping("/dataVerifyExcel")
|
||||||
|
@ApiOperation(value = "导出异常监测点列表", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
|
||||||
|
public void dataVerifyExcel(HttpServletResponse response, MonitorBaseParam monitorBaseParam) throws IOException {
|
||||||
|
response.setContentType("application/vnd.ms-excel");
|
||||||
|
response.setCharacterEncoding("utf-8");
|
||||||
|
iPqDataVerifyBakService.dataVerifyExcel(response, monitorBaseParam);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
package com.njcn.device.pq.mapper;
|
package com.njcn.device.pq.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.device.pq.pojo.param.dataClean.MonitorBaseParam;
|
||||||
import com.njcn.device.pq.pojo.po.PqDataVerifyBak;
|
import com.njcn.device.pq.pojo.po.PqDataVerifyBak;
|
||||||
|
import com.njcn.device.pq.pojo.vo.dataClean.DataVerifyExcel;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -13,4 +18,5 @@ import com.njcn.device.pq.pojo.po.PqDataVerifyBak;
|
|||||||
*/
|
*/
|
||||||
public interface PqDataVerifyBakMapper extends BaseMapper<PqDataVerifyBak> {
|
public interface PqDataVerifyBakMapper extends BaseMapper<PqDataVerifyBak> {
|
||||||
|
|
||||||
|
List<DataVerifyExcel> selectDataVerifySum(@Param("param") MonitorBaseParam monitorBaseParam);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
<?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.device.pq.mapper.PqDataVerifyBakMapper">
|
||||||
|
|
||||||
|
<select id="selectDataVerifySum" resultType="com.njcn.device.pq.pojo.vo.dataClean.DataVerifyExcel">
|
||||||
|
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
(select
|
||||||
|
line_id AS lineId,
|
||||||
|
(
|
||||||
|
sum( freq_time ) +
|
||||||
|
sum( freq_Dev_time ) +
|
||||||
|
sum( v_Rms_time )+
|
||||||
|
sum( v_Pos_time ) +
|
||||||
|
sum( v_Neg_time )+
|
||||||
|
sum( v_Zero_time )+
|
||||||
|
sum( v_Unbalance_time )+
|
||||||
|
sum( rms_Lvr_time ) +
|
||||||
|
sum( vu_Dev_time ) +
|
||||||
|
sum( vl_Dev_time ) +
|
||||||
|
sum( v_Thd_time ) +
|
||||||
|
sum( v_time ) +
|
||||||
|
sum( i_Rms_time ) +
|
||||||
|
sum( plt_time ) +
|
||||||
|
sum( v_Inharm_time ) +
|
||||||
|
sum( v_Harm_time )+
|
||||||
|
sum( pf_time ) +
|
||||||
|
sum( v_Phasic_time ) +
|
||||||
|
sum( v1_Phasic_time ) +
|
||||||
|
sum( fluc_time )+
|
||||||
|
sum( pst_time ) +
|
||||||
|
sum( dip_time ) +
|
||||||
|
sum( rise_time )
|
||||||
|
) allTime,
|
||||||
|
sum( freq_time ) AS freqTime,
|
||||||
|
sum( freq_Dev_time ) AS freqDevTime,
|
||||||
|
sum( v_Rms_time ) AS vRmsTime,
|
||||||
|
sum( v_Pos_time ) AS vPosTime,
|
||||||
|
sum( v_Neg_time ) AS vNegTime,
|
||||||
|
sum( v_Zero_time ) AS vZeroTime,
|
||||||
|
sum( v_Unbalance_time ) AS vUnbalanceTime,
|
||||||
|
sum( rms_Lvr_time ) AS rmsLvrTime,
|
||||||
|
sum( vu_Dev_time ) AS vuDevTime,
|
||||||
|
sum( vl_Dev_time ) AS vlDevTime,
|
||||||
|
sum( v_Thd_time ) AS vThdTime,
|
||||||
|
sum( v_time ) AS vTime,
|
||||||
|
sum( i_Rms_time ) AS iRmsTime,
|
||||||
|
sum( plt_time ) AS pltTime,
|
||||||
|
sum( v_Inharm_time ) AS vInharmTime,
|
||||||
|
sum( v_Harm_time ) AS vHarmTime,
|
||||||
|
sum( pf_time ) AS pfTime,
|
||||||
|
sum( v_Phasic_time ) AS vPhasicTime,
|
||||||
|
sum( v1_Phasic_time ) AS v1PhasicTime,
|
||||||
|
sum( fluc_time ) AS flucTime,
|
||||||
|
sum( pst_time ) AS pstTime,
|
||||||
|
sum( dip_time ) AS dipTime,
|
||||||
|
sum( rise_time ) AS riseTime
|
||||||
|
from
|
||||||
|
pq_data_verify_bak
|
||||||
|
<where>
|
||||||
|
state = 1
|
||||||
|
<if test="param.monitorIds != null and param.monitorIds.size > 0">
|
||||||
|
AND line_id IN
|
||||||
|
<foreach collection='param.monitorIds' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="param.searchBeginTime != null and param.searchBeginTime !=''">
|
||||||
|
AND time_id >= #{param.searchBeginTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.searchEndTime != null and param.searchEndTime != ''">
|
||||||
|
AND time_id <= #{param.searchEndTime}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</where>
|
||||||
|
GROUP BY line_id
|
||||||
|
) a
|
||||||
|
WHERE
|
||||||
|
allTime >0
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -7,6 +7,8 @@ import com.njcn.device.pq.pojo.vo.dataClean.DetailAbnormalVO;
|
|||||||
import com.njcn.device.pq.pojo.vo.dataClean.PowerQualityIndicatorsVO;
|
import com.njcn.device.pq.pojo.vo.dataClean.PowerQualityIndicatorsVO;
|
||||||
import com.njcn.device.pq.pojo.vo.dataClean.VerifyMonitorVO;
|
import com.njcn.device.pq.pojo.vo.dataClean.VerifyMonitorVO;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -30,6 +32,6 @@ public interface IPqDataVerifyBakService extends IService<PqDataVerifyBak> {
|
|||||||
DetailAbnormalVO.DetailAbnormalCountVO monitorAbnormalTableDetail(MonitorBaseParam monitorBaseParam);
|
DetailAbnormalVO.DetailAbnormalCountVO monitorAbnormalTableDetail(MonitorBaseParam monitorBaseParam);
|
||||||
|
|
||||||
|
|
||||||
|
void dataVerifyExcel(HttpServletResponse response, MonitorBaseParam monitorBaseParam) throws IOException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import cn.hutool.json.JSONArray;
|
|||||||
import cn.hutool.json.JSONConfig;
|
import cn.hutool.json.JSONConfig;
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import cn.hutool.json.JSONTokener;
|
import cn.hutool.json.JSONTokener;
|
||||||
|
import com.alibaba.excel.EasyExcel;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
@@ -28,19 +29,19 @@ import com.njcn.device.pq.pojo.po.DeptLine;
|
|||||||
import com.njcn.device.pq.pojo.po.PqDataVerifyBak;
|
import com.njcn.device.pq.pojo.po.PqDataVerifyBak;
|
||||||
import com.njcn.device.pq.pojo.vo.AreaLineInfoVO;
|
import com.njcn.device.pq.pojo.vo.AreaLineInfoVO;
|
||||||
import com.njcn.device.pq.pojo.vo.LineDetailDataVO;
|
import com.njcn.device.pq.pojo.vo.LineDetailDataVO;
|
||||||
import com.njcn.device.pq.pojo.vo.dataClean.DetailAbnormalVO;
|
import com.njcn.device.pq.pojo.vo.dataClean.*;
|
||||||
import com.njcn.device.pq.pojo.vo.dataClean.PowerQualityIndicatorsVO;
|
|
||||||
import com.njcn.device.pq.pojo.vo.dataClean.VerifyMonitorVO;
|
|
||||||
import com.njcn.device.pq.pojo.vo.dataClean.VerifyTargetVO;
|
|
||||||
import com.njcn.device.pq.service.CommTerminalService;
|
import com.njcn.device.pq.service.CommTerminalService;
|
||||||
import com.njcn.device.pq.service.IPqDataVerifyBakService;
|
import com.njcn.device.pq.service.IPqDataVerifyBakService;
|
||||||
import com.njcn.oss.utils.FileStorageUtil;
|
import com.njcn.oss.utils.FileStorageUtil;
|
||||||
|
import com.njcn.poi.excel.ExcelUtil;
|
||||||
import com.njcn.supervision.api.UserLedgerFeignClient;
|
import com.njcn.supervision.api.UserLedgerFeignClient;
|
||||||
import com.njcn.system.api.DictTreeFeignClient;
|
import com.njcn.system.api.DictTreeFeignClient;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
@@ -367,6 +368,40 @@ public class PqDataVerifyBakServiceImpl extends ServiceImpl<PqDataVerifyBakMappe
|
|||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dataVerifyExcel(HttpServletResponse response, MonitorBaseParam monitorBaseParam) throws IOException {
|
||||||
|
if (StrUtil.isNotBlank(monitorBaseParam.getDeptId())) {
|
||||||
|
List<String> monitorIds = commTerminalService.getRunMonitorByDept(monitorBaseParam);
|
||||||
|
monitorBaseParam.setMonitorIds(monitorIds);
|
||||||
|
}
|
||||||
|
List<DataVerifyExcel> dataVerifyExcels = this.baseMapper.selectDataVerifySum(monitorBaseParam);
|
||||||
|
List<String> ids = dataVerifyExcels.stream().map(DataVerifyExcel::getLineId).collect(Collectors.toList());
|
||||||
|
List<AreaLineInfoVO> areaLineInfoVOList = lineMapper.getBaseLineAreaInfo(ids, null, null);
|
||||||
|
Map<String, AreaLineInfoVO> map = areaLineInfoVOList.stream().collect(Collectors.toMap(AreaLineInfoVO::getLineId, Function.identity()));
|
||||||
|
for (DataVerifyExcel dataVerifyExcel : dataVerifyExcels) {
|
||||||
|
if (map.containsKey(dataVerifyExcel.getLineId())) {
|
||||||
|
AreaLineInfoVO areaLineInfoVO = map.get(dataVerifyExcel.getLineId());
|
||||||
|
dataVerifyExcel.setCity(areaLineInfoVO.getGdName());
|
||||||
|
dataVerifyExcel.setLineName(areaLineInfoVO.getLineName());
|
||||||
|
dataVerifyExcel.setLoadType(areaLineInfoVO.getLoadType());
|
||||||
|
dataVerifyExcel.setObjName(areaLineInfoVO.getObjName());
|
||||||
|
dataVerifyExcel.setStationName(areaLineInfoVO.getSubName());
|
||||||
|
dataVerifyExcel.setPowerSubstationName(areaLineInfoVO.getPowerSubstationName());
|
||||||
|
dataVerifyExcel.setDevName(areaLineInfoVO.getDeviceName());
|
||||||
|
dataVerifyExcel.setIp(areaLineInfoVO.getIp());
|
||||||
|
dataVerifyExcel.setManufacturer(areaLineInfoVO.getManufacturer());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Set<String> excludeColumnFiledNames = new HashSet<>(1);
|
||||||
|
excludeColumnFiledNames.add("lineId");
|
||||||
|
dataVerifyExcels.sort(Comparator.comparing((DataVerifyExcel item) -> item.getCity() + "_" + item.getStationName()+"_"+item.getDevName())
|
||||||
|
.thenComparing(DataVerifyExcel::getAllTime, Comparator.reverseOrder())
|
||||||
|
);
|
||||||
|
EasyExcel.write(response.getOutputStream(), DataVerifyExcel.class)
|
||||||
|
.excludeColumnFiledNames(excludeColumnFiledNames).sheet("sheet")
|
||||||
|
.doWrite(dataVerifyExcels);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private static final Pattern HARMONIC_PATTERN = Pattern.compile("(\\d+)次谐波");
|
private static final Pattern HARMONIC_PATTERN = Pattern.compile("(\\d+)次谐波");
|
||||||
|
|
||||||
|
|||||||
@@ -571,7 +571,8 @@
|
|||||||
detail.obj_id,
|
detail.obj_id,
|
||||||
detail.big_obj_type,
|
detail.big_obj_type,
|
||||||
detail.small_obj_type,
|
detail.small_obj_type,
|
||||||
detail.Power_Flag powerFlag
|
detail.Power_Flag powerFlag,
|
||||||
|
detail.Power_Substation_Name powerSubstationName
|
||||||
FROM
|
FROM
|
||||||
pq_line line,
|
pq_line line,
|
||||||
pq_line_detail detail,
|
pq_line_detail detail,
|
||||||
|
|||||||
Reference in New Issue
Block a user