Procházet zdrojové kódy

优化后台计算算法

shilin před 1 rokem
rodič
revize
0c82644aa1

+ 1 - 1
realtime/failurestatistics-server/src/main/java/com/gyee/failurestatistics/service/ShutdowneventService.java

@@ -55,7 +55,7 @@ public class ShutdowneventService {
                 if(StringUtils.notEmp(sd.getWindturbineId()) && StringUtils.notEmp(sd.getWindpowerstationId())  && CacheContext.wpmap.containsKey(sd.getWindpowerstationId()))
                 {
                     ProBasicPowerstation wp=CacheContext.wpmap.get(sd.getWindpowerstationId());
-                    String wpname=wp.getId().substring(0,wp.getId().indexOf("_"));
+                    String wpname=wp.getId().split("_")[2];
 
                     StringBuilder alerthistory1=new StringBuilder(ALARMHISTORY).append("_").append(wpname).append("_");
                     Calendar cal = Calendar.getInstance();