物消息路由模块、物解析模块提供接口
This commit is contained in:
@@ -26,4 +26,7 @@ public interface CsLineFeignClient {
|
||||
|
||||
@PostMapping("/addList")
|
||||
HttpResult<String> addLineList(@RequestBody List<CsLinePO> list);
|
||||
|
||||
@PostMapping("/findByNdid")
|
||||
HttpResult<List<CsLinePO>> findByNdid(@RequestParam("id") String id);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.njcn.csdevice.api;
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.csdevice.api.fallback.DataArrayFeignClientFallbackFactory;
|
||||
import com.njcn.csdevice.pojo.param.DataArrayParam;
|
||||
import com.njcn.csdevice.pojo.po.CsDataArray;
|
||||
import com.njcn.csdevice.pojo.po.CsDataSet;
|
||||
import com.njcn.csdevice.pojo.vo.DataArrayTreeVO;
|
||||
@@ -31,4 +32,7 @@ public interface DataArrayFeignClient {
|
||||
@PostMapping("/getDataArrayByIds")
|
||||
HttpResult<List<CsDataArray>> getDataArrayByIds(@RequestParam("ids") List<String> ids);
|
||||
|
||||
@PostMapping("/findListByParam")
|
||||
HttpResult<List<CsDataArray>> findListByParam(@RequestBody DataArrayParam param);
|
||||
|
||||
}
|
||||
|
||||
@@ -44,6 +44,12 @@ public class CsLineClientFallbackFactory implements FallbackFactory<CsLineFeignC
|
||||
log.error("{}异常,降级处理,异常为:{}","批量新增加监测点",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<CsLinePO>> findByNdid(String id) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据ndid查询监测点",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.csdevice.api.DataArrayFeignClient;
|
||||
import com.njcn.csdevice.pojo.param.DataArrayParam;
|
||||
import com.njcn.csdevice.pojo.po.CsDataArray;
|
||||
import com.njcn.csdevice.pojo.po.CsDataSet;
|
||||
import com.njcn.csdevice.pojo.vo.DataArrayTreeVO;
|
||||
@@ -57,6 +58,12 @@ public class DataArrayFeignClientFallbackFactory implements FallbackFactory<Data
|
||||
log.error("{}异常,降级处理,异常为:{}","根据id集合称获取详细数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<CsDataArray>> findListByParam(DataArrayParam param) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据条件查询详细数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.njcn.csdevice.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2023/8/14 15:30
|
||||
*/
|
||||
@Data
|
||||
public class DataArrayParam {
|
||||
|
||||
@ApiModelProperty("设备识别码")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("逻辑设备id")
|
||||
private Integer did;
|
||||
|
||||
@ApiModelProperty("逻辑子设备id")
|
||||
private Integer cldId;
|
||||
|
||||
@ApiModelProperty("数据类型")
|
||||
private String statMethod;
|
||||
}
|
||||
@@ -63,7 +63,7 @@ public class CsDataSet extends BaseEntity {
|
||||
/**
|
||||
* 逻辑子设备id(从模板获取,主设备此字段没有值)
|
||||
*/
|
||||
private String clDev;
|
||||
private Integer clDev;
|
||||
|
||||
/**
|
||||
* 数据集类型(0:主设备 1:模块 2:监测设备)
|
||||
|
||||
Reference in New Issue
Block a user