diff --git a/pqs-device/common-device-biz/src/main/java/com/njcn/device/biz/commApi/CommLedgerDeptClient.java b/pqs-device/common-device-biz/src/main/java/com/njcn/device/biz/commApi/CommLedgerDeptClient.java index 00f230f24..fff0d444d 100644 --- a/pqs-device/common-device-biz/src/main/java/com/njcn/device/biz/commApi/CommLedgerDeptClient.java +++ b/pqs-device/common-device-biz/src/main/java/com/njcn/device/biz/commApi/CommLedgerDeptClient.java @@ -9,6 +9,7 @@ import com.njcn.device.biz.pojo.param.DeptGetLineParam; import com.njcn.user.pojo.po.Dept; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; @@ -37,6 +38,8 @@ public interface CommLedgerDeptClient { HttpResult update(@RequestBody Dept dept); + @GetMapping("/existMonitorDeptTree") + public HttpResult> existMonitorDeptTree(); } diff --git a/pqs-device/common-device-biz/src/main/java/com/njcn/device/biz/commApi/fallback/CommLedgerDeptClientFallbackFactory.java b/pqs-device/common-device-biz/src/main/java/com/njcn/device/biz/commApi/fallback/CommLedgerDeptClientFallbackFactory.java index 141ca1bbe..4d3fb429a 100644 --- a/pqs-device/common-device-biz/src/main/java/com/njcn/device/biz/commApi/fallback/CommLedgerDeptClientFallbackFactory.java +++ b/pqs-device/common-device-biz/src/main/java/com/njcn/device/biz/commApi/fallback/CommLedgerDeptClientFallbackFactory.java @@ -37,6 +37,12 @@ public class CommLedgerDeptClientFallbackFactory implements FallbackFactory> existMonitorDeptTree() { + log.error("{}异常,降级处理,异常为:{}", "获取存在投运监测点的部门id集合", throwable.toString()); + throw new BusinessException(finalExceptionEnum); + } + }; }