Commit a589cb9f authored by 高建强's avatar 高建强

item:稳压泵指标统计优化

parent c8794cad
......@@ -358,10 +358,14 @@ public class PressurePumpServiceImpl implements IPressurePumpService {
// 获取指定之前时间,指定值数据
List<IotDataVO> dataFilterList = getDataListFilter(dataPipeList, stop5BeforeDate);
if (CollectionUtils.isNotEmpty(dataFilterList)) {
double val1 = Double.parseDouble(dataPipeList.get(0).getValue().toString());
double val2 = Double.parseDouble(dataFilterList.get(dataFilterList.size() - 1).getValue().toString());
Object value1 = dataPipeList.get(0).getValue();
Object value2 = dataPipeList.get(dataFilterList.size() - 1).getValue();
if (!ObjectUtils.isEmpty(value1) && !ObjectUtils.isEmpty(value2)) {
double val1 = Double.parseDouble(value1.toString());
double val2 = Double.parseDouble(value2.toString());
return Math.abs(val1 - val2);
}
}
} catch (ParseException e) {
log.error("获取所有稳压泵管网压力差失败:{}", e.getMessage());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment