|
@@ -272,16 +272,7 @@ public class HandlerFormDataUtils {
|
|
|
* @param allColumns allColumns
|
|
|
*/
|
|
|
public static void markTrueByExtend(List<GenTableColumn> allColumns) {
|
|
|
- Set<String> extendColumnNames = new HashSet<>(16);
|
|
|
- for (GenTableColumn col : allColumns) {
|
|
|
- String extendedAttributes = col.getExtendedAttributes();
|
|
|
- if (isNotEmpty(extendedAttributes)) {
|
|
|
- JSONObject jsonObject = JSON.parseObject(extendedAttributes);
|
|
|
- JSONArray jsonArray = jsonObject.getJSONArray(COL);
|
|
|
- CollectionUtils.addJSONArray(extendColumnNames, jsonArray);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
+ Set<String> extendColumnNames = getExtendColumnNames(allColumns);
|
|
|
if (isEmpty(extendColumnNames)) {
|
|
|
return;
|
|
|
}
|
|
@@ -294,4 +285,24 @@ public class HandlerFormDataUtils {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 功能描述: 先拿到所有的和计算相关的列
|
|
|
+ *
|
|
|
+ * @param allColumns allColumns
|
|
|
+ * @return java.util.Set<java.lang.String>
|
|
|
+ */
|
|
|
+ private static Set<String> getExtendColumnNames(List<GenTableColumn> allColumns) {
|
|
|
+ Set<String> extendColumnNames = new HashSet<>(16);
|
|
|
+ for (GenTableColumn col : allColumns) {
|
|
|
+ String extendedAttributes = col.getExtendedAttributes();
|
|
|
+ if (isNotEmpty(extendedAttributes)) {
|
|
|
+ JSONObject jsonObject = JSON.parseObject(extendedAttributes);
|
|
|
+ JSONArray jsonArray = jsonObject.getJSONArray(COL);
|
|
|
+ CollectionUtils.addJSONArray(extendColumnNames, jsonArray);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return extendColumnNames;
|
|
|
+ }
|
|
|
+
|
|
|
}
|