1.冀北电网一张图,变电站,终端,监测点接口,添加监测点id信息
This commit is contained in:
@@ -42,7 +42,7 @@ public class AreaInfoController extends BaseController {
|
||||
@PostMapping("/getAreaLineInfo")
|
||||
@ApiOperation("获取监测点区域信息")
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "参数体", required = true)
|
||||
public HttpResult<List<AreaSubLineVO>> getAreaLineInfo(@RequestBody @Validated DeviceInfoParam.BusinessParam deviceInfoParam) {
|
||||
public HttpResult<List<AreaSubLineVO>> getAreaLineInfo(@RequestBody @Validated DeviceInfoParam.GridDiagram deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("getAreaLineInfo");
|
||||
List<AreaSubLineVO> res = areaInfoService.getAreaLineInfo(deviceInfoParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe);
|
||||
|
||||
@@ -20,7 +20,7 @@ public interface AreaInfoService {
|
||||
* @author cdf
|
||||
* @date 2022/6/29
|
||||
*/
|
||||
List<AreaSubLineVO> getAreaLineInfo(DeviceInfoParam.BusinessParam deviceInfoParam);
|
||||
List<AreaSubLineVO> getAreaLineInfo(DeviceInfoParam.GridDiagram deviceInfoParam);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -45,14 +45,30 @@ public class AreaInfoServiceImpl implements AreaInfoService {
|
||||
private final EventDetailService eventDetailService;
|
||||
|
||||
@Override
|
||||
public List<AreaSubLineVO> getAreaLineInfo(DeviceInfoParam.BusinessParam deviceInfoParam) {
|
||||
public List<AreaSubLineVO> getAreaLineInfo(DeviceInfoParam.GridDiagram deviceInfoParam) {
|
||||
List<AreaSubLineVO> resultVOList = new ArrayList<>();
|
||||
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceInfoClient.getPracticalRunDeviceInfo(deviceInfoParam).getData();
|
||||
List<String> lineIds = generalDeviceDTOList.stream().flatMap(dto -> dto.getLineIndexes().stream()).collect(Collectors.toList());
|
||||
List<String> lineIds =new ArrayList<>();
|
||||
if(1==deviceInfoParam.getType()){
|
||||
if(CollectionUtil.isNotEmpty(deviceInfoParam.getCoutList())){
|
||||
lineIds.addAll(deviceInfoParam.getCoutList());
|
||||
}
|
||||
if(CollectionUtil.isNotEmpty(deviceInfoParam.getAlarmList())){
|
||||
lineIds.addAll(deviceInfoParam.getAlarmList());
|
||||
}
|
||||
|
||||
}else{
|
||||
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceInfoClient.getPracticalRunDeviceInfo(deviceInfoParam).getData();
|
||||
lineIds.addAll(generalDeviceDTOList.stream().flatMap(dto -> dto.getLineIndexes().stream()).collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
if (CollectionUtil.isNotEmpty(lineIds)) {
|
||||
List<AreaLineInfoVO> resList = lineFeignClient.getBaseLineAreaInfo(lineIds).getData();
|
||||
if(CollectionUtil.isNotEmpty(deviceInfoParam.getCoutList())){
|
||||
resList.stream().filter(x->deviceInfoParam.getCoutList().contains(x.getLineId())).forEach(x->x.setType(0));
|
||||
}
|
||||
if(CollectionUtil.isNotEmpty(deviceInfoParam.getAlarmList())){
|
||||
resList.stream().filter(x->deviceInfoParam.getAlarmList().contains(x.getLineId())).forEach(x->x.setType(1));
|
||||
}
|
||||
|
||||
//查询监测点未处理暂态事件
|
||||
List<RmpEventDetailPO> eventDetails = eventDetailService.list(new LambdaQueryWrapper<RmpEventDetailPO>()
|
||||
|
||||
Reference in New Issue
Block a user