소스 검색

Merge remote-tracking branch 'origin/master'

宁檬 1 년 전
부모
커밋
6c551f8ee1

+ 18 - 0
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/dto/MaxVo.java

@@ -7,6 +7,8 @@ public class MaxVo {
     private String id;
     private String name;
     private Double maxs;
+    private Double mins;
+    private Double aves;
     private long time;
 
     public String getId() {
@@ -40,4 +42,20 @@ public class MaxVo {
     public void setTime(long time) {
         this.time = time;
     }
+
+    public Double getMins() {
+        return mins;
+    }
+
+    public void setMins(Double mins) {
+        this.mins = mins;
+    }
+
+    public Double getAves() {
+        return aves;
+    }
+
+    public void setAves(Double aves) {
+        this.aves = aves;
+    }
 }

+ 6 - 20
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/service/Economic/EconomicService.java

@@ -104,7 +104,7 @@ public class EconomicService {
             gsls = station1ls.stream().filter(wp -> wp != null && "JS_RGN-2".contains(wp.getRegionId()) && date.equals(wp.getRecordDate())).collect(Collectors.toList());
             trls = treels.stream().filter(wp -> wp.getId().endsWith("STA")).collect(Collectors.toList());
         } else {
-            gsls = station1ls.stream().filter(wp -> "STA".contains(wp.getForeignKeyId()) && date.equals(wp.getRecordDate())).collect(Collectors.toList());
+            gsls = station1ls.stream().filter(wp -> wp.getForeignKeyId().contains("STA") && date.equals(wp.getRecordDate())).collect(Collectors.toList());
             trls = treels.stream().filter(wp -> wp.getParentCode().endsWith(companyId)).collect(Collectors.toList());
         }
 
@@ -532,27 +532,15 @@ public class EconomicService {
             MaxVo maxVo = new MaxVo();
             temp2 = maxs.get(0).getPointValueInDouble();
             maxVo.setMaxs(StringUtils.round(temp2, 2));
-            maxVo.setName(wt2.getName());
-            maxVo.setId(wt2.getId());
-            maxVo.setTime(maxs.get(0).getPointTime());
 
-            MinVo minVo = new MinVo();
             temp3 = mins.get(0).getPointValueInDouble();
-            minVo.setMins(StringUtils.round(temp3, 2));
-            minVo.setName(wt2.getName());
-            minVo.setId(wt2.getId());
-            minVo.setTime(mins.get(0).getPointTime());
+            maxVo.setMins(StringUtils.round(temp3, 2));
 
-            AveVo aveVo = new AveVo();
             temp4 = ave.get(0).getPointValueInDouble();
-            aveVo.setAves(StringUtils.round(temp4, 2));
-            aveVo.setName(wt2.getName());
-            aveVo.setId(wt2.getId());
-            aveVo.setTime(ave.get(0).getPointTime());
+            maxVo.setAves(StringUtils.round(temp4, 2));
+
 
             maxvalue.add(maxVo);
-            minvalue.add(minVo);
-            avevalue.add(aveVo);
 
         }
 
@@ -568,10 +556,8 @@ public class EconomicService {
 
 
         Map<String, Object> map = new LinkedHashMap<>();
-//        map.put("result", result);
-        map.put("maxs", maxvalue);
-        map.put("mins", minvalue);
-        map.put("aves", avevalue);
+
+        map.put("value", maxvalue);
         map.put("list", vo);