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