添加pq/pms公共接口
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package com.njcn.device.biz.commApi;
|
||||
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.device.biz.commApi.fallback.CommTerminalGeneralClientFallbackFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2023/9/14
|
||||
*/
|
||||
@FeignClient(
|
||||
value = ServerInfo.DEVICE,
|
||||
path = "CommLineClient",
|
||||
contextId = "CommLineClient",
|
||||
fallbackFactory = CommTerminalGeneralClientFallbackFactory.class)
|
||||
public interface CommLineClient {
|
||||
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.biz.commApi.fallback.CommTerminalGeneralClientFallbackFactory;
|
||||
import com.njcn.device.biz.pojo.dto.*;
|
||||
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
@@ -106,6 +107,15 @@ public interface CommTerminalGeneralClient {
|
||||
@PostMapping("/deptGetLineIds")
|
||||
HttpResult<List<DeptGetChildrenDTO>> deptGetLineList(@RequestBody DeptGetLineParam deptGetLineParam);
|
||||
|
||||
|
||||
|
||||
@PostMapping("/getOverLimitData")
|
||||
HttpResult<Overlimit> getOverLimitData(@RequestParam("id") String id);
|
||||
|
||||
|
||||
@GetMapping("/getRunMonitorIds")
|
||||
HttpResult<List<String>> getRunMonitorIds();
|
||||
|
||||
/**
|
||||
* 用于返回pq 还是pms系统
|
||||
* @author cdf
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.commApi.CommTerminalGeneralClient;
|
||||
import com.njcn.device.biz.pojo.dto.*;
|
||||
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -79,6 +80,18 @@ public class CommTerminalGeneralClientFallbackFactory implements FallbackFactory
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<Overlimit> getOverLimitData(String id) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "获取监测点限值", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<String>> getRunMonitorIds() {
|
||||
log.error("{}异常,降级处理,异常为:{}", "获取投运监测点索引", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<String> isPqOrPms() {
|
||||
log.error("{}异常,降级处理,异常为:{}", "返回pq还是pms系统", throwable.toString());
|
||||
|
||||
Reference in New Issue
Block a user