许鹏程
2023-06-01 48989d38c871957d33c58c9ac7f162bad7d9fb97
src/main/java/com/product/face/util/FaceUtil.java
@@ -23,7 +23,7 @@
public class FaceUtil {
   public static List<JSONObject> getFaceControlList(DataTableEntity faceControlDt) {
   public static List<JSONObject> getFaceControlList(FieldSetEntity face,DataTableEntity faceControlDt) {
      List<JSONObject> result = new ArrayList<>();
      List<FieldSetEntity> data = faceControlDt.getData();
      Map<String, List<FieldSetEntity>> collect = data.stream()
@@ -35,7 +35,13 @@
            .collect(Collectors.groupingBy(item -> item.getString(FaceConst.FIELD_PARENT_UUID))); //分组
      for (Map.Entry<String, List<FieldSetEntity>> entry : collect.entrySet()) {
         List<FieldSetEntity> propertyList = entry.getValue();
         result.add(getPropertyJson(propertyList, groupContainer));
         JSONObject propertyJson = getPropertyJson(propertyList, groupContainer);
         Boolean eventProperty = propertyJson.getBoolean("event_property");
         if(eventProperty!=null && eventProperty){
            face.setValue("events",propertyJson.get("events"));
            continue;
         }
         result.add(propertyJson);
      }
      result.sort(Comparator.comparing(item -> item.getInteger(FaceConst.CONTROL_SEQUENCE)));
      return result;