瀏覽代碼

bug修复

wangb 2 月之前
父節點
當前提交
2dc7ef43f7
共有 1 個文件被更改,包括 54 次插入54 次删除
  1. 54 54
      runeconomy-xk/src/main/java/com/gyee/runeconomy/util/realtimesource/EdosUtil.java

+ 54 - 54
runeconomy-xk/src/main/java/com/gyee/runeconomy/util/realtimesource/EdosUtil.java

@@ -686,61 +686,61 @@ public class EdosUtil implements IEdosUtil {
                 ResponseEntity<JSONArray> resp = restTemplate.getForEntity(url, JSONArray.class);
                 JSONArray jsonArray = resp.getBody();
                 if (jsonArray != null) {
-                    List<PointData> snapList = JsonObjectHelper.phrasePointData(jsonArray, point.getNemCode());
-                    List<PointData> resultList = new ArrayList<>();
-
-                    if (snapList.isEmpty()) {
-
-                        getHistsnapSameTiem(point.getNemCode(), beginDate, pried, resultList);
-                    } else {
-                        for (PointData snapItem : snapList) {
-                            long subTime = snapItem.getPointTime() - pried;
-                            //查询时间区间的截面值(截面值为传入时间节点的上一个最近值,返回时间为值的真实时间),
-                            // 再进行比较,若截面值的时间戳在以快照时间节点前推一个单位的时间区间中,
-                            // 则代表该时间节点快照有效,否则为0
-
-                            String rawUrl = baseURL + "/history/section?null=0&tagNames=" + point.getNemCode() + "&ts=" + snapItem.getPointTime();
-                            if (point.getTypeId().equals("G")) {
-                                rawUrl = baseURL2 + "/history/section?null=0&tagNames=" + point.getNemCode() + "&ts=" + snapItem.getPointTime();
-                            }
+                    List<PointData> resultList = JsonObjectHelper.phrasePointData(jsonArray, point.getNemCode());
+//                    List<PointData> resultList = new ArrayList<>();
 
-                            ResponseEntity<JSONObject> sectionResp = restTemplate.getForEntity(rawUrl, JSONObject.class);
-                            JSONObject jsonObjectSection = sectionResp.getBody();
-
-                            if (jsonObjectSection != null) {
-                                List<PointData> sectionlist = JsonObjectHelper.phrasePointData(jsonObjectSection);
-                                if (sectionlist.size() > 0) {
-                                    if (sectionlist.get(0).getPointTime() <= snapItem.getPointTime()) {
-                                        resultList.add(snapItem);
-                                    } else {
-                                        PointData data = new PointData();
-                                        data.setEdnaId(point.getNemCode());
-                                        data.setPointTime(snapItem.getPointTime());
-                                        data.setPointValue("0");
-                                        data.setPointName("1");
-                                        data.setPointValueInDouble(0.0);
-                                        resultList.add(data);
-                                    }
-                                } else {
-                                    PointData data = new PointData();
-                                    data.setEdnaId(point.getNemCode());
-                                    data.setPointTime(0l);
-                                    data.setPointValue("0");
-                                    data.setPointName("1");
-                                    data.setPointValueInDouble(0.0);
-                                    resultList.add(data);
-                                }
-                            } else {
-                                PointData data = new PointData();
-                                data.setEdnaId(point.getNemCode());
-                                data.setPointTime(0l);
-                                data.setPointValue("0");
-                                data.setPointName("1");
-                                data.setPointValueInDouble(0.0);
-                                resultList.add(data);
-                            }
-                        }
-                    }
+//                    if (snapList.isEmpty()) {
+//
+//                        getHistsnapSameTiem(point.getNemCode(), beginDate, pried, resultList);
+//                    } else {
+//                        for (PointData snapItem : snapList) {
+//                            long subTime = snapItem.getPointTime() - pried;
+//                            //查询时间区间的截面值(截面值为传入时间节点的上一个最近值,返回时间为值的真实时间),
+//                            // 再进行比较,若截面值的时间戳在以快照时间节点前推一个单位的时间区间中,
+//                            // 则代表该时间节点快照有效,否则为0
+//
+//                            String rawUrl = baseURL + "/history/section?null=0&tagNames=" + point.getNemCode() + "&ts=" + snapItem.getPointTime();
+//                            if (point.getTypeId().equals("G")) {
+//                                rawUrl = baseURL2 + "/history/section?null=0&tagNames=" + point.getNemCode() + "&ts=" + snapItem.getPointTime();
+//                            }
+//
+//                            ResponseEntity<JSONObject> sectionResp = restTemplate.getForEntity(rawUrl, JSONObject.class);
+//                            JSONObject jsonObjectSection = sectionResp.getBody();
+//
+//                            if (jsonObjectSection != null) {
+//                                List<PointData> sectionlist = JsonObjectHelper.phrasePointData(jsonObjectSection);
+//                                if (sectionlist.size() > 0) {
+//                                    if (sectionlist.get(0).getPointTime() <= snapItem.getPointTime()) {
+//                                        resultList.add(snapItem);
+//                                    } else {
+//                                        PointData data = new PointData();
+//                                        data.setEdnaId(point.getNemCode());
+//                                        data.setPointTime(snapItem.getPointTime());
+//                                        data.setPointValue("0");
+//                                        data.setPointName("1");
+//                                        data.setPointValueInDouble(0.0);
+//                                        resultList.add(data);
+//                                    }
+//                                } else {
+//                                    PointData data = new PointData();
+//                                    data.setEdnaId(point.getNemCode());
+//                                    data.setPointTime(0l);
+//                                    data.setPointValue("0");
+//                                    data.setPointName("1");
+//                                    data.setPointValueInDouble(0.0);
+//                                    resultList.add(data);
+//                                }
+//                            } else {
+//                                PointData data = new PointData();
+//                                data.setEdnaId(point.getNemCode());
+//                                data.setPointTime(0l);
+//                                data.setPointValue("0");
+//                                data.setPointName("1");
+//                                data.setPointValueInDouble(0.0);
+//                                resultList.add(data);
+//                            }
+//                        }
+//                    }
 
 
                     return resultList;