波形代码提交
This commit is contained in:
@@ -8,6 +8,14 @@ import com.njcn.common.config.GeneralInfo;
|
||||
import com.njcn.common.pojo.enums.common.ServerEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.utils.PubUtils;
|
||||
import com.njcn.device.pms.api.MonitorClient;
|
||||
import com.njcn.device.pms.pojo.param.MonitorTerminalParam;
|
||||
import com.njcn.device.pms.pojo.po.Monitor;
|
||||
import com.njcn.device.pms.pojo.vo.MonitorVO;
|
||||
import com.njcn.event.mapper.majornetwork.RmpEventDetailMapper;
|
||||
import com.njcn.event.pojo.po.RmpEventDetailPO;
|
||||
import com.njcn.event.pojo.vo.RmpEventDetailVO;
|
||||
import com.njcn.event.service.majornetwork.RmpEventDetailService;
|
||||
import com.njcn.oss.constant.GeneralConstant;
|
||||
import com.njcn.oss.constant.OssPath;
|
||||
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
||||
@@ -81,6 +89,9 @@ public class TransientServiceImpl implements TransientService {
|
||||
|
||||
private final WaveUtil waveUtil;
|
||||
|
||||
private final MonitorClient monitorClient;
|
||||
|
||||
private final RmpEventDetailMapper rmpEventDetailMapper;
|
||||
|
||||
@Override
|
||||
public Page<TransientVO> getTransientData(TransientParam transientParam) {
|
||||
@@ -173,15 +184,28 @@ public class TransientServiceImpl implements TransientService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public WaveDataDTO getTransientAnalyseWave(String timeId, String lineId) {
|
||||
public WaveDataDTO getTransientAnalyseWave(MonitorTerminalParam param) {
|
||||
//EventDetail eventDetailByTime = eventDetailService.getEventDetailByTime(lineId, timeId);
|
||||
|
||||
WaveDataDTO waveDataDTO;
|
||||
//原始数据
|
||||
WaveDataDTO originalData;
|
||||
//根据监测点id获取监测点详情
|
||||
LineDetailDataVO lineDetailData = lineFeignClient.getLineDetailData(lineId).getData();
|
||||
EventDetail eventDetailByTime = eventDetailService.getEventDetailByTime(lineId, timeId);
|
||||
String ip = lineDetailData.getIp();
|
||||
String waveName = eventDetailByTime.getWaveName();
|
||||
|
||||
//获取暂降事件
|
||||
RmpEventDetailPO eventDetail = rmpEventDetailMapper.getbyName(param.getId());
|
||||
LineDetailDataVO lineDetailData=new LineDetailDataVO();
|
||||
MonitorVO monitorVO=new MonitorVO();
|
||||
String ip;
|
||||
if(param.getSystemType()==0){
|
||||
lineDetailData = lineFeignClient.getLineDetailData(eventDetail.getMeasurementPointId()).getData();
|
||||
ip=lineDetailData.getIp();
|
||||
}else{
|
||||
param.setId(eventDetail.getMeasurementPointId());
|
||||
monitorVO = monitorClient.getMonitorTerminal(param).getData();
|
||||
ip=monitorVO.getIp();
|
||||
}
|
||||
|
||||
String waveName = eventDetail.getWavePath();
|
||||
String cfgPath, datPath;
|
||||
if (generalInfo.getBusinessFileStorage() == GeneralConstant.LOCAL_DISK) {
|
||||
cfgPath = generalInfo.getBusinessWavePath() + File.separator + ip + File.separator + waveName + GeneralConstant.CFG;
|
||||
@@ -209,14 +233,21 @@ public class TransientServiceImpl implements TransientService {
|
||||
}
|
||||
}
|
||||
waveDataDTO = waveUtil.getValidData(originalData);
|
||||
waveDataDTO.setPtType(PubUtils.ptTypeName(lineDetailData.getPtType()));
|
||||
double pt1 = Double.parseDouble(lineDetailData.getPt().split(StrUtil.SLASH)[0]);
|
||||
double pt2 = Double.parseDouble(lineDetailData.getPt().split(StrUtil.SLASH)[1]);
|
||||
double ct1 = Double.parseDouble(lineDetailData.getCt().split(StrUtil.SLASH)[0]);
|
||||
double ct2 = Double.parseDouble(lineDetailData.getCt().split(StrUtil.SLASH)[1]);
|
||||
waveDataDTO.setPt(pt1 / pt2);
|
||||
waveDataDTO.setCt(ct1 / ct2);
|
||||
if(param.getSystemType()==0){
|
||||
waveDataDTO.setPtType(PubUtils.ptTypeName(lineDetailData.getPtType()));
|
||||
double pt1 = Double.parseDouble(lineDetailData.getPt().split(StrUtil.SLASH)[0]);
|
||||
double pt2 = Double.parseDouble(lineDetailData.getPt().split(StrUtil.SLASH)[1]);
|
||||
double ct1 = Double.parseDouble(lineDetailData.getCt().split(StrUtil.SLASH)[0]);
|
||||
double ct2 = Double.parseDouble(lineDetailData.getCt().split(StrUtil.SLASH)[1]);
|
||||
waveDataDTO.setPt(pt1 / pt2);
|
||||
waveDataDTO.setCt(ct1 / ct2);
|
||||
return waveDataDTO;
|
||||
}
|
||||
waveDataDTO.setPtType(Integer.valueOf(monitorVO.getTerminalWiringMethod()));
|
||||
waveDataDTO.setPt(monitorVO.getPt1() / monitorVO.getPt2());
|
||||
waveDataDTO.setCt(monitorVO.getCt1() / monitorVO.getCt2());
|
||||
return waveDataDTO;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.njcn.event.service.majornetwork;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.device.pms.pojo.param.MonitorTerminalParam;
|
||||
import com.njcn.event.pojo.dto.wave.WaveDataDTO;
|
||||
import com.njcn.event.pojo.param.TransientParam;
|
||||
import com.njcn.event.pojo.param.WaveFileParam;
|
||||
@@ -26,11 +27,10 @@ public interface TransientService {
|
||||
Page<TransientVO> getTransientData(TransientParam transientParam);
|
||||
/**
|
||||
* 功能描述: 暂态事件波形分析
|
||||
* @param timeId
|
||||
* @param lineId
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
WaveDataDTO getTransientAnalyseWave(String timeId, String lineId);
|
||||
WaveDataDTO getTransientAnalyseWave(MonitorTerminalParam param);
|
||||
/**
|
||||
* 功能描述: 暂态事件波形文件下载
|
||||
* @param waveFileParam
|
||||
|
||||
Reference in New Issue
Block a user