bug调整
This commit is contained in:
@@ -331,7 +331,6 @@ public class CsGroupServiceImpl extends ServiceImpl<CsGroupMapper, CsGroup> impl
|
||||
vo.setTime(temp.getTime());
|
||||
vo.setStatMethod(temp.getValueType());
|
||||
vo.setStatisticalData(Double.valueOf(df.format(temp.getValue())));
|
||||
vo.setUnit(epdPqd.getUnit());
|
||||
if(temp.getValue()!=null) {
|
||||
double re;
|
||||
if (Objects.equals("Primary",commonStatisticalQueryParam.getDataLevel())) {
|
||||
@@ -343,6 +342,9 @@ public class CsGroupServiceImpl extends ServiceImpl<CsGroupMapper, CsGroup> impl
|
||||
re = DataChangeUtil.secondaryToPrimary(epdPqd.getPrimaryFormula(), temp.getValue(), pt, ct) / 1000;
|
||||
vo.setStatisticalData(Double.valueOf(df.format(re)));
|
||||
vo.setUnit("k" + epdPqd.getUnit());
|
||||
} else {
|
||||
vo.setStatisticalData(Double.valueOf(df.format(temp.getValue())));
|
||||
vo.setUnit(epdPqd.getUnit());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -350,13 +352,16 @@ public class CsGroupServiceImpl extends ServiceImpl<CsGroupMapper, CsGroup> impl
|
||||
if (HarmonicConstant.POWER_LIST.contains(epdPqd.getShowName())) {
|
||||
re = DataChangeUtil.primaryToSecondary(epdPqd.getPrimaryFormula(), temp.getValue(), pt, ct);
|
||||
vo.setStatisticalData(Double.valueOf(df.format(re)));
|
||||
} else {
|
||||
vo.setStatisticalData(Double.valueOf(df.format(temp.getValue())));
|
||||
vo.setUnit(epdPqd.getUnit());
|
||||
}
|
||||
} else {
|
||||
vo.setStatisticalData(Double.valueOf(df.format(temp.getValue())));
|
||||
}
|
||||
vo.setUnit(epdPqd.getUnit());
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
vo.setStatisticalData(null);
|
||||
}
|
||||
vo.setStatisticalIndex(epdPqd.getId());
|
||||
|
||||
@@ -407,23 +407,21 @@ public class WlRecordServiceImpl extends ServiceImpl<WlRecordMapper, WlRecord> i
|
||||
}
|
||||
//格式化前端参数
|
||||
formatQueryParamList(commonStatisticalQueryParam);
|
||||
if(commonStatisticalQueryParam.getList() != null && commonStatisticalQueryParam.getList().size() > 0){
|
||||
if(commonStatisticalQueryParam.getList() != null && !commonStatisticalQueryParam.getList().isEmpty()){
|
||||
for (CommonStatisticalQueryParam param : commonStatisticalQueryParam.getList()){
|
||||
if(param.getStatisticalId() == null){
|
||||
continue;
|
||||
}
|
||||
List<EleEpdPqd> eleEpdPqds = csStatisticalSetFeignClient.queryStatisticalSelect(param.getStatisticalId()).getData();
|
||||
|
||||
for(WlRecord wl : data){
|
||||
List<CsLinePO> finalCsLinePOList = csLineFeignClient.queryLineById(Arrays.asList(wl.getLineId())).getData();
|
||||
CsDataSet csDataSet = csDataSetMapper.selectOne(new LambdaQueryWrapper<CsDataSet>().eq(CsDataSet::getId,finalCsLinePOList.get(0).getDataSetId()));
|
||||
if(Objects.isNull(csDataSet) || StrUtil.isBlank(csDataSet.getDataLevel())){
|
||||
if(StrUtil.isBlank(csDataSet.getDataLevel())){
|
||||
throw new BusinessException("当前测点数据集主要信息缺失,请联系管理员排查(测点表里面数据集id缺失)");
|
||||
}
|
||||
Double ct = Double.valueOf(wlRecord.getCt())/wlRecord.getCt1();
|
||||
Double pt =Double.valueOf(wlRecord.getPt())/wlRecord.getPt1();
|
||||
|
||||
|
||||
List<CsEquipmentDeliveryDTO> data1 = equipmentFeignClient.queryDeviceById(Stream.of(wl.getDevId()).collect(Collectors.toList())).getData();
|
||||
eleEpdPqds.forEach(epdPqd->{
|
||||
List<CommonQueryParam> commonQueryParams = finalCsLinePOList.stream().map(temp -> {
|
||||
@@ -443,7 +441,6 @@ public class WlRecordServiceImpl extends ServiceImpl<WlRecordMapper, WlRecord> i
|
||||
//此处设空时为了有多段时将线条断开前端显示
|
||||
if(!CollectionUtils.isEmpty(deviceRtData)){
|
||||
deviceRtData.get(deviceRtData.size()-1).setValue(null);
|
||||
|
||||
}
|
||||
List<ThdDataVO> collect1 = deviceRtData.stream().map(temp -> {
|
||||
ThdDataVO vo = new ThdDataVO();
|
||||
@@ -453,7 +450,6 @@ public class WlRecordServiceImpl extends ServiceImpl<WlRecordMapper, WlRecord> i
|
||||
vo.setPosition(position);
|
||||
vo.setTime(temp.getTime());
|
||||
vo.setStatMethod(temp.getValueType());
|
||||
vo.setUnit(epdPqd.getUnit());
|
||||
if(temp.getValue()!=null) {
|
||||
double re;
|
||||
if (Objects.equals("Primary",commonStatisticalQueryParam.getDataLevel())) {
|
||||
@@ -465,6 +461,9 @@ public class WlRecordServiceImpl extends ServiceImpl<WlRecordMapper, WlRecord> i
|
||||
re = DataChangeUtil.secondaryToPrimary(epdPqd.getPrimaryFormula(), temp.getValue(), pt, ct) / 1000;
|
||||
vo.setStatisticalData(Double.valueOf(df.format(re)));
|
||||
vo.setUnit("k" + epdPqd.getUnit());
|
||||
} else {
|
||||
vo.setStatisticalData(Double.valueOf(df.format(temp.getValue())));
|
||||
vo.setUnit(epdPqd.getUnit());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -472,13 +471,16 @@ public class WlRecordServiceImpl extends ServiceImpl<WlRecordMapper, WlRecord> i
|
||||
if (HarmonicConstant.POWER_LIST.contains(epdPqd.getShowName())) {
|
||||
re = DataChangeUtil.primaryToSecondary(epdPqd.getPrimaryFormula(), temp.getValue(), pt, ct);
|
||||
vo.setStatisticalData(Double.valueOf(df.format(re)));
|
||||
} else {
|
||||
vo.setStatisticalData(Double.valueOf(df.format(temp.getValue())));
|
||||
vo.setUnit(epdPqd.getUnit());
|
||||
}
|
||||
} else {
|
||||
vo.setStatisticalData(Double.valueOf(df.format(temp.getValue())));
|
||||
}
|
||||
vo.setUnit(epdPqd.getUnit());
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
vo.setStatisticalData(null);
|
||||
}
|
||||
vo.setStatisticalIndex(epdPqd.getId());
|
||||
|
||||
Reference in New Issue
Block a user