高低电压穿越功能优化
This commit is contained in:
@@ -2,12 +2,10 @@ package com.njcn.supervision.api;
|
||||
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.supervision.api.fallback.TempLineRunTestFeignClientFallbackFactory;
|
||||
import com.njcn.supervision.api.fallback.UserLedgerFeignClientFallbackFactory;
|
||||
import com.njcn.supervision.pojo.param.user.UserReportParam;
|
||||
import com.njcn.supervision.pojo.po.user.UserReportPO;
|
||||
import com.njcn.supervision.pojo.vo.user.NewUserReportVO;
|
||||
import com.njcn.supervision.pojo.vo.user.UserLedgerVO;
|
||||
import com.njcn.supervision.pojo.vo.user.UserReportVO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -33,4 +31,7 @@ public interface UserLedgerFeignClient {
|
||||
|
||||
@PostMapping(value = "/bindUserStation")
|
||||
HttpResult<List<UserLedgerVO>> bindUserStation(@RequestParam("userId")String userId,@RequestParam("stationId")String stationId);
|
||||
|
||||
@PostMapping("/getUserReportByIds")
|
||||
HttpResult<List<NewUserReportVO>> getUserReportByIds(@RequestBody List<String> ids);
|
||||
}
|
||||
|
||||
@@ -3,12 +3,10 @@ package com.njcn.supervision.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.supervision.api.TempLineRunTestFeignClient;
|
||||
import com.njcn.supervision.api.UserLedgerFeignClient;
|
||||
import com.njcn.supervision.pojo.param.user.UserReportParam;
|
||||
import com.njcn.supervision.pojo.po.user.UserReportPO;
|
||||
import com.njcn.supervision.pojo.vo.user.NewUserReportVO;
|
||||
import com.njcn.supervision.pojo.vo.user.UserLedgerVO;
|
||||
import com.njcn.supervision.pojo.vo.user.UserReportVO;
|
||||
import com.njcn.supervision.utils.SupervisionEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -48,6 +46,12 @@ public class UserLedgerFeignClientFallbackFactory implements FallbackFactory<Use
|
||||
log.error("{}异常,降级处理,异常为:{}", "用户电站信息绑定", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<NewUserReportVO>> getUserReportByIds(List<String> ids) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "根据ids获取非电网侧用户信息", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.njcn.supervision.pojo.vo.user;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* @author web2023
|
||||
*/
|
||||
@Data
|
||||
public class NewUserReportVO {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 监测点id
|
||||
*/
|
||||
@ApiModelProperty(value = "lineId")
|
||||
private String lineId;
|
||||
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
@ApiModelProperty(value = "工程名称")
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 额定功率 单位MW
|
||||
*/
|
||||
@ApiModelProperty(value = "额定功率 单位MW")
|
||||
private Double ratePower;
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user