1.pms电能质量综合评估功能兼容
This commit is contained in:
@@ -5,6 +5,7 @@ import com.njcn.common.pojo.response.HttpResult;
|
|||||||
import com.njcn.device.biz.commApi.fallback.CommLineClientFallbackFactory;
|
import com.njcn.device.biz.commApi.fallback.CommLineClientFallbackFactory;
|
||||||
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
||||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||||
|
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@@ -52,4 +53,8 @@ public interface CommLineClient {
|
|||||||
|
|
||||||
@GetMapping("/getLineAllDetailList")
|
@GetMapping("/getLineAllDetailList")
|
||||||
HttpResult<List<LineALLInfoDTO>> getLineAllDetailList(@RequestParam("ids") List<String> ids);
|
HttpResult<List<LineALLInfoDTO>> getLineAllDetailList(@RequestParam("ids") List<String> ids);
|
||||||
|
|
||||||
|
@PostMapping("/getLineInfo")
|
||||||
|
HttpResult<List<PollutionLineDTO>> getLineInfo(@RequestBody List<String> ids);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.njcn.common.pojo.response.HttpResult;
|
|||||||
import com.njcn.device.biz.commApi.CommLineClient;
|
import com.njcn.device.biz.commApi.CommLineClient;
|
||||||
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
||||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||||
|
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||||
import feign.hystrix.FallbackFactory;
|
import feign.hystrix.FallbackFactory;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -56,6 +57,12 @@ public class CommLineClientFallbackFactory implements FallbackFactory<CommLineCl
|
|||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<PollutionLineDTO>> getLineInfo(List<String> ids) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "获取监测点列表信息", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.njcn.device.pq.pojo.dto;
|
package com.njcn.device.biz.pojo.dto;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -8,6 +8,7 @@ import com.njcn.common.utils.HttpResultUtil;
|
|||||||
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
||||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||||
import com.njcn.device.pms.service.majornetwork.IMonitorService;
|
import com.njcn.device.pms.service.majornetwork.IMonitorService;
|
||||||
|
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@@ -58,4 +59,15 @@ public class CommLineController extends BaseController {
|
|||||||
List<LineDTO> result = monitorService.getLineDetailBatch(ids);
|
List<LineDTO> result = monitorService.getLineDetailBatch(ids);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getLineInfo")
|
||||||
|
@ApiOperation("获取监测点信息")
|
||||||
|
public HttpResult<List<PollutionLineDTO>> getLineInfo(@RequestBody List<String> ids) {
|
||||||
|
String methodDescribe = getMethodDescribe("getLineInfo");
|
||||||
|
List<PollutionLineDTO> result = monitorService.getLineInfo(ids);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import com.njcn.common.utils.HttpResultUtil;
|
|||||||
import com.njcn.device.pms.pojo.po.StatationStat;
|
import com.njcn.device.pms.pojo.po.StatationStat;
|
||||||
import com.njcn.device.pms.pojo.vo.StatationStatVO;
|
import com.njcn.device.pms.pojo.vo.StatationStatVO;
|
||||||
import com.njcn.device.pms.service.majornetwork.IStatationStatService;
|
import com.njcn.device.pms.service.majornetwork.IStatationStatService;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionLineDTO;
|
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@@ -19,7 +18,6 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import retrofit2.http.GET;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import com.njcn.device.pms.pojo.vo.MonitorVO;
|
|||||||
import com.njcn.device.pms.pojo.vo.PmsMonitorVO;
|
import com.njcn.device.pms.pojo.vo.PmsMonitorVO;
|
||||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||||
import com.njcn.device.pms.pojo.vo.gw.TypicalSourceOnLine;
|
import com.njcn.device.pms.pojo.vo.gw.TypicalSourceOnLine;
|
||||||
|
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||||
import com.njcn.user.pojo.po.Dept;
|
import com.njcn.user.pojo.po.Dept;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
@@ -222,4 +223,7 @@ public interface IMonitorService extends IService<Monitor> {
|
|||||||
* @Date: 2024/5/27 13:54
|
* @Date: 2024/5/27 13:54
|
||||||
*/
|
*/
|
||||||
Page<TypicalSourceOnLine> monitorTypicalList(TypicalSourceParam param);
|
Page<TypicalSourceOnLine> monitorTypicalList(TypicalSourceParam param);
|
||||||
|
|
||||||
|
|
||||||
|
List<PollutionLineDTO> getLineInfo(List<String> ids);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,10 +9,7 @@ import com.njcn.device.pms.pojo.param.PmsStatationStatInfoParam;
|
|||||||
import com.njcn.device.pms.pojo.param.TerminalQueryParam;
|
import com.njcn.device.pms.pojo.param.TerminalQueryParam;
|
||||||
import com.njcn.device.pms.pojo.po.PmsMidLedger;
|
import com.njcn.device.pms.pojo.po.PmsMidLedger;
|
||||||
import com.njcn.device.pms.pojo.po.StatationStat;
|
import com.njcn.device.pms.pojo.po.StatationStat;
|
||||||
import com.njcn.device.pms.pojo.po.StatationStat;
|
|
||||||
import com.njcn.device.pms.pojo.vo.StatationStatVO;
|
import com.njcn.device.pms.pojo.vo.StatationStatVO;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionLineDTO;
|
|
||||||
import com.njcn.web.pojo.param.BaseParam;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ import com.njcn.device.pms.pojo.vo.PmsMonitorVO;
|
|||||||
import com.njcn.device.pms.pojo.vo.gw.TypicalSourceOnLine;
|
import com.njcn.device.pms.pojo.vo.gw.TypicalSourceOnLine;
|
||||||
import com.njcn.device.pms.service.majornetwork.*;
|
import com.njcn.device.pms.service.majornetwork.*;
|
||||||
import com.njcn.device.pq.pojo.bo.excel.OracleTerminalExcel;
|
import com.njcn.device.pq.pojo.bo.excel.OracleTerminalExcel;
|
||||||
|
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||||
import com.njcn.device.pq.pojo.po.LineBak;
|
import com.njcn.device.pq.pojo.po.LineBak;
|
||||||
import com.njcn.poi.excel.ExcelUtil;
|
import com.njcn.poi.excel.ExcelUtil;
|
||||||
import com.njcn.poi.util.PoiUtil;
|
import com.njcn.poi.util.PoiUtil;
|
||||||
@@ -58,7 +59,6 @@ import com.njcn.system.pojo.po.DictData;
|
|||||||
import com.njcn.user.pojo.dto.DeptDTO;
|
import com.njcn.user.pojo.dto.DeptDTO;
|
||||||
import com.njcn.user.pojo.po.Dept;
|
import com.njcn.user.pojo.po.Dept;
|
||||||
import com.njcn.web.factory.PageFactory;
|
import com.njcn.web.factory.PageFactory;
|
||||||
import com.njcn.web.pojo.dto.PmsPage;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
@@ -891,6 +891,26 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
pmsPage.setRecords(info);
|
pmsPage.setRecords(info);
|
||||||
return pmsPage;
|
return pmsPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PollutionLineDTO> getLineInfo(List<String> ids) {
|
||||||
|
List<PollutionLineDTO> result = new ArrayList<>();
|
||||||
|
LambdaQueryWrapper<Monitor> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.in(Monitor::getId,ids).eq(Monitor::getStatus,DataStateEnum.ENABLE.getCode());
|
||||||
|
List<Monitor> monitors = this.list(lambdaQueryWrapper);
|
||||||
|
monitors.forEach(item->{
|
||||||
|
PollutionLineDTO pollutionLineDTO = new PollutionLineDTO();
|
||||||
|
pollutionLineDTO.setId(item.getId());
|
||||||
|
pollutionLineDTO.setName(item.getName());
|
||||||
|
pollutionLineDTO.setBusBar(item.getLineId());
|
||||||
|
pollutionLineDTO.setSubstationId(item.getPowerrId());
|
||||||
|
pollutionLineDTO.setSubstation(item.getPowerrName());
|
||||||
|
pollutionLineDTO.setPowerCompany(item.getOrgName());
|
||||||
|
result.add(pollutionLineDTO);
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
private String monitorObjectTypeName(String name) {
|
private String monitorObjectTypeName(String name) {
|
||||||
if(StrUtil.isNotBlank(name)){
|
if(StrUtil.isNotBlank(name)){
|
||||||
switch (name) {
|
switch (name) {
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
package com.njcn.device.pq.api;
|
package com.njcn.device.pq.api;
|
||||||
|
|
||||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
|
||||||
import com.njcn.common.pojo.constant.ServerInfo;
|
import com.njcn.common.pojo.constant.ServerInfo;
|
||||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
|
||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||||
import com.njcn.device.pq.api.fallback.LineFeignClientFallbackFactory;
|
import com.njcn.device.pq.api.fallback.LineFeignClientFallbackFactory;
|
||||||
import com.njcn.device.pq.pojo.dto.*;
|
import com.njcn.device.pq.pojo.dto.*;
|
||||||
import com.njcn.device.pq.pojo.param.DataParam;
|
import com.njcn.device.pq.pojo.param.DataParam;
|
||||||
@@ -16,8 +13,6 @@ import com.njcn.device.pq.pojo.po.LineDetail;
|
|||||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||||
import com.njcn.device.pq.pojo.po.line.LineInfoVO;
|
import com.njcn.device.pq.pojo.po.line.LineInfoVO;
|
||||||
import com.njcn.device.pq.pojo.vo.*;
|
import com.njcn.device.pq.pojo.vo.*;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.njcn.device.pq.api.fallback;
|
|||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||||
import com.njcn.device.pq.api.LineFeignClient;
|
import com.njcn.device.pq.api.LineFeignClient;
|
||||||
import com.njcn.device.pq.pojo.dto.*;
|
import com.njcn.device.pq.pojo.dto.*;
|
||||||
import com.njcn.device.pq.pojo.param.DataParam;
|
import com.njcn.device.pq.pojo.param.DataParam;
|
||||||
|
|||||||
@@ -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.common.utils.LogUtil;
|
import com.njcn.common.utils.LogUtil;
|
||||||
import com.njcn.device.biz.enums.DeviceResponseEnum;
|
import com.njcn.device.biz.enums.DeviceResponseEnum;
|
||||||
|
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||||
import com.njcn.device.pq.mapper.DeviceMapper;
|
import com.njcn.device.pq.mapper.DeviceMapper;
|
||||||
import com.njcn.device.pq.mapper.LineDetailMapper;
|
import com.njcn.device.pq.mapper.LineDetailMapper;
|
||||||
@@ -22,7 +23,6 @@ import com.njcn.device.pq.pojo.po.LineDetail;
|
|||||||
import com.njcn.device.pq.pojo.vo.*;
|
import com.njcn.device.pq.pojo.vo.*;
|
||||||
import com.njcn.device.pq.service.LineService;
|
import com.njcn.device.pq.service.LineService;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import com.njcn.web.pojo.param.BaseParam;
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -30,7 +30,6 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import springfox.documentation.annotations.ApiIgnore;
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import cn.hutool.core.date.DateTime;
|
|||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.njcn.common.pojo.dto.SimpleDTO;
|
import com.njcn.common.pojo.dto.SimpleDTO;
|
||||||
import com.njcn.device.biz.pojo.dto.DeptGetChildrenMoreDTO;
|
|
||||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||||
import com.njcn.device.biz.pojo.dto.LineDevGetDTO;
|
import com.njcn.device.biz.pojo.dto.LineDevGetDTO;
|
||||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||||
@@ -14,7 +13,7 @@ import com.njcn.device.pq.pojo.bo.BaseLineInfo;
|
|||||||
import com.njcn.device.pq.pojo.bo.DeviceType;
|
import com.njcn.device.pq.pojo.bo.DeviceType;
|
||||||
import com.njcn.device.pq.pojo.bo.excel.TerminalBaseExcel;
|
import com.njcn.device.pq.pojo.bo.excel.TerminalBaseExcel;
|
||||||
import com.njcn.device.pq.pojo.dto.OverLimitLineDTO;
|
import com.njcn.device.pq.pojo.dto.OverLimitLineDTO;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionLineDTO;
|
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||||
import com.njcn.device.pq.pojo.dto.WarningSubstationDTO;
|
import com.njcn.device.pq.pojo.dto.WarningSubstationDTO;
|
||||||
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
||||||
import com.njcn.device.pq.pojo.param.LineBaseQueryParam;
|
import com.njcn.device.pq.pojo.param.LineBaseQueryParam;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||||
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionLineDTO;
|
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionParamDTO;
|
import com.njcn.device.pq.pojo.dto.PollutionParamDTO;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionSubstationDTO;
|
import com.njcn.device.pq.pojo.dto.PollutionSubstationDTO;
|
||||||
import com.njcn.device.pq.pojo.param.*;
|
import com.njcn.device.pq.pojo.param.*;
|
||||||
@@ -13,7 +13,6 @@ import com.njcn.device.biz.pojo.po.Overlimit;
|
|||||||
import com.njcn.device.pq.pojo.po.LineDetail;
|
import com.njcn.device.pq.pojo.po.LineDetail;
|
||||||
import com.njcn.device.pq.pojo.po.TopMsgPO;
|
import com.njcn.device.pq.pojo.po.TopMsgPO;
|
||||||
import com.njcn.device.pq.pojo.vo.*;
|
import com.njcn.device.pq.pojo.vo.*;
|
||||||
import com.njcn.web.pojo.param.BaseParam;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import com.njcn.device.biz.pojo.po.Overlimit;
|
|||||||
import com.njcn.device.pq.enums.LineBaseEnum;
|
import com.njcn.device.pq.enums.LineBaseEnum;
|
||||||
import com.njcn.device.pq.mapper.*;
|
import com.njcn.device.pq.mapper.*;
|
||||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionLineDTO;
|
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionParamDTO;
|
import com.njcn.device.pq.pojo.dto.PollutionParamDTO;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionSubstationDTO;
|
import com.njcn.device.pq.pojo.dto.PollutionSubstationDTO;
|
||||||
import com.njcn.device.pq.pojo.param.*;
|
import com.njcn.device.pq.pojo.param.*;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
||||||
import com.njcn.device.pq.api.LineFeignClient;
|
import com.njcn.device.pq.api.LineFeignClient;
|
||||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionLineDTO;
|
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionParamDTO;
|
import com.njcn.device.pq.pojo.dto.PollutionParamDTO;
|
||||||
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
||||||
import com.njcn.event.pojo.po.RmpEventDetailPO;
|
import com.njcn.event.pojo.po.RmpEventDetailPO;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
|||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.common.utils.LogUtil;
|
import com.njcn.common.utils.LogUtil;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionLineDTO;
|
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionSubstationDTO;
|
import com.njcn.device.pq.pojo.dto.PollutionSubstationDTO;
|
||||||
import com.njcn.harmonic.pojo.param.HarmonicPublicParam;
|
import com.njcn.harmonic.pojo.param.HarmonicPublicParam;
|
||||||
import com.njcn.harmonic.pojo.param.PollutionSubstationQuryParam;
|
import com.njcn.harmonic.pojo.param.PollutionSubstationQuryParam;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
|||||||
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionLineDTO;
|
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||||
import com.njcn.harmonic.pojo.param.PVOverviewParam;
|
import com.njcn.harmonic.pojo.param.PVOverviewParam;
|
||||||
import com.njcn.harmonic.service.majornetwork.PVOverviewService;
|
import com.njcn.harmonic.service.majornetwork.PVOverviewService;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
|
|||||||
@@ -24,7 +24,8 @@
|
|||||||
data_v
|
data_v
|
||||||
<where>
|
<where>
|
||||||
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
|
timeId between to_date(#{param.startTime},'yyyy-mm-DD hh24:mi:ss') and to_date(#{param.endTime},'yyyy-mm-DD hh24:mi:ss')
|
||||||
and phasic_type!='T'
|
and pha
|
||||||
|
sic_type!='T'
|
||||||
and lineid = #{param.lineId}
|
and lineid = #{param.lineId}
|
||||||
group by timeid,PHASIC_TYPE
|
group by timeid,PHASIC_TYPE
|
||||||
order by timeId asc
|
order by timeId asc
|
||||||
|
|||||||
@@ -3,10 +3,9 @@ package com.njcn.harmonic.service;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionGridDiagramDTO;
|
import com.njcn.device.pq.pojo.dto.PollutionGridDiagramDTO;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionLineDTO;
|
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionSubstationDTO;
|
import com.njcn.device.pq.pojo.dto.PollutionSubstationDTO;
|
||||||
import com.njcn.device.pq.pojo.param.GridDiagramParam;
|
import com.njcn.device.pq.pojo.param.GridDiagramParam;
|
||||||
import com.njcn.device.pq.pojo.param.RunManageParam;
|
|
||||||
import com.njcn.device.pq.pojo.vo.GridDiagramVO;
|
import com.njcn.device.pq.pojo.vo.GridDiagramVO;
|
||||||
import com.njcn.harmonic.pojo.param.HarmonicPublicParam;
|
import com.njcn.harmonic.pojo.param.HarmonicPublicParam;
|
||||||
import com.njcn.harmonic.pojo.param.PollutionSubstationQuryParam;
|
import com.njcn.harmonic.pojo.param.PollutionSubstationQuryParam;
|
||||||
@@ -15,7 +14,6 @@ import com.njcn.harmonic.pojo.po.RStatPollutionSubstationM;
|
|||||||
import com.njcn.harmonic.pojo.vo.PollutionSubstationVO;
|
import com.njcn.harmonic.pojo.vo.PollutionSubstationVO;
|
||||||
import com.njcn.harmonic.pojo.vo.PollutionVO;
|
import com.njcn.harmonic.pojo.vo.PollutionVO;
|
||||||
import com.njcn.harmonic.pojo.vo.SubstationVo;
|
import com.njcn.harmonic.pojo.vo.SubstationVo;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
/**
|
/**
|
||||||
@@ -58,7 +56,7 @@ public interface PollutionSubstationService extends IService<RStatPollutionSubst
|
|||||||
/**
|
/**
|
||||||
* @Description: getLineInfoById
|
* @Description: getLineInfoById
|
||||||
* @Param: [param]
|
* @Param: [param]
|
||||||
* @return: java.util.List<com.njcn.device.pq.pojo.dto.PollutionLineDTO>
|
* @return: java.util.List<com.njcn.device.biz.pojo.dto.PollutionLineDTO>
|
||||||
* @Author: clam
|
* @Author: clam
|
||||||
* @Date: 2022/11/3
|
* @Date: 2022/11/3
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,12 +1,19 @@
|
|||||||
package com.njcn.harmonic.service.impl;
|
package com.njcn.harmonic.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.common.pojo.dto.SimpleDTO;
|
||||||
|
import com.njcn.device.biz.commApi.CommLineClient;
|
||||||
|
import com.njcn.device.biz.commApi.CommTerminalGeneralClient;
|
||||||
|
import com.njcn.device.pms.api.PmsGeneralDeviceInfoClient;
|
||||||
|
import com.njcn.device.pms.pojo.dto.PmsGeneralDeviceDTO;
|
||||||
|
import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam;
|
||||||
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
||||||
import com.njcn.device.pq.api.LineFeignClient;
|
import com.njcn.device.pq.api.LineFeignClient;
|
||||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionLineDTO;
|
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionParamDTO;
|
import com.njcn.device.pq.pojo.dto.PollutionParamDTO;
|
||||||
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
||||||
import com.njcn.harmonic.mapper.RStatComassesDMapper;
|
import com.njcn.harmonic.mapper.RStatComassesDMapper;
|
||||||
@@ -16,6 +23,10 @@ import com.njcn.harmonic.pojo.po.day.RStatComassesDPO;
|
|||||||
import com.njcn.harmonic.pojo.vo.ComAssessVO;
|
import com.njcn.harmonic.pojo.vo.ComAssessVO;
|
||||||
import com.njcn.harmonic.service.ComAssessService;
|
import com.njcn.harmonic.service.ComAssessService;
|
||||||
import com.njcn.harmonic.utils.HarmonicComAssesUtil;
|
import com.njcn.harmonic.utils.HarmonicComAssesUtil;
|
||||||
|
import com.njcn.system.api.DicDataFeignClient;
|
||||||
|
import com.njcn.system.enums.DicDataEnum;
|
||||||
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
|
import com.njcn.system.pojo.po.DictData;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
@@ -26,6 +37,7 @@ import java.util.Comparator;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
@@ -39,6 +51,10 @@ public class ComAssessServiceImpl extends ServiceImpl<RStatComassesDMapper, RSta
|
|||||||
private final GeneralDeviceInfoClient generalDeviceInfoClient;
|
private final GeneralDeviceInfoClient generalDeviceInfoClient;
|
||||||
private final HarmonicComAssesUtil comAssesUtil;
|
private final HarmonicComAssesUtil comAssesUtil;
|
||||||
private final LineFeignClient lineFeignClient;
|
private final LineFeignClient lineFeignClient;
|
||||||
|
private final CommTerminalGeneralClient commTerminalGeneralClient;
|
||||||
|
private final PmsGeneralDeviceInfoClient pmsGeneralDeviceInfoClient;
|
||||||
|
private final CommLineClient commLineClient;
|
||||||
|
private final DicDataFeignClient dicDataFeignClient;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ComAssessVO> getComAccessData(DeviceInfoParam.BusinessParam comAccessParam) {
|
public List<ComAssessVO> getComAccessData(DeviceInfoParam.BusinessParam comAccessParam) {
|
||||||
@@ -46,66 +62,140 @@ public class ComAssessServiceImpl extends ServiceImpl<RStatComassesDMapper, RSta
|
|||||||
List<String> lineList = new ArrayList<>();
|
List<String> lineList = new ArrayList<>();
|
||||||
//监测点信息
|
//监测点信息
|
||||||
List<PollutionLineDTO> lineInfo = new ArrayList<>();
|
List<PollutionLineDTO> lineInfo = new ArrayList<>();
|
||||||
//按部门分类的实际运行终端综合信息
|
|
||||||
List<GeneralDeviceDTO> deviceDataList = generalDeviceInfoClient.getPracticalRunDeviceInfo(comAccessParam).getData();
|
|
||||||
deviceDataList.forEach(dept->{
|
|
||||||
lineList.addAll(dept.getLineIndexes());
|
|
||||||
});
|
|
||||||
if (!CollectionUtils.isEmpty(lineList)){
|
|
||||||
PollutionParamDTO paramDTO = new PollutionParamDTO();
|
|
||||||
paramDTO.setLineList(lineList);
|
|
||||||
lineInfo = lineFeignClient.getLineInfo(paramDTO).getData();
|
|
||||||
}
|
|
||||||
Map<String,List<PollutionLineDTO>> map = lineInfo.stream().collect(Collectors.groupingBy(PollutionLineDTO::getSubstationId));
|
|
||||||
//查询所有信息
|
|
||||||
List<PQSComAssesPO> comAccessData = getComAccessData(lineList, comAccessParam.getSearchBeginTime(), comAccessParam.getSearchEndTime());
|
|
||||||
|
|
||||||
//按变电站分类的实际运行终端综合信息
|
String systemType = commTerminalGeneralClient.isPqOrPms().getData();
|
||||||
|
if(systemType.equals("pq")) {
|
||||||
|
|
||||||
|
//按部门分类的实际运行终端综合信息
|
||||||
|
List<GeneralDeviceDTO> deviceDataList = generalDeviceInfoClient.getPracticalRunDeviceInfo(comAccessParam).getData();
|
||||||
|
deviceDataList.forEach(dept -> {
|
||||||
|
lineList.addAll(dept.getLineIndexes());
|
||||||
|
});
|
||||||
|
if (!CollectionUtils.isEmpty(lineList)) {
|
||||||
|
PollutionParamDTO paramDTO = new PollutionParamDTO();
|
||||||
|
paramDTO.setLineList(lineList);
|
||||||
|
lineInfo = lineFeignClient.getLineInfo(paramDTO).getData();
|
||||||
|
}
|
||||||
|
Map<String, List<PollutionLineDTO>> map = lineInfo.stream().collect(Collectors.groupingBy(PollutionLineDTO::getSubstationId));
|
||||||
|
//查询所有信息
|
||||||
|
List<PQSComAssesPO> comAccessData = getComAccessData(lineList, comAccessParam.getSearchBeginTime(), comAccessParam.getSearchEndTime());
|
||||||
|
|
||||||
|
//按变电站分类的实际运行终端综合信息
|
||||||
// List<GeneralDeviceDTO> subDataList = generalDeviceInfoClient.getPracticalRunDeviceInfoAsSubstation(comAccessParam).getData();
|
// List<GeneralDeviceDTO> subDataList = generalDeviceInfoClient.getPracticalRunDeviceInfoAsSubstation(comAccessParam).getData();
|
||||||
if (!CollectionUtils.isEmpty(deviceDataList)) {
|
if (!CollectionUtils.isEmpty(deviceDataList)) {
|
||||||
for(GeneralDeviceDTO dept : deviceDataList){
|
for (GeneralDeviceDTO dept : deviceDataList) {
|
||||||
if(CollectionUtils.isEmpty(dept.getLineIndexes())){
|
if (CollectionUtils.isEmpty(dept.getLineIndexes())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ComAssessVO comAssessVO = new ComAssessVO();
|
ComAssessVO comAssessVO = new ComAssessVO();
|
||||||
comAssessVO.setName(dept.getName());
|
comAssessVO.setName(dept.getName());
|
||||||
comAssessVO.setMonitors(dept.getLineIndexes().size());
|
comAssessVO.setMonitors(dept.getLineIndexes().size());
|
||||||
|
|
||||||
List<ComAssessDTO> childrenDTOS = new ArrayList<>();
|
List<ComAssessDTO> childrenDTOS = new ArrayList<>();
|
||||||
List<ComAssessVO> children=new ArrayList<>();
|
List<ComAssessVO> children = new ArrayList<>();
|
||||||
if (!CollectionUtils.isEmpty(dept.getSubIndexes())) {
|
if (!CollectionUtils.isEmpty(dept.getSubIndexes())) {
|
||||||
dept.getSubIndexes().forEach(sub -> {
|
dept.getSubIndexes().forEach(sub -> {
|
||||||
//获取变电站信息
|
//获取变电站信息
|
||||||
List<PollutionLineDTO> l1 = map.get(sub);
|
List<PollutionLineDTO> l1 = map.get(sub);
|
||||||
ComAssessVO child = new ComAssessVO();
|
ComAssessVO child = new ComAssessVO();
|
||||||
child.setName(l1.get(0).getSubstation());
|
child.setName(l1.get(0).getSubstation());
|
||||||
child.setMonitors(l1.size());
|
child.setMonitors(l1.size());
|
||||||
//监测点id
|
//监测点id
|
||||||
List<String> lineIds = l1.stream().map(PollutionLineDTO::getId).collect(Collectors.toList());
|
List<String> lineIds = l1.stream().map(PollutionLineDTO::getId).collect(Collectors.toList());
|
||||||
List<PQSComAssesPO> collect = comAccessData.stream().filter(x -> lineIds.contains(x.getLineId())).collect(Collectors.toList());
|
List<PQSComAssesPO> collect = comAccessData.stream().filter(x -> lineIds.contains(x.getLineId())).collect(Collectors.toList());
|
||||||
setResults(collect,childrenDTOS);
|
setResults(collect, childrenDTOS);
|
||||||
float allComAss = comAssesUtil.getAllComAss(childrenDTOS);
|
float allComAss = comAssesUtil.getAllComAss(childrenDTOS);
|
||||||
String lv = getLevel(allComAss);
|
String lv = getLevel(allComAss);
|
||||||
child.setData(allComAss);
|
child.setData(allComAss);
|
||||||
child.setLevel(lv);
|
child.setLevel(lv);
|
||||||
children.add(child);
|
children.add(child);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
List<String> lineIds = dept.getLineIndexes();
|
||||||
|
List<PQSComAssesPO> collect = comAccessData.stream().filter(x -> lineIds.contains(x.getLineId())).collect(Collectors.toList());
|
||||||
|
List<ComAssessDTO> dtos = new ArrayList<>();
|
||||||
|
setResults(collect, dtos);
|
||||||
|
float allComAss = comAssesUtil.getAllComAss(dtos);
|
||||||
|
String lv = getLevel(allComAss);
|
||||||
|
comAssessVO.setData(allComAss);
|
||||||
|
comAssessVO.setLevel(lv);
|
||||||
|
comAssessVO.setChildren(children);
|
||||||
|
comAssessVOList.add(comAssessVO);
|
||||||
}
|
}
|
||||||
List<String> lineIds = dept.getLineIndexes();
|
;
|
||||||
List<PQSComAssesPO> collect = comAccessData.stream().filter(x -> lineIds.contains(x.getLineId())).collect(Collectors.toList());
|
|
||||||
List<ComAssessDTO> dtos = new ArrayList<>();
|
|
||||||
setResults(collect,dtos);
|
|
||||||
float allComAss = comAssesUtil.getAllComAss(dtos);
|
|
||||||
String lv = getLevel(allComAss);
|
|
||||||
comAssessVO.setData(allComAss);
|
|
||||||
comAssessVO.setLevel(lv);
|
|
||||||
comAssessVO.setChildren(children);
|
|
||||||
comAssessVOList.add(comAssessVO);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
}
|
||||||
|
List<ComAssessVO> list = comAssessVOList.stream().sorted(Comparator.comparing(ComAssessVO::getData).reversed()).collect(Collectors.toList());
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}else {
|
||||||
|
DictData dictData = dicDataFeignClient.getDicDataByCodeAndType(DicDataEnum.RUN.getCode(), DicDataTypeEnum.LINE_STATE.getCode()).getData();
|
||||||
|
PmsDeviceInfoParam param = new PmsDeviceInfoParam();
|
||||||
|
param.setDeptIndex(comAccessParam.getDeptIndex());
|
||||||
|
SimpleDTO simpleDTO = new SimpleDTO();
|
||||||
|
simpleDTO.setId(dictData.getId());
|
||||||
|
param.setMonitorState(Stream.of(simpleDTO).collect(Collectors.toList()));
|
||||||
|
param.setStatisticalType(new SimpleDTO());
|
||||||
|
List<PmsGeneralDeviceDTO> deviceDataList = pmsGeneralDeviceInfoClient.getPmsDeviceInfoWithInOrg(param).getData();
|
||||||
|
deviceDataList.forEach(dept -> {
|
||||||
|
lineList.addAll(dept.getMonitorIdList());
|
||||||
|
});
|
||||||
|
if (!CollectionUtils.isEmpty(lineList)) {
|
||||||
|
|
||||||
|
lineInfo = commLineClient.getLineInfo(lineList).getData();
|
||||||
|
}
|
||||||
|
Map<String, List<PollutionLineDTO>> map = lineInfo.stream().collect(Collectors.groupingBy(PollutionLineDTO::getSubstationId));
|
||||||
|
//查询所有信息
|
||||||
|
List<PQSComAssesPO> comAccessData = getComAccessData(lineList, comAccessParam.getSearchBeginTime(), comAccessParam.getSearchEndTime());
|
||||||
|
|
||||||
|
//按变电站分类的实际运行终端综合信息
|
||||||
|
if (!CollectionUtils.isEmpty(deviceDataList)) {
|
||||||
|
for (PmsGeneralDeviceDTO dept : deviceDataList) {
|
||||||
|
if (CollectionUtils.isEmpty(dept.getMonitorIdList())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
ComAssessVO comAssessVO = new ComAssessVO();
|
||||||
|
comAssessVO.setName(dept.getName());
|
||||||
|
comAssessVO.setMonitors(dept.getMonitorIdList().size());
|
||||||
|
|
||||||
|
List<ComAssessDTO> childrenDTOS = new ArrayList<>();
|
||||||
|
List<ComAssessVO> children = new ArrayList<>();
|
||||||
|
if (!CollectionUtils.isEmpty(dept.getPowerrIdList())) {
|
||||||
|
dept.getPowerrIdList().forEach(sub -> {
|
||||||
|
//获取变电站信息
|
||||||
|
List<PollutionLineDTO> l1 = map.get(sub);
|
||||||
|
ComAssessVO child = new ComAssessVO();
|
||||||
|
child.setName(l1.get(0).getSubstation());
|
||||||
|
child.setMonitors(l1.size());
|
||||||
|
//监测点id
|
||||||
|
List<String> lineIds = l1.stream().map(PollutionLineDTO::getId).collect(Collectors.toList());
|
||||||
|
List<PQSComAssesPO> collect = comAccessData.stream().filter(x -> lineIds.contains(x.getLineId())).collect(Collectors.toList());
|
||||||
|
setResults(collect, childrenDTOS);
|
||||||
|
float allComAss = comAssesUtil.getAllComAss(childrenDTOS);
|
||||||
|
String lv = getLevel(allComAss);
|
||||||
|
child.setData(allComAss);
|
||||||
|
child.setLevel(lv);
|
||||||
|
children.add(child);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
List<String> lineIds = dept.getMonitorIdList();
|
||||||
|
List<PQSComAssesPO> collect = comAccessData.stream().filter(x -> lineIds.contains(x.getLineId())).collect(Collectors.toList());
|
||||||
|
List<ComAssessDTO> dtos = new ArrayList<>();
|
||||||
|
setResults(collect, dtos);
|
||||||
|
float allComAss = comAssesUtil.getAllComAss(dtos);
|
||||||
|
String lv = getLevel(allComAss);
|
||||||
|
comAssessVO.setData(allComAss);
|
||||||
|
comAssessVO.setLevel(lv);
|
||||||
|
comAssessVO.setChildren(children);
|
||||||
|
comAssessVOList.add(comAssessVO);
|
||||||
|
}
|
||||||
|
;
|
||||||
|
|
||||||
|
}
|
||||||
|
List<ComAssessVO> list = comAssessVOList.stream().sorted(Comparator.comparing(ComAssessVO::getData).reversed()).collect(Collectors.toList());
|
||||||
|
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
List<ComAssessVO> list = comAssessVOList.stream().sorted(Comparator.comparing(ComAssessVO::getData).reversed()).collect(Collectors.toList());
|
|
||||||
return list;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//设置保留四位小数
|
//设置保留四位小数
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import com.njcn.common.config.GeneralInfo;
|
|||||||
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
||||||
import com.njcn.device.pq.api.LineFeignClient;
|
import com.njcn.device.pq.api.LineFeignClient;
|
||||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionLineDTO;
|
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionParamDTO;
|
import com.njcn.device.pq.pojo.dto.PollutionParamDTO;
|
||||||
import com.njcn.device.pq.pojo.vo.LineDeviceStateVO;
|
import com.njcn.device.pq.pojo.vo.LineDeviceStateVO;
|
||||||
import com.njcn.harmonic.constant.Param;
|
import com.njcn.harmonic.constant.Param;
|
||||||
|
|||||||
@@ -15,10 +15,7 @@ import com.njcn.common.pojo.constant.BizParamConstant;
|
|||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
import com.njcn.device.biz.commApi.CommTerminalGeneralClient;
|
import com.njcn.device.biz.commApi.CommTerminalGeneralClient;
|
||||||
import com.njcn.device.biz.pojo.dto.DeptGetChildrenMoreDTO;
|
import com.njcn.device.biz.pojo.dto.*;
|
||||||
import com.njcn.device.biz.pojo.dto.DeptGetSubStationDTO;
|
|
||||||
import com.njcn.device.biz.pojo.dto.LineDevGetDTO;
|
|
||||||
import com.njcn.device.biz.pojo.dto.SubGetBase;
|
|
||||||
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
||||||
import com.njcn.device.pms.api.MonitorClient;
|
import com.njcn.device.pms.api.MonitorClient;
|
||||||
import com.njcn.device.pms.api.PmsGeneralDeviceInfoClient;
|
import com.njcn.device.pms.api.PmsGeneralDeviceInfoClient;
|
||||||
@@ -59,7 +56,6 @@ import java.math.RoundingMode;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.function.Predicate;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
@@ -523,7 +519,7 @@ public class PollutionSubstationServiceImpl extends ServiceImpl<RStatPollutionSu
|
|||||||
/**
|
/**
|
||||||
* @Description: getLineInfoById
|
* @Description: getLineInfoById
|
||||||
* @Param: [param]
|
* @Param: [param]
|
||||||
* @return: java.util.List<com.njcn.device.pq.pojo.dto.PollutionLineDTO>
|
* @return: java.util.List<com.njcn.device.biz.pojo.dto.PollutionLineDTO>
|
||||||
* @Author: clam
|
* @Author: clam
|
||||||
* @Date: 2022/11/3
|
* @Date: 2022/11/3
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.njcn.harmonic.service.majornetwork;
|
package com.njcn.harmonic.service.majornetwork;
|
||||||
|
|
||||||
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionLineDTO;
|
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||||
import com.njcn.harmonic.pojo.param.PVOverviewParam;
|
import com.njcn.harmonic.pojo.param.PVOverviewParam;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import com.njcn.device.pms.pojo.dto.PmsStatationStatInfoDTO;
|
|||||||
import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam;
|
import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam;
|
||||||
import com.njcn.device.pms.pojo.param.PmsStatationStatInfoParam;
|
import com.njcn.device.pms.pojo.param.PmsStatationStatInfoParam;
|
||||||
import com.njcn.device.pms.pojo.po.StatationStat;
|
import com.njcn.device.pms.pojo.po.StatationStat;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionLineDTO;
|
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||||
import com.njcn.harmonic.mapper.RStatPollutionSubstationDPOMapper;
|
import com.njcn.harmonic.mapper.RStatPollutionSubstationDPOMapper;
|
||||||
import com.njcn.harmonic.mapper.majornetwork.PVOverviewMapper;
|
import com.njcn.harmonic.mapper.majornetwork.PVOverviewMapper;
|
||||||
import com.njcn.harmonic.pojo.param.PVOverviewParam;
|
import com.njcn.harmonic.pojo.param.PVOverviewParam;
|
||||||
|
|||||||
Reference in New Issue
Block a user