Browse Source

代码修改

wangchangsheng 2 years ago
parent
commit
633fcff734

+ 2 - 3
web/monitor-web-sxjn/src/main/java/com/gyee/frame/service/peranalysis/EBApersisService.java

@@ -4,6 +4,7 @@ package com.gyee.frame.service.peranalysis;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.TypeReference;
 import com.gyee.frame.common.cache.IGlobalCache;
+import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.model.auto.WindpowerstationPG;
 import com.gyee.frame.model.auto.Windpowerstationpointnew;
 import com.gyee.frame.model.custom.DNAVal;
@@ -47,9 +48,7 @@ public class EBApersisService {
         List<WindpowerstationPG> list = windpowerstationPGService.findWindpowerstationPG(companyid, regionid, station);
         for (WindpowerstationPG wp : list) {
             EBAPerSisVo vo = new EBAPerSisVo();
-            String wpString = JSONObject.toJSONString(globalCache.get(wp.getId()));
-            Map<String, Windpowerstationpointnew> stringMapMap = JSONObject.parseObject(wpString, new TypeReference<Map<String, Windpowerstationpointnew>>() {
-            });
+            Map<String, Windpowerstationpointnew> stringMapMap = InitialRunner.wpPointmap.get(wp.getId());
 
             String[] points = {stringMapMap.get("YPJFS").getCode(),
                     stringMapMap.get("YFDL").getCode(),

+ 4 - 7
web/monitor-web-sxjn/src/main/java/com/gyee/frame/service/peranalysis/ElePerAnalysisService.java

@@ -4,10 +4,8 @@ package com.gyee.frame.service.peranalysis;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.TypeReference;
 import com.gyee.frame.common.cache.IGlobalCache;
-import com.gyee.frame.model.auto.ProjectplanPG;
-import com.gyee.frame.model.auto.Windpowerinfoday;
-import com.gyee.frame.model.auto.WindpowerstationPG;
-import com.gyee.frame.model.auto.Windpowerstationpointnew;
+import com.gyee.frame.common.spring.InitialRunner;
+import com.gyee.frame.model.auto.*;
 import com.gyee.frame.model.custom.DNAVal;
 import com.gyee.frame.model.custom.ElePerAnalysisVo;
 import com.gyee.frame.service.*;
@@ -54,9 +52,8 @@ public class ElePerAnalysisService {
 
         List<WindpowerstationPG> list = windpowerstationPGService.findWindpowerstationPG(companyid, regionid, station);
         for (WindpowerstationPG wp : list) {
-            String wpString = JSONObject.toJSONString(globalCache.get(wp.getId()));
-            Map<String, Windpowerstationpointnew> stringMapMap = JSONObject.parseObject(wpString, new TypeReference<Map<String, Windpowerstationpointnew>>() {
-            });
+
+            Map<String, Windpowerstationpointnew> stringMapMap = InitialRunner.wpPointmap.get(wp.getId());
 
 
             Calendar calendar = Calendar.getInstance();