From 605578732df221ebfef66d07d87ec63e4317595a Mon Sep 17 00:00:00 2001
From: 许鹏程 <1821349743@qq.com>
Date: 星期三, 25 九月 2024 09:29:03 +0800
Subject: [PATCH] 移动端获取表单组件字段,修正子表获取字段

---
 src/main/java/com/product/mobile/core/entity/FaceFieldEntity.java    |   14 ++++++++++++++
 src/main/java/com/product/mobile/core/service/FaceMobileService.java |    9 +++++----
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/product/mobile/core/entity/FaceFieldEntity.java b/src/main/java/com/product/mobile/core/entity/FaceFieldEntity.java
index 840e556..ba6fa79 100644
--- a/src/main/java/com/product/mobile/core/entity/FaceFieldEntity.java
+++ b/src/main/java/com/product/mobile/core/entity/FaceFieldEntity.java
@@ -1,5 +1,6 @@
 package com.product.mobile.core.entity;
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -86,6 +87,7 @@
 
 	private List<FaceFieldEntity> subField;
 
+	private Map<String, Object> otherParams = new HashMap<>();
 
 	public String getFieldName() {
 		return fieldName;
@@ -230,4 +232,16 @@
 	public void setSubField(List<FaceFieldEntity> subField) {
 		this.subField = subField;
 	}
+
+	public Map<String, Object> getOtherParams() {
+		return otherParams;
+	}
+
+	public void setOtherParams(Map<String, Object> otherParams) {
+		this.otherParams = otherParams;
+	}
+
+	public Object putOtherParam(String key, Object value) {
+		return otherParams.put(key, value);
+	}
 }
diff --git a/src/main/java/com/product/mobile/core/service/FaceMobileService.java b/src/main/java/com/product/mobile/core/service/FaceMobileService.java
index d87f095..1f3332c 100644
--- a/src/main/java/com/product/mobile/core/service/FaceMobileService.java
+++ b/src/main/java/com/product/mobile/core/service/FaceMobileService.java
@@ -137,7 +137,7 @@
 				continue;
 			}
 
-			to(groupMap, fieldSetEntity, subTableField, result,parentMap);
+			to(groupMap, fieldSetEntity, subTableField, result, parentMap);
 		}
 		if (!CollectionUtil.isEmpty(subTableField)) {
 			//鏍规嵁瀛愯〃琛ㄥ悕瑁呰浇
@@ -220,7 +220,6 @@
 	}
 
 
-
 	private void to(Map<String, List<FieldSetEntity>> groupMap, List<FieldSetEntity> fieldSetEntity, List<List<FieldSetEntity>> subTableField, List<FaceFieldEntity> result, Map<String, List<FieldSetEntity>> parentMap) {
 		FieldSetEntity parent = fieldSetEntity.get(0);
 		String groupUuid1 = parent.getString("group_uuid");
@@ -229,7 +228,6 @@
 		}
 		List<FieldSetEntity> parentGroup = groupMap.get(groupUuid1);
 		FaceFieldEntity faceFieldEntity = new FaceFieldEntity();
-		boolean parentType = false;
 		String __config__ = null;
 		List<FieldSetEntity> other = null;
 		do {
@@ -250,7 +248,7 @@
 				} else if ("__config__".equals(propertyName)) {
 					__config__ = setEntity.getUUID();
 				}
-				if (!StringUtils.isAnyEmpty(__config__) ) {
+				if (!StringUtils.isAnyEmpty(__config__)) {
 					//璇诲彇瀛愯〃灞炴��
 					if (parentMap != null) {
 						other = parentMap.get(__config__);
@@ -264,6 +262,9 @@
 						ReflectUtil.setFieldValue(faceFieldEntity, propertyName, setEntity.getObject("property_value"));
 					}
 
+				} else if (!StringUtils.isEmpty(setEntity.getObject("property_value"))) {
+					//鍒ゆ柇鏄惁
+					faceFieldEntity.putOtherParam(propertyName, setEntity.getObject("property_value"));
 				}
 			}
 			if (StringUtils.isEmpty(faceFieldEntity.getFieldName())) {

--
Gitblit v1.9.2