xiejun
2023-08-12 a19d26e88360c9760b2286bac4dfb1710fd2fa21
Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/util/VciBaseUtil.java
@@ -1318,7 +1318,7 @@
            }
         }
      }
      Map mapData = new HashMap<>();
      for (int i = 0, n = propertyDescriptors.length; i <n ; i++) {
         PropertyDescriptor descriptor = propertyDescriptors[i];
         String propertyName = descriptor.getName();
@@ -1330,16 +1330,7 @@
            if (result != null) {
               if ("data".equals(propertyName)){
                  if(existFild == null){
                     returnMap.putAll((Map) result);
                  }else{
                     Map resulMap = (Map) result;
                     for (Object o : resulMap.keySet()) {
                        if(existFild.contains(o)){
                           returnMap.put(o,resulMap.get(o));
                        }
                     }
                  }
                  mapData = (Map) result;
               }else if(existFild.contains((fieldMap.containsKey(propertyName)?fieldMap.get(propertyName):propertyName).toLowerCase())){
                  returnMap.put(fieldMap.containsKey(propertyName)?fieldMap.get(propertyName):propertyName, result);
               }
@@ -1348,6 +1339,17 @@
            }
         }
      }
      //作用主要用于已MAP中的数据为准,bean里面遇到字段相同也会进行覆盖。
      if(existFild == null){
         returnMap.putAll((Map) mapData);
      }else{
         Map resulMapChild = (Map) mapData;
         for (Object o : resulMapChild.keySet()) {
            if(existFild.contains(String.valueOf(o).toLowerCase())){
               returnMap.put(String.valueOf(o).toLowerCase(),resulMapChild.get(o));
            }
         }
      }
      return returnMap;
   }