海南大屏bug修改,暂态事件列表功能新增两个字段
This commit is contained in:
@@ -9,6 +9,7 @@ import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.pms.pojo.param.MonitorTerminalParam;
|
||||
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.po.EventDetailNew;
|
||||
import com.njcn.event.pojo.vo.TransientVO;
|
||||
@@ -100,6 +101,15 @@ public class TransientController extends BaseController {
|
||||
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.pojo.param.MonitorTerminalParam;
|
||||
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.component.WaveFileComponent;
|
||||
import com.njcn.event.file.pojo.enums.WaveFileResponseEnum;
|
||||
import com.njcn.event.mapper.distribution.PwRmpEventDetailMapper;
|
||||
import com.njcn.event.mapper.majornetwork.RmpEventDetailMapper;
|
||||
import com.njcn.event.pojo.param.EventVerifyReasonParam;
|
||||
import com.njcn.event.pojo.po.RmpEventDetailPO;
|
||||
import com.njcn.oss.constant.GeneralConstant;
|
||||
import com.njcn.oss.constant.OssPath;
|
||||
@@ -52,6 +55,7 @@ import java.text.DecimalFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -90,6 +94,10 @@ public class TransientServiceImpl implements TransientService {
|
||||
|
||||
private final FileStorageUtil fileStorageUtil;
|
||||
|
||||
private final DeviceTreeClient deviceTreeClient;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Page<TransientVO> getTransientData(TransientParam transientParam) {
|
||||
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<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)){
|
||||
return new Page<>();
|
||||
}
|
||||
@@ -336,6 +370,7 @@ public class TransientServiceImpl implements TransientService {
|
||||
if (Objects.nonNull(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 = pwRmpEventDetailMapper.selectPage(new Page<>(transientParam.getPageNum(), transientParam.getPageSize()), wrapper);
|
||||
List<EventDetailNew> eventDetailData = BeanUtil.copyToList(pageInfo.getRecords(), EventDetailNew.class);
|
||||
@@ -389,6 +424,15 @@ public class TransientServiceImpl implements TransientService {
|
||||
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) {
|
||||
if (StringUtils.isBlank(searchValue)) {
|
||||
|
||||
@@ -3,6 +3,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.file.pojo.dto.WaveDataDTO;
|
||||
import com.njcn.event.pojo.param.EventVerifyReasonParam;
|
||||
import com.njcn.event.pojo.param.TransientParam;
|
||||
import com.njcn.event.pojo.po.EventDetailNew;
|
||||
import com.njcn.event.pojo.vo.TransientVO;
|
||||
@@ -43,6 +44,5 @@ public interface TransientService {
|
||||
Page<EventDetailNew> getTransientValue(TransientParam transientParam);
|
||||
|
||||
|
||||
|
||||
|
||||
void updateEventReason(EventVerifyReasonParam eventVerifyReasonParam);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user