实时数据调整

This commit is contained in:
xy
2024-11-12 13:20:18 +08:00
parent 5c6d05b307
commit 82b5cfcf8d
3 changed files with 10 additions and 0 deletions

View File

@@ -11,6 +11,9 @@ import java.io.Serializable;
@Data @Data
public class BaseRealDataSet implements Serializable { public class BaseRealDataSet implements Serializable {
@ApiModelProperty("用户ID")
private String userId;
@ApiModelProperty("监测点id") @ApiModelProperty("监测点id")
private String lineId; private String lineId;

View File

@@ -12,6 +12,9 @@ import java.io.Serializable;
@Data @Data
public class HarmRealDataSet implements Serializable { public class HarmRealDataSet implements Serializable {
@ApiModelProperty("用户ID")
private String userId;
@ApiModelProperty("监测点id") @ApiModelProperty("监测点id")
private String lineId; private String lineId;

View File

@@ -52,6 +52,8 @@ public class RtServiceImpl implements IRtService {
List<CsDataArray> dataArrayList; List<CsDataArray> dataArrayList;
//监测点id //监测点id
String lineId = appAutoDataMessage.getId() + appAutoDataMessage.getMsg().getClDid(); String lineId = appAutoDataMessage.getId() + appAutoDataMessage.getMsg().getClDid();
//用户Id
String userId = redisUtil.getObjectByKey("rtDataUserId:"+lineId).toString();
//获取监测点基础信息 //获取监测点基础信息
CsLinePO po = csLineFeignClient.getById(lineId).getData(); CsLinePO po = csLineFeignClient.getById(lineId).getData();
//获取数据集 dataSet //获取数据集 dataSet
@@ -72,6 +74,7 @@ public class RtServiceImpl implements IRtService {
//基础数据 //基础数据
if (dataSet.getName().contains("Ds$Pqd$Rt$Basic$")) { if (dataSet.getName().contains("Ds$Pqd$Rt$Basic$")) {
BaseRealDataSet baseRealDataSet = assembleData(dataArrayList,item,po.getConType()); BaseRealDataSet baseRealDataSet = assembleData(dataArrayList,item,po.getConType());
baseRealDataSet.setUserId(userId);
baseRealDataSet.setLineId(lineId); baseRealDataSet.setLineId(lineId);
baseRealDataSet.setPt(po.getPtRatio().floatValue()); baseRealDataSet.setPt(po.getPtRatio().floatValue());
baseRealDataSet.setCt(po.getCtRatio().floatValue()); baseRealDataSet.setCt(po.getCtRatio().floatValue());
@@ -83,6 +86,7 @@ public class RtServiceImpl implements IRtService {
//fixme 目前实时数据只有基础数据和谐波数据,后期拓展,这边需要再判断 //fixme 目前实时数据只有基础数据和谐波数据,后期拓展,这边需要再判断
else { else {
HarmRealDataSet harmRealDataSet = harmData(dataArrayList,item); HarmRealDataSet harmRealDataSet = harmData(dataArrayList,item);
harmRealDataSet.setUserId(userId);
harmRealDataSet.setLineId(lineId); harmRealDataSet.setLineId(lineId);
harmRealDataSet.setPt(po.getPtRatio().floatValue()); harmRealDataSet.setPt(po.getPtRatio().floatValue());
harmRealDataSet.setCt(po.getCtRatio().floatValue()); harmRealDataSet.setCt(po.getCtRatio().floatValue());