Commit 562c412f authored by caotao's avatar caotao

业务接口查询慢问题修改

parent 94c8e664
......@@ -56,7 +56,7 @@ public class CommonServiceImpl {
}
public Double getTotalByIndicatior(List<Map<String,Object>> mapList,String indicator){
Double totalvalue = 0.0;
totalvalue =mapList.stream().filter(stringObjectMap ->stringObjectMap.get("equipmentIndexName").toString().contains("indicator")&&!ObjectUtils.isEmpty(stringObjectMap.get("value"))).mapToDouble(l->Double.parseDouble((String) l.get("value"))).sum();
totalvalue =mapList.stream().filter(stringObjectMap ->stringObjectMap.get("equipmentIndexName").toString().contains(indicator)&&!ObjectUtils.isEmpty(stringObjectMap.get("value"))).mapToDouble(l->Double.parseDouble((String) l.get("value"))).sum();
return Double.valueOf(String.format("%.2f",totalvalue));
}
/**
......@@ -67,7 +67,7 @@ public class CommonServiceImpl {
*/
public Double getAvgvalueByIndicatior(List<Map<String,Object>> mapList,String indicator){
Double avageValue = 0.0;
avageValue =mapList.stream().filter(stringObjectMap ->stringObjectMap.get("equipmentIndexName").toString().contains("indicator")&&!ObjectUtils.isEmpty(stringObjectMap.get("value"))).mapToDouble(l->Double.parseDouble((String) l.get("value"))).sum();
avageValue =mapList.stream().filter(stringObjectMap ->stringObjectMap.get("equipmentIndexName").toString().contains(indicator)&&!ObjectUtils.isEmpty(stringObjectMap.get("value"))).mapToDouble(l->Double.parseDouble((String) l.get("value"))).sum();
return Double.valueOf(String.format("%.2f",avageValue));
}
public Double getStationCapactityByStationWerks(String WERKS){
......
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