浏览代码

fix : 质量报告bug测试

lvxianyun 3 年之前
父节点
当前提交
903ffca75b
共有 1 个文件被更改,包括 10 次插入8 次删除
  1. 10 8
      src/main/java/com/persagy/proxy/report/controller/AdmReportEquipController.java

+ 10 - 8
src/main/java/com/persagy/proxy/report/controller/AdmReportEquipController.java

@@ -978,7 +978,7 @@ public class AdmReportEquipController {
 
         if(CollUtil.isNotEmpty(objList)) {
             for (int i = 0; i < objList.size(); i++) {
-                JsonNode objectNode = objList.get(i);//JsonNodeUtils.toObjectNode(objList.get(i), "infos", null);
+                JsonNode objectNode = objList.get(i);
                 Iterator<ObjectInfoDefine> iterator1 = staticInfoPointCodes.iterator();
                 while (iterator1.hasNext()) {
                     ObjectInfoDefine infoDefine = iterator1.next();
@@ -1068,13 +1068,15 @@ public class AdmReportEquipController {
     private Map<String,Object> calculateInfoPoints(String str, String type, List<ObjectInfoDefine> infoPointCodes) {
         int counts = 0;
         Map<String,Object> hashMap = new HashMap<String,Object>();
-        Iterator<ObjectInfoDefine> iterator = infoPointCodes.iterator();
-        while (iterator.hasNext()){
-            ObjectInfoDefine nextInfo = iterator.next();
-            if(str.contains(nextInfo.getCode()) && type.equals(nextInfo.getClassCode())){
-                counts ++;
-                hashMap.put("next", nextInfo);
-                iterator.remove();
+        if(!str.equals("{}")){
+            Iterator<ObjectInfoDefine> iterator = infoPointCodes.iterator();
+            while (iterator.hasNext()){
+                ObjectInfoDefine nextInfo = iterator.next();
+                if(str.contains(nextInfo.getCode()) && type.equals(nextInfo.getClassCode())){
+                    counts ++;
+                    hashMap.put("next", nextInfo);
+                    iterator.remove();
+                }
             }
         }
         hashMap.put("counts", counts);