From 929e9fedb97a88ef122100e03f775fedae79c474 Mon Sep 17 00:00:00 2001
From: 许鹏程 <1821349743@qq.com>
Date: 星期三, 04 六月 2025 15:08:53 +0800
Subject: [PATCH] 更新

---
 src/main/java/com/product/mobile/core/service/FaceMobileService.java |   42 ++++++++++++++++++++++++++++++++++++++----
 1 files changed, 38 insertions(+), 4 deletions(-)

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 bb0f105..f608e99 100644
--- a/src/main/java/com/product/mobile/core/service/FaceMobileService.java
+++ b/src/main/java/com/product/mobile/core/service/FaceMobileService.java
@@ -17,6 +17,8 @@
 import com.product.core.entity.FieldSetEntity;
 import com.product.core.exception.BaseException;
 import com.product.core.service.support.AbstractBaseService;
+import com.product.face.entity.FaceListEntity;
+import com.product.face.service.FaceApplyService;
 import com.product.face.util.FaceUtil;
 import com.product.mobile.core.config.MobileCoreCode;
 import com.product.mobile.core.entity.FaceFieldEntity;
@@ -42,6 +44,8 @@
 
 	@Autowired
 	public BaseDao baseDao;
+	@Autowired
+	private FaceApplyService faceApplyService;
 
 	///鑾峰彇琛ㄥ崟鎬诲叆鍙�
 	/**
@@ -49,7 +53,7 @@
 	 * @param fse浼犲叆琛ㄥ悕锛屾垨 琛║UID
 	 * @return
 	 */
-	public List<FaceFieldEntity> getFaceConfig(FieldSetEntity fse) {
+	public Object getFaceConfig(FieldSetEntity fse) {
 
 		String tableUuid = fse.getString("table_uuid");
 		if (tableUuid == null && StringUtils.isNotEmpty(fse.getString("uuid"))
@@ -80,7 +84,11 @@
 			}
 		}
 
-		List<FaceFieldEntity> ls = getFaceFieldByTable(fse);
+		Object o = getFaceFieldByTable(fse);
+		if (o instanceof FaceListEntity) {
+			return o;
+		}
+		List<FaceFieldEntity> ls = (List<FaceFieldEntity>) o;
 		if (ls == null) ls = new ArrayList<FaceFieldEntity>();
 		addproperty(tableUuid, fse.getString("table_name"), ls);
 		//鎵�鏈夎〃鍗晆uid鑷姩娣诲姞锛屽苟涓篽idden
@@ -182,6 +190,8 @@
 			FaceFieldEntity uuid = new FaceFieldEntity();
 			FieldSetEntity f = dte.getFieldSetEntity(j);
 			if ("pk".equals(f.getString("field_type"))
+//					|| "created_by".equals(f.getString("field_name"))
+//					|| "created_utc_datetime".equals(f.getString("field_name"))
 					|| "updated_by".equals(f.getString("field_name"))
 					|| "updated_utc_datetime".equals(f.getString("field_name"))
 					|| "flowsign".equals(f.getString("field_type"))
@@ -196,6 +206,12 @@
 				uuid.setMultiple("1");
 			} else {
 				uuid.setMultiple("0");
+			}
+
+			if ("userids".equals(f.getString("field_type")) || "userid".equals(f.getString("field_type"))) {
+				uuid.setOrganizationType("5");
+			} else if ("orgUuids".equals(f.getString("field_type")) || "orgUuid".equals(f.getString("field_type"))) {
+				uuid.setOrganizationType("2");
 			}
 
 			uuid.setComponentType("");
@@ -221,7 +237,7 @@
 		}
 	}
 
-	public List<FaceFieldEntity> getFaceFieldByTable(FieldSetEntity fse) {
+	public Object getFaceFieldByTable(FieldSetEntity fse) {
 		String tableUuid = fse.getString("table_uuid");
 		String tableName = fse.getString("table_name");
 		if (StringUtils.isEmpty(tableUuid) && !StringUtils.isEmpty(tableName)) {
@@ -233,8 +249,13 @@
 		if (StringUtils.isEmpty(tableUuid)) {
 			throw new BaseException(MobileCoreCode.SYSTEM_FORM_COUNT);
 		}
-		FieldSetEntity faceFse = getBaseDao().getFieldSetByFilter("product_sys_face", "table_uuid=? and face_type=2", new Object[]{tableUuid}, true);
+		String faceType = BaseUtil.ifNull(fse.getString("face_type"), "2");
+		FieldSetEntity faceFse = getBaseDao().getFieldSetByFilter("product_sys_face", "table_uuid=? and face_type=?", new Object[]{tableUuid, faceType}, true);
 		faceFse.setTableName(tableName);
+		if ("1".equals(faceType) && !FieldSetEntity.isEmpty(faceFse)) {
+			//鍒楄〃
+			return faceApplyService.getFaceListConf(faceFse);
+		}
 		return getFaceField(faceFse);
 	}
 
@@ -473,6 +494,19 @@
 						faceFieldEntity.setAllowDelete(setEntity.getBoolean("property_value"));
 					} else if ("control_sequence".equals(propertyName)) {
 						faceFieldEntity.putOtherParam("controlSequence", setEntity.getInteger("property_value"));
+					} else if ("__config__".equals(propertyName)) {
+
+						String __config__ = setEntity.getUUID();
+						List<FieldSetEntity> fieldSetEntities2 = parentMap.get(__config__);
+						if (!CollectionUtil.isEmpty(fieldSetEntities2)) {
+							for (FieldSetEntity fieldSetEntity4 : fieldSetEntities2) {
+								if ("label".equals(fieldSetEntity4.getString("property_name"))) {
+									faceFieldEntity.setName(fieldSetEntity4.getString("property_value"));
+								} else if ("required".equals(fieldSetEntity4.getString("property_name"))) {
+									faceFieldEntity.setRequired(fieldSetEntity4.getBoolean("property_value") ? "1" : "0");
+								}
+							}
+						}
 					}
 				}
 				List<FaceFieldEntity> subFieldList = faceFieldEntity.getSubField();

--
Gitblit v1.9.2