用能空调代码提交 终端相关代码修改

This commit is contained in:
2022-07-01 09:17:51 +08:00
parent 7affd72b1d
commit 76ea96e316
38 changed files with 575 additions and 108 deletions

View File

@@ -172,4 +172,21 @@ public interface LineFeignClient {
*/
@PostMapping("getOverLimitByList")
HttpResult<List<Overlimit>> getOverLimitByList(@RequestBody PollutionParamDTO pollutionParamDTO);
/**
* 区域监测点以及上级一些信息
* @param list 监测点id集合
* @return
*/
@PostMapping("getBaseLineAreaInfo")
HttpResult<List<AreaLineInfoVO>> getBaseLineAreaInfo(@RequestBody List<String> list);
/**
* 获取监测点基本信息
* @param list 监测点id集合
* @return
*/
@PostMapping("getBaseLineList")
HttpResult<List<Line>> getBaseLineList(@RequestBody List<String> list);
}

View File

@@ -5,10 +5,14 @@ import com.njcn.common.pojo.response.HttpResult;
import com.njcn.device.api.fallback.GeneralDeviceInfoClientFallbackFactory;
import com.njcn.device.api.fallback.TerminalBaseClientFallbackFactory;
import com.njcn.device.pojo.dto.GeneralDeviceDTO;
import com.njcn.device.pojo.po.Device;
import com.njcn.device.pojo.po.Line;
import com.njcn.device.pojo.vo.AreaLineInfoVO;
import com.njcn.device.pojo.vo.TerminalBaseVO;
import org.springframework.cloud.openfeign.FeignClient;
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;
import java.util.List;
@@ -33,4 +37,13 @@ public interface TerminalBaseClient {
@GetMapping("/getSubstationById")
HttpResult<List<Line>> getSubstationById(@RequestParam("list") List<String> list);
/**
* 获取监测点限值
* @param list 设备id集合
* @return 监测点限值信息
*/
@PostMapping("getDevInfoByIds")
HttpResult<List<TerminalBaseVO>> getDeviceByIdOnOrOff(@RequestBody List<String> list);
}

View File

@@ -135,6 +135,21 @@ public class LineFeignClientFallbackFactory implements FallbackFactory<LineFeign
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<List<AreaLineInfoVO>> getBaseLineAreaInfo(List<String> list) {
log.error("{}异常,降级处理,异常为:{}", "获取监测点详情 ", throwable.toString());
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<List<Line>> getBaseLineList(List<String> list) {
log.error("{}异常,降级处理,异常为:{}", "获取监测点详情 ", throwable.toString());
throw new BusinessException(finalExceptionEnum);
}
};
}
}

View File

@@ -6,7 +6,9 @@ import com.njcn.common.pojo.response.HttpResult;
import com.njcn.device.api.GeneralDeviceInfoClient;
import com.njcn.device.api.TerminalBaseClient;
import com.njcn.device.pojo.dto.GeneralDeviceDTO;
import com.njcn.device.pojo.po.Device;
import com.njcn.device.pojo.po.Line;
import com.njcn.device.pojo.vo.TerminalBaseVO;
import com.njcn.device.utils.DeviceEnumUtil;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
@@ -38,6 +40,12 @@ public class TerminalBaseClientFallbackFactory implements FallbackFactory<Termin
log.error("{}异常,降级处理,异常为:{}", "根据变电站id获取变电站详情", throwable.toString());
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<List<TerminalBaseVO>> getDeviceByIdOnOrOff(List<String> list) {
log.error("{}异常,降级处理,异常为:{}", "根据设备ids获取设备详情", throwable.toString());
throw new BusinessException(finalExceptionEnum);
}
};