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.pojo.dto.LineALLInfoDTO;
|
||||
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.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -52,4 +53,8 @@ public interface CommLineClient {
|
||||
|
||||
@GetMapping("/getLineAllDetailList")
|
||||
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.pojo.dto.LineALLInfoDTO;
|
||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -56,6 +57,12 @@ public class CommLineClientFallbackFactory implements FallbackFactory<CommLineCl
|
||||
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 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.LineDTO;
|
||||
import com.njcn.device.pms.service.majornetwork.IMonitorService;
|
||||
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -58,4 +59,15 @@ public class CommLineController extends BaseController {
|
||||
List<LineDTO> result = monitorService.getLineDetailBatch(ids);
|
||||
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.vo.StatationStatVO;
|
||||
import com.njcn.device.pms.service.majornetwork.IStatationStatService;
|
||||
import com.njcn.device.pq.pojo.dto.PollutionLineDTO;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
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.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import retrofit2.http.GET;
|
||||
|
||||
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.biz.pojo.po.Overlimit;
|
||||
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 org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@@ -222,4 +223,7 @@ public interface IMonitorService extends IService<Monitor> {
|
||||
* @Date: 2024/5/27 13:54
|
||||
*/
|
||||
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.po.PmsMidLedger;
|
||||
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.pq.pojo.dto.PollutionLineDTO;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
|
||||
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.service.majornetwork.*;
|
||||
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.poi.excel.ExcelUtil;
|
||||
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.po.Dept;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import com.njcn.web.pojo.dto.PmsPage;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
@@ -891,6 +891,26 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
||||
pmsPage.setRecords(info);
|
||||
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) {
|
||||
if(StrUtil.isNotBlank(name)){
|
||||
switch (name) {
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
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.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
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.pojo.dto.*;
|
||||
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.pq.pojo.po.line.LineInfoVO;
|
||||
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.web.bind.annotation.PostMapping;
|
||||
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.exception.BusinessException;
|
||||
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.pojo.dto.*;
|
||||
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.LogUtil;
|
||||
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.pq.mapper.DeviceMapper;
|
||||
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.service.LineService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -30,7 +30,6 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
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.extension.plugins.pagination.Page;
|
||||
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.LineDevGetDTO;
|
||||
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.excel.TerminalBaseExcel;
|
||||
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.param.DeviceInfoParam;
|
||||
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.njcn.device.biz.pojo.dto.LineDTO;
|
||||
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.PollutionSubstationDTO;
|
||||
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.TopMsgPO;
|
||||
import com.njcn.device.pq.pojo.vo.*;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
|
||||
import java.util.List;
|
||||
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.mapper.*;
|
||||
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.PollutionSubstationDTO;
|
||||
import com.njcn.device.pq.pojo.param.*;
|
||||
|
||||
Reference in New Issue
Block a user