| | |
| | | public class FaceUtil { |
| | | |
| | | |
| | | public static List<JSONObject> getFaceControlList(FieldSetEntity face,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() |
| | |
| | | List<FieldSetEntity> propertyList = entry.getValue(); |
| | | JSONObject propertyJson = getPropertyJson(propertyList, groupContainer); |
| | | Boolean eventProperty = propertyJson.getBoolean("event_property"); |
| | | if(eventProperty!=null && eventProperty){ |
| | | face.setValue("events",propertyJson.get("events")); |
| | | if (eventProperty != null && eventProperty && propertyJson.get("event_array") != null) { |
| | | JSONArray eventArray = propertyJson.getJSONArray("event_array"); |
| | | for (int i = 0; i < eventArray.size(); i++) { |
| | | String params = eventArray.getJSONObject(i).getString("params"); |
| | | String[] paramsArray; |
| | | if (StringUtils.isEmpty(params)) { |
| | | paramsArray = new String[]{}; |
| | | } else { |
| | | paramsArray = params.split(","); |
| | | } |
| | | eventArray.getJSONObject(i).put("params", paramsArray); |
| | | } |
| | | face.setValue("events", eventArray); |
| | | continue; |
| | | } |
| | | result.add(propertyJson); |