电能质量问题监测点超标新增需求
This commit is contained in:
@@ -3,7 +3,7 @@ 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.CommLineClientFallbackFactory;
|
||||
import com.njcn.device.biz.commApi.fallback.CommTerminalGeneralClientFallbackFactory;
|
||||
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -42,4 +42,9 @@ public interface CommLineClient {
|
||||
*/
|
||||
@PostMapping("/getLineDetailBatch")
|
||||
HttpResult<List<LineDTO>> getLineDetailBatch(@RequestParam("ids") List<String> ids);
|
||||
|
||||
|
||||
|
||||
@GetMapping("/getLineAllDetail")
|
||||
LineALLInfoDTO getLineAllDetail(@RequestParam("id") String id);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ 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.CommLineClient;
|
||||
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
@@ -43,6 +44,12 @@ public class CommLineClientFallbackFactory implements FallbackFactory<CommLineCl
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LineALLInfoDTO getLineAllDetail(String id) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "获取监测点信息", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.njcn.device.biz.pojo.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2024/4/7 16:41【需求编号】
|
||||
*超标监测点详情(本次用于超标监测点后续接口需要其他字段,自行修改)
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class LineALLInfoDTO {
|
||||
//监测点本身信息
|
||||
@ApiModelProperty(value = "监测点本身信息",name = "lineDTO")
|
||||
private LineLineDTO lineLineDTO;
|
||||
|
||||
@ApiModelProperty(value = "监测点母线信息",name = "lineBusbarDTO")
|
||||
private LineBusbarDTO lineBusbarDTO;
|
||||
|
||||
@ApiModelProperty(value = "监测点设备信息",name = "lineDeviceDTO")
|
||||
private LineDeviceDTO lineDeviceDTO;
|
||||
|
||||
@ApiModelProperty(value = "监测点电站信息",name = "lineSubStationDTO")
|
||||
private LineSubStationDTO lineSubStationDTO;
|
||||
|
||||
@ApiModelProperty(value = "监测点部门信息",name = "lineDeptDTO")
|
||||
private LineDeptDTO lineDeptDTO;
|
||||
|
||||
|
||||
|
||||
|
||||
@Data
|
||||
public static class LineLineDTO {
|
||||
@ApiModelProperty(name = "lineId",value = "监测点id")
|
||||
private String lineId;
|
||||
@ApiModelProperty(name = "linename",value = "监测点名称")
|
||||
private String linename;
|
||||
@ApiModelProperty(name = "num",value = "线路号")
|
||||
private Integer num;
|
||||
@ApiModelProperty(name = "objName",value = "监测点对象名称")
|
||||
private String objName;
|
||||
@ApiModelProperty(name = "loadType",value = "监测对象类型")
|
||||
private String loadType;
|
||||
@ApiModelProperty(name = "voltageLevel",value = "电压等级")
|
||||
private String voltageLevel;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class LineBusbarDTO {
|
||||
|
||||
@ApiModelProperty(name = "lineId",value = "母线id")
|
||||
private String busBarId;
|
||||
@ApiModelProperty(name = "linename",value = "母线名称")
|
||||
private String busBarName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class LineDeviceDTO {
|
||||
|
||||
@ApiModelProperty(name = "deviceId",value = "设备id")
|
||||
private String deviceId;
|
||||
@ApiModelProperty(name = "deviceName",value = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class LineSubStationDTO {
|
||||
@ApiModelProperty(name = "subStationId",value = "电站id")
|
||||
private String subStationId;
|
||||
@ApiModelProperty(name = "subStationName",value = "电站名称")
|
||||
private String subStationName;
|
||||
|
||||
|
||||
}
|
||||
@Data
|
||||
public static class LineDeptDTO {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user