1.解决device模块Swagger无法显示bug
2.修改监测点评价,数据异常,指标数据质量算法兼容修改
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
package com.njcn.device.biz.commApi;
|
||||
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.commApi.fallback.CommTerminalGeneralClientFallbackFactory;
|
||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
@@ -12,11 +16,17 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*/
|
||||
@FeignClient(
|
||||
value = ServerInfo.DEVICE,
|
||||
path = "CommLineClient",
|
||||
contextId = "CommLineClient",
|
||||
path = "commLine",
|
||||
contextId = "commLine",
|
||||
fallbackFactory = CommTerminalGeneralClientFallbackFactory.class)
|
||||
public interface CommLineClient {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 获取监测点信息
|
||||
* @param id
|
||||
* @Author: wr
|
||||
* @Date: 2023/9/22 11:11
|
||||
*/
|
||||
@GetMapping("/getLineDetail")
|
||||
HttpResult<LineDTO> getLineDetail(@RequestParam("id") String id);
|
||||
}
|
||||
|
||||
@@ -142,7 +142,6 @@ public interface CommTerminalGeneralClient {
|
||||
HttpResult<List<LineDevGetDTO>> getMonitorDetailList(@RequestBody List<String> list);
|
||||
|
||||
|
||||
|
||||
@GetMapping("/lineUnitDetail")
|
||||
HttpResult<PqsDeviceUnit> lineUnitDetail(@RequestParam("lineId") String lineId);
|
||||
|
||||
|
||||
@@ -3,10 +3,9 @@ package com.njcn.device.biz.commApi.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.commApi.CommLedgerDeptClient;
|
||||
import com.njcn.device.biz.commApi.CommLineClient;
|
||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
import com.njcn.user.pojo.po.Dept;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -30,8 +29,11 @@ public class CommLineClientFallbackFactory implements FallbackFactory<CommLineCl
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
return new CommLineClient() {
|
||||
|
||||
|
||||
@Override
|
||||
public HttpResult<LineDTO> getLineDetail(String id) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "获取监测点信息", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.njcn.device.biz.pojo.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wr
|
||||
* @description
|
||||
* @date 2023/9/22 10:09
|
||||
*/
|
||||
@Data
|
||||
public class LineDTO {
|
||||
|
||||
@ApiModelProperty(name = "lineId",value = "监测点id")
|
||||
private String lineId;
|
||||
|
||||
@ApiModelProperty(name = "devId",value = "终端id")
|
||||
private String devId;
|
||||
|
||||
@ApiModelProperty(name = "timeInterval",value = "测量间隔(1-10分钟)")
|
||||
private Integer timeInterval;
|
||||
|
||||
@ApiModelProperty(name = "voltageLevel",value = "电压等级")
|
||||
private String voltageLevel;
|
||||
|
||||
@ApiModelProperty(name = "ptType",value = "接线方式")
|
||||
private String ptType;
|
||||
|
||||
@ApiModelProperty(name = "runFlag",value = "终端运行状态")
|
||||
private String runFlag;
|
||||
|
||||
@ApiModelProperty(name = "ptPhaseType",value = "监测点接线相别(0,单相,1,三相,默认三相)")
|
||||
private String ptPhaseType;
|
||||
}
|
||||
Reference in New Issue
Block a user