海南大屏bug修改,暂态事件列表功能新增两个字段
This commit is contained in:
@@ -0,0 +1,23 @@
|
|||||||
|
package com.njcn.event.pojo.param;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/11/21 14:57【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class EventVerifyReasonParam {
|
||||||
|
@ApiModelProperty(value = "暂时事件ID")
|
||||||
|
private String eventId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "暂降核实原因")
|
||||||
|
private String verifyReason;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "暂降核实原因详情")
|
||||||
|
private String verifyReasonDetail;
|
||||||
|
}
|
||||||
@@ -56,6 +56,15 @@ public class TransientParam extends DeviceInfoParam.BusinessParam {
|
|||||||
@ApiModelProperty("暂降类型")
|
@ApiModelProperty("暂降类型")
|
||||||
private List<String> eventType;
|
private List<String> eventType;
|
||||||
|
|
||||||
|
@ApiModelProperty("变电站")
|
||||||
|
private List<String> substationIds;
|
||||||
|
|
||||||
|
@ApiModelProperty("线路")
|
||||||
|
private List<String> lineIds;
|
||||||
|
|
||||||
|
@ApiModelProperty("暂降核实原因")
|
||||||
|
private List<String> verifyReason;
|
||||||
|
|
||||||
@ApiModelProperty("波形文件")
|
@ApiModelProperty("波形文件")
|
||||||
private Integer fileFlag;
|
private Integer fileFlag;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.event.pojo.po;
|
package com.njcn.event.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -109,6 +110,12 @@ public class EventDetailNew {
|
|||||||
@ApiModelProperty(value = "暂时事件ID")
|
@ApiModelProperty(value = "暂时事件ID")
|
||||||
private String eventId;
|
private String eventId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "暂降核实原因")
|
||||||
|
private String verifyReason;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "暂降核实原因详情")
|
||||||
|
private String verifyReasonDetail;
|
||||||
|
|
||||||
|
|
||||||
public String getStartTime() {
|
public String getStartTime() {
|
||||||
return startTime;
|
return startTime;
|
||||||
|
|||||||
@@ -108,6 +108,14 @@ public class RmpEventDetailPO implements Serializable {
|
|||||||
@ApiModelProperty(value = "波形路径")
|
@ApiModelProperty(value = "波形路径")
|
||||||
private String wavePath;
|
private String wavePath;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "暂降核实原因")
|
||||||
|
@TableField("verify_reason")
|
||||||
|
private String verifyReason;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "暂降核实原因详情")
|
||||||
|
@TableField("verify_reason_detail")
|
||||||
|
private String verifyReasonDetail;
|
||||||
|
|
||||||
private Double transientValue;
|
private Double transientValue;
|
||||||
|
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import com.njcn.common.pojo.response.HttpResult;
|
|||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.device.pms.pojo.param.MonitorTerminalParam;
|
import com.njcn.device.pms.pojo.param.MonitorTerminalParam;
|
||||||
import com.njcn.event.file.pojo.dto.WaveDataDTO;
|
import com.njcn.event.file.pojo.dto.WaveDataDTO;
|
||||||
|
import com.njcn.event.pojo.param.EventVerifyReasonParam;
|
||||||
import com.njcn.event.pojo.param.TransientParam;
|
import com.njcn.event.pojo.param.TransientParam;
|
||||||
import com.njcn.event.pojo.po.EventDetailNew;
|
import com.njcn.event.pojo.po.EventDetailNew;
|
||||||
import com.njcn.event.pojo.vo.TransientVO;
|
import com.njcn.event.pojo.vo.TransientVO;
|
||||||
@@ -100,6 +101,15 @@ public class TransientController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.DOWNLOAD)
|
||||||
|
@PostMapping("/updateEventReason")
|
||||||
|
@ApiOperation("更新暂降核实原因")
|
||||||
|
public HttpResult<String> updateEventReason(@RequestBody EventVerifyReasonParam eventVerifyReasonParam) {
|
||||||
|
String methodDescribe = getMethodDescribe("updateEventReason");
|
||||||
|
transientService.updateEventReason(eventVerifyReasonParam);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,11 +13,14 @@ import com.njcn.common.utils.PubUtils;
|
|||||||
import com.njcn.device.pms.api.MonitorClient;
|
import com.njcn.device.pms.api.MonitorClient;
|
||||||
import com.njcn.device.pms.pojo.param.MonitorTerminalParam;
|
import com.njcn.device.pms.pojo.param.MonitorTerminalParam;
|
||||||
import com.njcn.device.pms.pojo.vo.MonitorVO;
|
import com.njcn.device.pms.pojo.vo.MonitorVO;
|
||||||
|
import com.njcn.device.pq.api.DeviceTreeClient;
|
||||||
|
import com.njcn.device.pq.pojo.vo.TerminalTree;
|
||||||
import com.njcn.event.file.pojo.dto.WaveDataDTO;
|
import com.njcn.event.file.pojo.dto.WaveDataDTO;
|
||||||
import com.njcn.event.file.component.WaveFileComponent;
|
import com.njcn.event.file.component.WaveFileComponent;
|
||||||
import com.njcn.event.file.pojo.enums.WaveFileResponseEnum;
|
import com.njcn.event.file.pojo.enums.WaveFileResponseEnum;
|
||||||
import com.njcn.event.mapper.distribution.PwRmpEventDetailMapper;
|
import com.njcn.event.mapper.distribution.PwRmpEventDetailMapper;
|
||||||
import com.njcn.event.mapper.majornetwork.RmpEventDetailMapper;
|
import com.njcn.event.mapper.majornetwork.RmpEventDetailMapper;
|
||||||
|
import com.njcn.event.pojo.param.EventVerifyReasonParam;
|
||||||
import com.njcn.event.pojo.po.RmpEventDetailPO;
|
import com.njcn.event.pojo.po.RmpEventDetailPO;
|
||||||
import com.njcn.oss.constant.GeneralConstant;
|
import com.njcn.oss.constant.GeneralConstant;
|
||||||
import com.njcn.oss.constant.OssPath;
|
import com.njcn.oss.constant.OssPath;
|
||||||
@@ -52,6 +55,7 @@ import java.text.DecimalFormat;
|
|||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -90,6 +94,10 @@ public class TransientServiceImpl implements TransientService {
|
|||||||
|
|
||||||
private final FileStorageUtil fileStorageUtil;
|
private final FileStorageUtil fileStorageUtil;
|
||||||
|
|
||||||
|
private final DeviceTreeClient deviceTreeClient;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<TransientVO> getTransientData(TransientParam transientParam) {
|
public Page<TransientVO> getTransientData(TransientParam transientParam) {
|
||||||
Page<TransientVO> page = new Page<>();
|
Page<TransientVO> page = new Page<>();
|
||||||
@@ -286,6 +294,32 @@ public class TransientServiceImpl implements TransientService {
|
|||||||
}
|
}
|
||||||
// 获取按终端分类的监测点索引集合
|
// 获取按终端分类的监测点索引集合
|
||||||
List<String> lineList = generalDeviceDTOList.stream().flatMap(dto -> dto.getLineIndexes().stream()).collect(Collectors.toList());
|
List<String> lineList = generalDeviceDTOList.stream().flatMap(dto -> dto.getLineIndexes().stream()).collect(Collectors.toList());
|
||||||
|
List<TerminalTree> data = deviceTreeClient.getTerminalTree().getData();
|
||||||
|
if(CollectionUtils.isEmpty(transientParam.getSubstationIds())){
|
||||||
|
List<TerminalTree> collect = data.stream().map(TerminalTree::getChildren).flatMap(Collection::stream)
|
||||||
|
.map(TerminalTree::getChildren).flatMap(Collection::stream)
|
||||||
|
.map(TerminalTree::getChildren).flatMap(Collection::stream)
|
||||||
|
.map(TerminalTree::getChildren).flatMap(Collection::stream)
|
||||||
|
.filter(temp->transientParam.getSubstationIds().contains(temp.getId()))
|
||||||
|
.map(TerminalTree::getChildren).flatMap(Collection::stream)
|
||||||
|
.map(TerminalTree::getChildren).flatMap(Collection::stream)
|
||||||
|
.map(TerminalTree::getChildren).flatMap(Collection::stream)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
lineList.retainAll(collect);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(CollectionUtils.isEmpty(transientParam.getLineIds())){
|
||||||
|
List<TerminalTree> collect1 = data.stream().map(TerminalTree::getChildren).flatMap(Collection::stream)
|
||||||
|
.map(TerminalTree::getChildren).flatMap(Collection::stream)
|
||||||
|
.map(TerminalTree::getChildren).flatMap(Collection::stream)
|
||||||
|
.map(TerminalTree::getChildren).flatMap(Collection::stream)
|
||||||
|
.map(TerminalTree::getChildren).flatMap(Collection::stream)
|
||||||
|
.map(TerminalTree::getChildren).flatMap(Collection::stream)
|
||||||
|
.map(TerminalTree::getChildren).flatMap(Collection::stream)
|
||||||
|
.filter(temp->transientParam.getLineIds().contains(temp.getId()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
lineList.retainAll(collect1);
|
||||||
|
}
|
||||||
if(CollUtil.isEmpty(lineList)){
|
if(CollUtil.isEmpty(lineList)){
|
||||||
return new Page<>();
|
return new Page<>();
|
||||||
}
|
}
|
||||||
@@ -336,6 +370,7 @@ public class TransientServiceImpl implements TransientService {
|
|||||||
if (Objects.nonNull(transientParam.getFileFlag())) {
|
if (Objects.nonNull(transientParam.getFileFlag())) {
|
||||||
wrapper.eq(Objects.nonNull(transientParam.getFileFlag()), RmpEventDetailPO::getFileFlag, transientParam.getFileFlag());
|
wrapper.eq(Objects.nonNull(transientParam.getFileFlag()), RmpEventDetailPO::getFileFlag, transientParam.getFileFlag());
|
||||||
}
|
}
|
||||||
|
wrapper.in(!CollectionUtils.isEmpty(transientParam.getVerifyReason()),RmpEventDetailPO::getVerifyReason,transientParam.getVerifyReason());
|
||||||
// Page<RmpEventDetailPO> pageInfo = eventDetailService.page(new Page<>(transientParam.getPageNum(), transientParam.getPageSize()),wrapper);
|
// Page<RmpEventDetailPO> pageInfo = eventDetailService.page(new Page<>(transientParam.getPageNum(), transientParam.getPageSize()),wrapper);
|
||||||
Page<RmpEventDetailPO> pageInfo = pwRmpEventDetailMapper.selectPage(new Page<>(transientParam.getPageNum(), transientParam.getPageSize()), wrapper);
|
Page<RmpEventDetailPO> pageInfo = pwRmpEventDetailMapper.selectPage(new Page<>(transientParam.getPageNum(), transientParam.getPageSize()), wrapper);
|
||||||
List<EventDetailNew> eventDetailData = BeanUtil.copyToList(pageInfo.getRecords(), EventDetailNew.class);
|
List<EventDetailNew> eventDetailData = BeanUtil.copyToList(pageInfo.getRecords(), EventDetailNew.class);
|
||||||
@@ -389,6 +424,15 @@ public class TransientServiceImpl implements TransientService {
|
|||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateEventReason(EventVerifyReasonParam eventVerifyReasonParam) {
|
||||||
|
eventDetailService.lambdaUpdate()
|
||||||
|
.eq(RmpEventDetailPO::getEventId,eventVerifyReasonParam.getEventId())
|
||||||
|
.set(RmpEventDetailPO::getVerifyReason,eventVerifyReasonParam.getVerifyReason())
|
||||||
|
.set(RmpEventDetailPO::getVerifyReasonDetail,eventVerifyReasonParam.getVerifyReasonDetail())
|
||||||
|
.update();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private boolean filterSearchValue(AreaLineInfoVO item, String searchValue) {
|
private boolean filterSearchValue(AreaLineInfoVO item, String searchValue) {
|
||||||
if (StringUtils.isBlank(searchValue)) {
|
if (StringUtils.isBlank(searchValue)) {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.njcn.event.service.majornetwork;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.njcn.device.pms.pojo.param.MonitorTerminalParam;
|
import com.njcn.device.pms.pojo.param.MonitorTerminalParam;
|
||||||
import com.njcn.event.file.pojo.dto.WaveDataDTO;
|
import com.njcn.event.file.pojo.dto.WaveDataDTO;
|
||||||
|
import com.njcn.event.pojo.param.EventVerifyReasonParam;
|
||||||
import com.njcn.event.pojo.param.TransientParam;
|
import com.njcn.event.pojo.param.TransientParam;
|
||||||
import com.njcn.event.pojo.po.EventDetailNew;
|
import com.njcn.event.pojo.po.EventDetailNew;
|
||||||
import com.njcn.event.pojo.vo.TransientVO;
|
import com.njcn.event.pojo.vo.TransientVO;
|
||||||
@@ -43,6 +44,5 @@ public interface TransientService {
|
|||||||
Page<EventDetailNew> getTransientValue(TransientParam transientParam);
|
Page<EventDetailNew> getTransientValue(TransientParam transientParam);
|
||||||
|
|
||||||
|
|
||||||
|
void updateEventReason(EventVerifyReasonParam eventVerifyReasonParam);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,9 @@ public class RMpVThdVO {
|
|||||||
@ApiModelProperty(value="监测点名称")
|
@ApiModelProperty(value="监测点名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="变电站名称")
|
||||||
|
private String subStationName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 排名类型,字典表(0日,1月,2季,3年)
|
* 排名类型,字典表(0日,1月,2季,3年)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import com.njcn.device.pq.enums.LineBaseEnum;
|
|||||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||||
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
||||||
import com.njcn.device.pq.pojo.vo.LineDetailDataVO;
|
import com.njcn.device.pq.pojo.vo.LineDetailDataVO;
|
||||||
|
import com.njcn.device.pq.pojo.vo.LineDetailVO;
|
||||||
import com.njcn.device.pq.pojo.vo.TerminalOnlineRateDataVO;
|
import com.njcn.device.pq.pojo.vo.TerminalOnlineRateDataVO;
|
||||||
import com.njcn.harmonic.mapper.RMpVThdMapper;
|
import com.njcn.harmonic.mapper.RMpVThdMapper;
|
||||||
import com.njcn.harmonic.mapper.THDistortionMapper;
|
import com.njcn.harmonic.mapper.THDistortionMapper;
|
||||||
@@ -153,8 +154,9 @@ public class THDistortionServiceImpl implements THDistortionService {
|
|||||||
RMpVThdVO rMpVThdVO = new RMpVThdVO();
|
RMpVThdVO rMpVThdVO = new RMpVThdVO();
|
||||||
BeanUtils.copyProperties(rMpVThd, rMpVThdVO);
|
BeanUtils.copyProperties(rMpVThd, rMpVThdVO);
|
||||||
/*查询监测点详情获取名称*/
|
/*查询监测点详情获取名称*/
|
||||||
LineDetailDataVO data = lineFeignClient.getLineDetailData(rMpVThd.getMeasurementPointId()).getData();
|
LineDetailVO data = lineFeignClient.getLineSubGdDetail(rMpVThd.getMeasurementPointId()).getData();
|
||||||
rMpVThdVO.setName(data.getLineName());
|
rMpVThdVO.setName(data.getLineName());
|
||||||
|
rMpVThdVO.setSubStationName(data.getSubName());
|
||||||
return rMpVThdVO;
|
return rMpVThdVO;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,8 @@ public class LargeScreenServiceImpl implements LargeScreenService {
|
|||||||
if (Objects.equals(generalDeviceDTOList.get(i).getIndex(), map.get("id"))) {
|
if (Objects.equals(generalDeviceDTOList.get(i).getIndex(), map.get("id"))) {
|
||||||
HomeostasisAreaVO homeostasisAreaVO = new HomeostasisAreaVO();
|
HomeostasisAreaVO homeostasisAreaVO = new HomeostasisAreaVO();
|
||||||
homeostasisAreaVO.setName(generalDeviceDTOList.get(i).getName());
|
homeostasisAreaVO.setName(generalDeviceDTOList.get(i).getName());
|
||||||
f = Float.parseFloat(map.get("avg").toString()) * 100;
|
//数据库里已经*100了这里去掉*100,见RStatHarmonicOrgM 65行
|
||||||
|
f = Float.parseFloat(map.get("avg").toString());
|
||||||
homeostasisAreaVO.setAvg(String.valueOf(f));
|
homeostasisAreaVO.setAvg(String.valueOf(f));
|
||||||
result.add(homeostasisAreaVO);
|
result.add(homeostasisAreaVO);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.njcn.prepare.harmonic.pojo.mysql;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@@ -149,6 +150,14 @@ public class RMpEventDetailPO {
|
|||||||
@TableField(value = "event_describe")
|
@TableField(value = "event_describe")
|
||||||
private String eventDescribe;
|
private String eventDescribe;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "暂降核实原因")
|
||||||
|
@TableField("verify_reason")
|
||||||
|
private String verifyReason;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "暂降核实原因详情")
|
||||||
|
@TableField("verify_reason_detail")
|
||||||
|
private String verifyReasonDetail;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 波形路径
|
* 波形路径
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user