|
|
|
|
@ -7,6 +7,7 @@ import cn.hutool.core.util.StrUtil;
@@ -7,6 +7,7 @@ import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
import jodd.util.StringUtil; |
|
|
|
|
|
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.HashSet; |
|
|
|
|
@ -75,6 +76,24 @@ public class WidgetJsonUtil {
@@ -75,6 +76,24 @@ public class WidgetJsonUtil {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 获取当前设备端(AppDeviceType)下某规则数组(conditionTypeList / businessRulesList)。 |
|
|
|
|
* |
|
|
|
|
* @param widgetJson 在线表单的 widgetJson。 |
|
|
|
|
* @param ruleKey 规则数组 key。 |
|
|
|
|
* @return 规则数组,widgetJson 为空或设备节点不存在时返回 null。 |
|
|
|
|
*/ |
|
|
|
|
public static JSONArray getRuleArray(String widgetJson, String ruleKey) { |
|
|
|
|
if (StrUtil.isBlank(widgetJson) || StrUtil.isBlank(ruleKey)) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
JSONObject deviceData = JSON.parseObject(widgetJson).getJSONObject(AppDeviceType.getDeviceType()); |
|
|
|
|
if (MapUtil.isEmpty(deviceData)) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
return deviceData.getJSONArray(ruleKey); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 收集子表控件(widgetType=100) bindData.tableName 的名称集合。 |
|
|
|
|
* |
|
|
|
|
* @param widgetJson 在线表单的 widgetJson。 |
|
|
|
|
@ -233,6 +252,10 @@ public class WidgetJsonUtil {
@@ -233,6 +252,10 @@ public class WidgetJsonUtil {
|
|
|
|
|
} |
|
|
|
|
for (int i = 0; i < tableColumnList.size(); i++) { |
|
|
|
|
JSONObject tableColumn = tableColumnList.getJSONObject(i); |
|
|
|
|
if (tableColumn.containsKey("f7ShowName") && StringUtil.isNotBlank(tableColumn.getString("f7ShowName"))) { |
|
|
|
|
//f7 不做字段的搜集
|
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
Integer fieldType = tableColumn.getInteger("fieldType"); |
|
|
|
|
if (fieldType != null && fieldType == 1) continue; |
|
|
|
|
String columnIdStr = tableColumn.getString("columnId"); |
|
|
|
|
|