|
@@ -42,6 +42,7 @@ import javax.annotation.Resource;
|
|
import java.sql.Timestamp;
|
|
import java.sql.Timestamp;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.Collections;
|
|
import java.util.Collections;
|
|
|
|
+import java.util.Iterator;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.concurrent.TimeUnit;
|
|
import java.util.concurrent.TimeUnit;
|
|
import java.util.function.Predicate;
|
|
import java.util.function.Predicate;
|
|
@@ -359,7 +360,7 @@ public class TableServiceCmdService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
JSONObject result = new JSONObject();
|
|
JSONObject result = new JSONObject();
|
|
- result.put(SHOW_DATA, parentColumns);
|
|
|
|
|
|
+ result.put(SHOW_DATA, removeHr(parentColumns));
|
|
result.put(BUTTON_LIST, getButton(tableName));
|
|
result.put(BUTTON_LIST, getButton(tableName));
|
|
Integer tableColumn = genTable.getTableColumn();
|
|
Integer tableColumn = genTable.getTableColumn();
|
|
if (tableColumn != null){
|
|
if (tableColumn != null){
|
|
@@ -368,6 +369,23 @@ public class TableServiceCmdService {
|
|
return AjaxResult.success(result);
|
|
return AjaxResult.success(result);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 判断hr字段里面是否有值
|
|
|
|
+ * @param parentColumns
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ private List<GenTableColumn> removeHr(List<GenTableColumn> parentColumns){
|
|
|
|
+ Iterator<GenTableColumn> iterator = parentColumns.iterator();
|
|
|
|
+ while (iterator.hasNext()){
|
|
|
|
+ GenTableColumn next = iterator.next();
|
|
|
|
+ List<GenTableColumn> hrChildren = next.getHrChildren();
|
|
|
|
+ if (hrChildren.size() == 0){
|
|
|
|
+ iterator.remove();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return parentColumns;
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 功能描述: 获取表单查询字段、按钮、表头
|
|
* 功能描述: 获取表单查询字段、按钮、表头
|
|
* 注意: 都是从redis中拿的,如果数据库和redis不一致,则需刷新一下redis
|
|
* 注意: 都是从redis中拿的,如果数据库和redis不一致,则需刷新一下redis
|