新增物联设备相关算法

This commit is contained in:
xy
2025-11-11 10:57:34 +08:00
parent b7574b2916
commit 2fb11ecaaf
8 changed files with 53 additions and 10 deletions

View File

@@ -5,6 +5,7 @@ import com.njcn.common.pojo.response.HttpResult;
import com.njcn.csdevice.api.fallback.CsLineClientFallbackFactory;
import com.njcn.csdevice.pojo.param.CsLineParam;
import com.njcn.csdevice.pojo.po.CsLinePO;
import com.njcn.device.biz.pojo.po.Overlimit;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
@@ -48,4 +49,10 @@ public interface CsLineFeignClient {
@PostMapping("/updateLineDataByList")
HttpResult<String> updateDataByList(@RequestParam("list") List<String> list, @RequestParam("id") String id, @RequestParam("setId") String setId);
@PostMapping("/getAllLine")
HttpResult<List<String>> getAllLine();
@PostMapping("/getOverLimitDataByIds")
HttpResult<List<Overlimit>> getOverLimitData(@RequestBody List<String> ids);
}

View File

@@ -6,6 +6,7 @@ import com.njcn.common.pojo.response.HttpResult;
import com.njcn.csdevice.api.CsLineFeignClient;
import com.njcn.csdevice.pojo.param.CsLineParam;
import com.njcn.csdevice.pojo.po.CsLinePO;
import com.njcn.device.biz.pojo.po.Overlimit;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@@ -86,6 +87,18 @@ public class CsLineClientFallbackFactory implements FallbackFactory<CsLineFeignC
log.error("{}异常,降级处理,异常为:{}","根据装置集合修改监测点信息",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<List<String>> getAllLine() {
log.error("{}异常,降级处理,异常为:{}","获取所有监测点id",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<List<Overlimit>> getOverLimitData(List<String> ids) {
log.error("{}异常,降级处理,异常为:{}","根据监测点id集合获取国标限值异常",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
};
}
}