解决文件冲突代码

This commit is contained in:
wr
2023-05-16 10:23:07 +08:00
parent 708af80624
commit 7ee067191f
6 changed files with 77 additions and 17 deletions

View File

@@ -32,11 +32,11 @@ public class PmsLedgerStaticDTO implements Serializable {
/**
* 根据单位统计监测点数量
*/
private HashMap<String,List<PmsSimpleDTO>> monitorStatisticsByDept;
private List<List<PmsSimpleDTO.PmsSimpleOrg>> monitorStatisticsByDept;
/**
*根据单位统计终端数量
* 根据单位统计终端数量
*/
private HashMap<String,List<PmsSimpleDTO>> terminalStatisticsByDept;
private List<List<PmsSimpleDTO.PmsSimpleOrg>> terminalStatisticsByDept;
}

View File

@@ -4,7 +4,10 @@ package com.njcn.device.pms.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
import com.njcn.device.pms.pojo.dto.PmsLedgerStaticDTO;
import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam;
import com.njcn.device.pms.pojo.po.SubstationExpend;
import com.njcn.device.pq.pojo.param.CommunicateParam;
import com.njcn.device.pq.pojo.vo.CommunicateVO;
import java.util.List;
import java.util.Map;
@@ -23,5 +26,7 @@ public interface ISubstationExpendService extends IService<SubstationExpend> {
Map<String, List<SubstationExpend>> getSubstationExpendInfo(StatisticsBizBaseParam param);
PmsLedgerStaticDTO getLedgerStatistics(PmsDeviceInfoParam param);
PmsLedgerStaticDTO getLedgerStatistics(StatisticsBizBaseParam param);
List<CommunicateVO.PVCommunicateVO> getCommunicationStatus(CommunicateParam param);
}

View File

@@ -6,6 +6,7 @@ import com.njcn.device.pms.pojo.param.PmsBaseParam;
import com.njcn.device.pms.pojo.param.PmsTerminalParam;
import com.njcn.device.pms.pojo.param.TerminalQueryParam;
import com.njcn.device.pms.pojo.po.PmsTerminal;
import com.njcn.web.pojo.param.BaseParam;
import java.util.List;
@@ -32,7 +33,12 @@ public interface ITerminalService extends IService<PmsTerminal> {
*/
List<PmsTerminal> getTerminalSelectList(PmsBaseParam pmsBaseParam);
/**
* 根据终端id集合新查询终端信息
* @param ids
* @return
*/
List<PmsTerminal> getTerminalSelectByIds(List<String> ids);
/**
* 根据id查询

View File

@@ -1,11 +1,13 @@
package com.njcn.device.pms.service.majornetwork.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.common.pojo.enums.common.DataStateEnum;
import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.device.pms.enums.PmsDeviceResponseEnum;
import com.njcn.device.pms.mapper.majornetwork.StatationStatMapper;
import com.njcn.device.pms.mapper.majornetwork.TerminalMapper;
import com.njcn.device.pms.pojo.param.PmsBaseParam;
import com.njcn.device.pms.pojo.param.PmsTerminalParam;
@@ -23,11 +25,13 @@ import com.njcn.system.api.DicDataFeignClient;
import com.njcn.user.api.DeptFeignClient;
import com.njcn.user.pojo.po.Dept;
import com.njcn.web.factory.PageFactory;
import com.njcn.web.pojo.param.BaseParam;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.List;
import java.util.Objects;
@@ -93,6 +97,14 @@ public class TerminalServiceImpl extends ServiceImpl<TerminalMapper, PmsTerminal
return this.list(lambdaQueryWrapper);
}
@Override
public List<PmsTerminal> getTerminalSelectByIds(List<String> ids) {
return this.list(new LambdaQueryWrapper<PmsTerminal>()
.in(CollUtil.isNotEmpty(ids),PmsTerminal::getId,ids)
.eq(PmsTerminal::getStatus,DataStateEnum.ENABLE.getCode())
);
}
/**
* 根据id查询
* @author hany

View File

@@ -20,9 +20,6 @@ public class Communicate {
private static final long serialVersionUID = 1L;
/**
* 终端Id
*/
/**
* 更新时间
*/
@@ -33,7 +30,11 @@ public class Communicate {
*/
@Column(name = "line_id")
private String id;
/**
* 终端Id
*/
@Column(name = "dev_id")
private String devId;
/**
* 事件类型(0中断1正常2退出)

View File

@@ -438,14 +438,29 @@ public class ReportServiceImpl implements ReportService {
*/
@Override
public Page<DetailVO> getContinueTime(WaveTypeParam waveTypeParam) {
List<String> lineIds =new ArrayList<>();
String eventType="";
List<DetailVO> result = new ArrayList<>();
List<GeneralDeviceDTO> deviceDTOList = generalDeviceInfoClient.getPracticalAllDeviceInfo(waveTypeParam).getData();
List<String> lineIds = deviceDTOList.stream().flatMap(list -> list.getLineIndexes().stream()).collect(Collectors.toList());
if(waveTypeParam.getType()==0){
//pq系统
List<GeneralDeviceDTO> deviceDTOList = generalDeviceInfoClient.getPracticalAllDeviceInfo(waveTypeParam).getData();
lineIds =deviceDTOList.stream().flatMap(list -> list.getLineIndexes().stream()).collect(Collectors.toList());
}else{
//pms系统
PmsDeviceInfoParam param=new PmsDeviceInfoParam();
param.setDeptIndex(waveTypeParam.getDeptIndex());
param.setStatisticalType(waveTypeParam.getStatisticalType());
List<PmsGeneralDeviceDTO> data = pmsGeneralDeviceInfoClient.getPmsDeviceInfoWithInOrg(param).getData();
lineIds =data.stream().flatMap(list -> list.getMonitorIdList().stream()).collect(Collectors.toList());
eventType=dicDataFeignClient.getDicDataByCode(DicDataEnum.VOLTAGE_DIP.getCode()).getData().getId();
}
if (CollectionUtil.isEmpty(lineIds)) {
throw new BusinessException(DeviceResponseEnum.DEPT_LINE_EMPTY);
}
Page<RmpEventDetailPO> pageInfo = eventDetailService.page(new Page<>(waveTypeParam.getPageNum(), waveTypeParam.getPageSize()), new LambdaQueryWrapper<RmpEventDetailPO>()
.in(RmpEventDetailPO::getMeasurementPointId, lineIds)
.eq(StrUtil.isNotBlank(eventType),RmpEventDetailPO::getEventType,eventType)
.ge(StringUtils.isNotBlank(waveTypeParam.getSearchBeginTime()), RmpEventDetailPO::getStartTime,DateUtil.beginOfDay(DateUtil.parse(waveTypeParam.getSearchBeginTime())))
.le(StringUtils.isNotBlank(waveTypeParam.getSearchEndTime()), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(waveTypeParam.getSearchEndTime())))
);
@@ -458,15 +473,36 @@ public class ReportServiceImpl implements ReportService {
result.add(vo);
idlist.add(eventDetail.getLineId());
}
HttpResult<List<AreaLineInfoVO>> AreaInfo = lineFeignClient.getBaseLineAreaInfo(idlist);
List<AreaLineInfoVO> data = AreaInfo.getData();
for (DetailVO detailVO : result) {
for (AreaLineInfoVO vo : data) {
if (vo.getLineId().equals(detailVO.getLineId())) {
BeanUtils.copyProperties(vo, detailVO);
if(waveTypeParam.getType()==0){
//pq系统
HttpResult<List<AreaLineInfoVO>> AreaInfo = lineFeignClient.getBaseLineAreaInfo(idlist);
List<AreaLineInfoVO> data = AreaInfo.getData();
for (DetailVO detailVO : result) {
for (AreaLineInfoVO vo : data) {
if (vo.getLineId().equals(detailVO.getLineId())) {
BeanUtils.copyProperties(vo, detailVO);
}
}
}
}else{
//pms系统
List<Monitor> monitorInfo = monitorClient.getMonitorList(idlist).getData();
for (DetailVO detailVO : result) {
for (Monitor vo : monitorInfo) {
if (vo.getId().equals(detailVO.getLineId())) {
detailVO.setLineId(vo.getId());
detailVO.setLineName(vo.getName());
detailVO.setSubId(vo.getPowerrId());
detailVO.setSubName(vo.getPowerrName());
detailVO.setGdId(vo.getOrgId());
detailVO.setGdName(vo.getOrgName());
detailVO.setVoltageScale(vo.getVoltageLevel());
}
}
}
}
HttpResult<List<DictData>> reason = dicDataFeignClient.getDicDataByTypeName(DicDataTypeEnum.EVENT_TYPE.getName());
List<DictData> type = reason.getData();
for (DetailVO detailVO : result) {