添加接线方式
This commit is contained in:
@@ -51,6 +51,9 @@ public class CsLedgerVO implements Serializable {
|
||||
@ApiModelProperty(name = "lineType",value = "监测点类型 0:治理监测点 1:电能质量监测点")
|
||||
private Integer lineType;
|
||||
|
||||
@ApiModelProperty(name = "conType",value = "接线方式 0-星型 1-角型 2-V型")
|
||||
private Integer conType;
|
||||
|
||||
@ApiModelProperty(name = "children",value = "子节点")
|
||||
private List<CsLedgerVO> children = new ArrayList<>();
|
||||
|
||||
|
||||
@@ -76,8 +76,7 @@
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>user-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
@@ -92,8 +91,7 @@
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>cs-warn-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- zxing生成二维码 -->
|
||||
@@ -107,9 +105,6 @@
|
||||
<groupId>com.njcn</groupId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi</artifactId>
|
||||
@@ -139,8 +134,7 @@
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>cs-harmonic-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
<version>${project.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.njcn</groupId>
|
||||
@@ -151,20 +145,14 @@
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>cs-system-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>access-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.csdevice.constant.DataParam;
|
||||
@@ -99,6 +100,10 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
||||
} else {
|
||||
item.setLineType(1);
|
||||
}
|
||||
LambdaQueryWrapper<CsLinePO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(CsLinePO::getLineId,item.getId()).eq(CsLinePO::getStatus,1);
|
||||
CsLinePO po = csLinePOService.getOne(queryWrapper);
|
||||
item.setConType(po.getConType());
|
||||
}
|
||||
)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
@@ -108,9 +108,7 @@ public class DataServiceImpl implements IDataService {
|
||||
vo.setId(item2.getId());
|
||||
vo.setName(item2.getName());
|
||||
StatisticalDataDTO statisticalDataDTO = commonService.getLineRtData(lineId,influxDbParamUtil.getTableNameByClassId(item2.getClassId()),item2.getName(),item2.getPhase(),"avg",influxDbParamUtil.getClDidByLineId(lineId));
|
||||
if (Objects.isNull(statisticalDataDTO)) {
|
||||
vo.setAvgValue(3.14159);
|
||||
} else {
|
||||
if (Objects.nonNull(statisticalDataDTO)) {
|
||||
vo.setTime(statisticalDataDTO.getTime());
|
||||
vo.setAvgValue(statisticalDataDTO.getValue());
|
||||
}
|
||||
@@ -119,28 +117,36 @@ public class DataServiceImpl implements IDataService {
|
||||
vo.setSort(item2.getSort());
|
||||
if (Objects.equals("Primary",dataLevel)) {
|
||||
if (Objects.equals("Primary",csDataSetLevel)) {
|
||||
vo.setAvgValue(Double.valueOf(df.format(statisticalDataDTO.getValue())));
|
||||
vo.setAvgValue(Objects.isNull(statisticalDataDTO) ? 3.14159 : Double.parseDouble(df.format(statisticalDataDTO.getValue())));
|
||||
unit = item2.getUnit();
|
||||
} else {
|
||||
if (HarmonicConstant.POWER_LIST.contains(item2.getShowName())) {
|
||||
if (Objects.isNull(statisticalDataDTO)) {
|
||||
vo.setAvgValue(3.14159);
|
||||
} else {
|
||||
re = DataChangeUtil.secondaryToPrimary(item2.getPrimaryFormula(), statisticalDataDTO.getValue(), pt, ct) / 1000;
|
||||
vo.setAvgValue(Double.valueOf(df.format(re)));
|
||||
}
|
||||
unit = "k" + item2.getUnit();
|
||||
} else {
|
||||
vo.setAvgValue(Double.valueOf(df.format(statisticalDataDTO.getValue())));
|
||||
vo.setAvgValue(Objects.isNull(statisticalDataDTO) ? 3.14159 : Double.parseDouble(df.format(statisticalDataDTO.getValue())));
|
||||
unit = item2.getUnit();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (Objects.equals("Primary",csDataSetLevel)) {
|
||||
if (HarmonicConstant.POWER_LIST.contains(item2.getShowName())) {
|
||||
if (Objects.isNull(statisticalDataDTO)) {
|
||||
vo.setAvgValue(3.14159);
|
||||
} else {
|
||||
re = DataChangeUtil.primaryToSecondary(item2.getPrimaryFormula(), statisticalDataDTO.getValue(), pt, ct);
|
||||
vo.setAvgValue(Double.valueOf(df.format(re)));
|
||||
} else {
|
||||
vo.setAvgValue(Double.valueOf(df.format(statisticalDataDTO.getValue())));
|
||||
}
|
||||
} else {
|
||||
vo.setAvgValue(Double.valueOf(df.format(statisticalDataDTO.getValue())));
|
||||
vo.setAvgValue(Objects.isNull(statisticalDataDTO) ? 3.14159 : Double.parseDouble(df.format(statisticalDataDTO.getValue())));
|
||||
}
|
||||
} else {
|
||||
vo.setAvgValue(Objects.isNull(statisticalDataDTO) ? 3.14159 : Double.parseDouble(df.format(statisticalDataDTO.getValue())));
|
||||
}
|
||||
unit = item2.getUnit();
|
||||
}
|
||||
@@ -159,8 +165,12 @@ public class DataServiceImpl implements IDataService {
|
||||
vo.setId(item2.getId());
|
||||
vo.setName(item2.getName().concat("_").concat(Integer.toString(i)));
|
||||
StatisticalDataDTO statisticalDataDTO = commonService.getLineRtData(lineId,influxDbParamUtil.getTableNameByClassId(item2.getClassId()),item2.getName().concat("_").concat(Integer.toString(i)),item2.getPhase(),"avg",influxDbParamUtil.getClDidByLineId(lineId));
|
||||
if (Objects.isNull(statisticalDataDTO)) {
|
||||
vo.setAvgValue(3.14159);
|
||||
} else {
|
||||
vo.setTime(statisticalDataDTO.getTime());
|
||||
vo.setAvgValue(Double.valueOf(df.format(statisticalDataDTO.getValue())));
|
||||
}
|
||||
vo.setPhase(item2.getPhase());
|
||||
vo.setOtherName(i + "次" + "(" + item2.getUnit() + ")");
|
||||
vo.setSort(item2.getSort());
|
||||
@@ -178,8 +188,12 @@ public class DataServiceImpl implements IDataService {
|
||||
vo.setId(item2.getId());
|
||||
vo.setName(item2.getName().concat("_").concat(Integer.toString(i)));
|
||||
StatisticalDataDTO statisticalDataDTO = commonService.getLineRtData(lineId,influxDbParamUtil.getTableNameByClassId(item2.getClassId()),item2.getName().concat("_").concat(Integer.toString(i)),item2.getPhase(),"avg",influxDbParamUtil.getClDidByLineId(lineId));
|
||||
if (Objects.isNull(statisticalDataDTO)) {
|
||||
vo.setAvgValue(3.14159);
|
||||
} else {
|
||||
vo.setTime(statisticalDataDTO.getTime());
|
||||
vo.setAvgValue(Double.valueOf(df.format(statisticalDataDTO.getValue())));
|
||||
}
|
||||
vo.setPhase(item2.getPhase());
|
||||
vo.setOtherName((i-0.5) + "次" + "(" + item2.getUnit() + ")");
|
||||
vo.setSort(item2.getSort());
|
||||
|
||||
Reference in New Issue
Block a user