|
@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Controller
|
|
@Controller
|
|
@RequestMapping("/powercompare")
|
|
@RequestMapping("/powercompare")
|
|
@@ -355,8 +356,10 @@ public class PowerCompareController {
|
|
if(vos !=null && !vos.isEmpty())
|
|
if(vos !=null && !vos.isEmpty())
|
|
{
|
|
{
|
|
|
|
|
|
-
|
|
|
|
- Optional<Windturbineinfoday3> maxEmp= vos.stream().filter(Objects::nonNull).max(Comparator.comparingDouble(Windturbineinfoday3 ::getTotal));
|
|
|
|
|
|
+ List<Windturbineinfoday3> taglist=vos.stream()
|
|
|
|
+ .filter(Windturbineinfoday3->(!Windturbineinfoday3.getWtName().equals("合计")))
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
+ Optional<Windturbineinfoday3> maxEmp= taglist.stream().filter(Objects::nonNull).max(Comparator.comparingDouble(Windturbineinfoday3 ::getTotal));
|
|
Windturbineinfoday3 wi3 = maxEmp.orElse(new Windturbineinfoday3());
|
|
Windturbineinfoday3 wi3 = maxEmp.orElse(new Windturbineinfoday3());
|
|
double xAxis=wi3.getTotal();
|
|
double xAxis=wi3.getTotal();
|
|
for (int i=0;i<vos.size();i++)
|
|
for (int i=0;i<vos.size();i++)
|
|
@@ -442,7 +445,11 @@ public class PowerCompareController {
|
|
{
|
|
{
|
|
|
|
|
|
|
|
|
|
- Optional<Windpowerinfoday3> maxEmp= vos.stream().filter(Objects::nonNull).max(Comparator.comparingDouble(Windpowerinfoday3 ::getTotal));
|
|
|
|
|
|
+ List<Windpowerinfoday3> taglist=vos.stream()
|
|
|
|
+ .filter(Windpowerinfoday3->(!Windpowerinfoday3.getWtName().equals("合计")))
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
+
|
|
|
|
+ Optional<Windpowerinfoday3> maxEmp= taglist.stream().filter(Objects::nonNull).max(Comparator.comparingDouble(Windpowerinfoday3 ::getTotal));
|
|
Windpowerinfoday3 wi3 = maxEmp.orElse(new Windpowerinfoday3());
|
|
Windpowerinfoday3 wi3 = maxEmp.orElse(new Windpowerinfoday3());
|
|
double xAxis=wi3.getTotal();
|
|
double xAxis=wi3.getTotal();
|
|
for (int i=0;i<vos.size();i++)
|
|
for (int i=0;i<vos.size();i++)
|