代码调整

This commit is contained in:
2023-12-15 15:01:22 +08:00
parent a1b669264a
commit a8ab09234a
15 changed files with 139 additions and 11 deletions

View File

@@ -55,6 +55,7 @@ public class PointStatisticalDataServiceImpl extends ServiceImpl<RUploadPointSta
pageVo.setPages(page.getPages());
pageVo.setSize(page.getSize());
pageVo.setRecords(voList);
pageVo.setCurrent(page.getCurrent());
return pageVo;
}
@@ -62,7 +63,7 @@ public class PointStatisticalDataServiceImpl extends ServiceImpl<RUploadPointSta
public String uploadPointStatisticalData(UploadParam param) {
List<RUploadPointStatisticalDataD> list;
//指定数据上送,不管之前有没有上送,都重新上送一次
//(预防之前上过,修改数据后需要再次上送)
//(预防之前上过,修改数据后需要再次上送)
if (CollectionUtil.isNotEmpty(param.getList())){
list = this.lambdaQuery()
.eq(RUploadPointStatisticalDataD::getStatisticalDate,param.getTime())

View File

@@ -27,6 +27,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.ListUtils;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@@ -61,6 +62,7 @@ public class REvaluationDataServiceImpl extends ServiceImpl<RUploadEvaluationDat
pageVo.setPages(page.getPages());
pageVo.setSize(page.getSize());
pageVo.setRecords(voList);
pageVo.setCurrent(page.getCurrent());
return pageVo;
}
@@ -68,7 +70,7 @@ public class REvaluationDataServiceImpl extends ServiceImpl<RUploadEvaluationDat
public String uploadEvaluationData(UploadParam param) {
List<RUploadEvaluationDataD> list;
//指定数据上送,不管之前有没有上送,都重新上送一次
//(预防之前上过,修改数据后需要再次上送)
//(预防之前上过,修改数据后需要再次上送)
if (CollectionUtil.isNotEmpty(param.getList())){
list = this.lambdaQuery()
.eq(RUploadEvaluationDataD::getStatisticalDate,param.getTime())
@@ -91,10 +93,17 @@ public class REvaluationDataServiceImpl extends ServiceImpl<RUploadEvaluationDat
List<PqEvaluationCreateDTO> l1 = pendingIds.get(i).stream().peek(item->{
if (Objects.equals(item.getAvgValue(),3.1415926)){
item.setAvgValue(0d);
} else {
BigDecimal four = BigDecimal.valueOf(item.getAvgValue());
double value = four.setScale(4,BigDecimal.ROUND_HALF_UP).doubleValue();
item.setAvgValue(value);
}
if (Objects.equals(item.getStandardDeviation(),3.1415926)){
item.setStandardDeviation(0d);
}
BigDecimal four = BigDecimal.valueOf(item.getMonitorBusRate());
double value = four.setScale(4,BigDecimal.ROUND_HALF_UP).doubleValue();
item.setMonitorBusRate(value);
}).collect(Collectors.toList());
//组装数据
SendParam sp = new SendParam();

View File

@@ -60,6 +60,7 @@ public class RSubstationStatisticalDataServiceImpl extends ServiceImpl<RUploadSu
pageVo.setPages(page.getPages());
pageVo.setSize(page.getSize());
pageVo.setRecords(voList);
pageVo.setCurrent(page.getCurrent());
return pageVo;
}
@@ -68,7 +69,7 @@ public class RSubstationStatisticalDataServiceImpl extends ServiceImpl<RUploadSu
List<RUploadSubstationStatisticalDataD> list;
//指定数据上送,不管之前有没有上送,都重新上送一次
//(预防之前上过,修改数据后需要再次上送)
//(预防之前上过,修改数据后需要再次上送)
if (CollectionUtil.isNotEmpty(param.getList())){
list = this.lambdaQuery()
.eq(RUploadSubstationStatisticalDataD::getStatisticalDate,param.getTime())