Kaynağa Gözat

增加排序字段

xieshengjie 2 yıl önce
ebeveyn
işleme
bdfff13aac

+ 4 - 2
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/monitor/MatrixService.java

@@ -7,6 +7,7 @@ package com.gyee.runeconomy.service.monitor;
 import com.gyee.common.contant.ContantXk;
 import com.gyee.common.model.PointData;
 import com.gyee.common.util.DoubleUtils;
+import com.gyee.common.util.SortUtils;
 import com.gyee.common.vo.monitor.MatrixLineVo;
 import com.gyee.common.vo.monitor.MatrixPowerVo;
 import com.gyee.common.vo.monitor.MatrixProVo;
@@ -70,7 +71,7 @@ public class MatrixService {
         AtomicReference<Double> qf2 = new AtomicReference<>((double) 0);
         AtomicReference<Double> qf3 = new AtomicReference<>((double) 0);
         AtomicReference<Double> qf4 = new AtomicReference<>((double) 0);
-        wpls.stream().forEach(wp -> {
+        wpls.parallelStream().forEach(wp -> {
             List<MatrixVo> volist = new ArrayList<>();
             List<String> wpPoints = new ArrayList<>();
             List<String> wtPoints = new ArrayList<>();
@@ -126,6 +127,7 @@ public class MatrixService {
                 MatrixPowerVo powerVo = new MatrixPowerVo();
                 powerVo.setWpid(wp.getId());
                 powerVo.setWpname(wp.getAname());
+                powerVo.setOrderNum(wp.getOrderNum());
                 if (wp.getWindType().equals("-1")){
                     powerVo.setCzlx("-1");
                 }else if(wp.getWindType().equals("-2")){
@@ -221,7 +223,7 @@ public class MatrixService {
 
 
         });
-
+        SortUtils.sort(powerVos,"orderNum",SortUtils.ASC);
         Map<String, Object> dataMap = new HashMap<>();
         dataMap.put("jrts", jrts.doubleValue());
         dataMap.put("dfts", dfts.doubleValue());