Procházet zdrojové kódy

1.eol文件添加层高 A 解析

wangt před 1 rokem
rodič
revize
0dc5fcbab2

+ 12 - 7
neim-biz/src/main/java/com/jiayue/biz/service/impl/AnalysisDataImpl.java

@@ -1086,7 +1086,9 @@ public class AnalysisDataImpl {
                 String s1 = this.assembleWind(str, wsHeight, wdHeight);
                 //修改表头
                 csvRow.set(i, s1);
-
+                if(str.equals("-")){
+                    str = "-0.99";
+                }
                 hashMap.put(row.get(i), str);
             }
             //过滤数据
@@ -1199,13 +1201,13 @@ public class AnalysisDataImpl {
             String height = "";
             if (!s.contains("TI")) {
                 if(s.contains("K620Ab")){
-                    wsHeight.add("160A");
-                }
-                String[] strSp = wsAndType.split("_");
-                if (strSp.length > 0) {
-                    height = CalculationUtil.getNumberFromString(strSp[1]);
+                    height = "160A";
+                }else {
+                    String[] strSp = wsAndType.split("_");
+                    if (strSp.length > 0) {
+                        height = CalculationUtil.getNumberFromString(strSp[1]);
+                    }
                 }
-
                 wsHeight.add(height);
             }
             //ave/min/max/sta
@@ -1233,6 +1235,9 @@ public class AnalysisDataImpl {
         } else if (s.contains("TEM")) {
             String type = this.assembleProperty(s);
             str = "t" + type;
+        }else if (s.contains("RH")) {
+            String type = this.assembleProperty(s);
+            str = "rh" + type;
         }
         return str;
     }

+ 1 - 1
neim-biz/src/main/java/com/jiayue/biz/service/impl/WindTowerInfoServiceImpl.java

@@ -172,7 +172,7 @@ public class WindTowerInfoServiceImpl extends ServiceImpl<WindTowerInfoMapper, W
         Map<String, String> map;
 
         SortListUtil<WindTowerInfo> sortList = new SortListUtil<WindTowerInfo>();
-        sortList.Sort(windTowerInfos, "getCreateTime", null);
+        sortList.Sort(windTowerInfos, "getCreateTime", "a");
         for (WindTowerInfo w : windTowerInfos) {
             map = new HashMap<>();
             map.put("value", w.getEquipmentNo());

+ 1 - 5
neim-biz/src/main/java/com/jiayue/biz/util/SortListUtil.java

@@ -33,11 +33,7 @@ public class SortListUtil<E> {
                                 .compareTo(method2.invoke(o2, null).toString());
                     }
 
-                } catch (NoSuchMethodException e) {
-                    e.printStackTrace();
-                } catch (IllegalAccessException e) {
-                    e.printStackTrace();
-                } catch (InvocationTargetException e) {
+                } catch (Exception e) {
                     e.printStackTrace();
                 }
                 return ret;