Quellcode durchsuchen

修改dat文件解析异常数据问题

hxf vor 1 Jahr
Ursprung
Commit
571fc1e24b

+ 3 - 6
wrdep-biz/src/main/java/com/jiayue/biz/service/impl/AnalysisDataImpl.java

@@ -1309,12 +1309,9 @@ public class AnalysisDataImpl {
         for (int i = 4; i < rows.size(); i++) {
             HashMap<String, Object> hashMap = new HashMap<>();
             for (int j = 0; j < rows.get(i).size(); j++) {
-                if (StrUtil.isNotBlank(rowsOne.get(j))) {
-                    if (rowsOne.get(j).equals("time")) {
-                        hashMap.put(rowsOne.get(j), rows.get(i).get(j));
-                    } else {
-                        hashMap.put(rowsOne.get(j), new BigDecimal(rows.get(i).get(j)));
-                    }
+                if (StrUtil.isNotBlank(rowsOne.get(j)) && !rows.get(i).get(j).contains("NAN")) {
+//                        (rows.get(i).get(j) == null || rows.get(i).get(j).equals("")) ? BigDecimal.ZERO : new BigDecimal(rows.get(i).get(j))
+                    hashMap.put(rowsOne.get(j), rows.get(i).get(j));
                 }
             }
             mapList.add(hashMap);

+ 0 - 2
wrdep-biz/src/main/java/com/jiayue/biz/service/impl/EmailImpl.java

@@ -572,8 +572,6 @@ public class EmailImpl extends ServiceImpl<EmailMapper, Email> implements EmailS
                 }
 
             }
-
-
         } catch (Exception e) {
             log.error("执行系统命令失败:" + e);
         }