diff --git a/src/main/java/neatlogic/framework/form/dto/FormAttributeParentVo.java b/src/main/java/neatlogic/framework/form/dto/FormAttributeParentVo.java index 43c9c74233c7d9e90631d5e2381beceb660d2131..fcaadccb60c793eb9a224d1832421cb760419cb3 100644 --- a/src/main/java/neatlogic/framework/form/dto/FormAttributeParentVo.java +++ b/src/main/java/neatlogic/framework/form/dto/FormAttributeParentVo.java @@ -3,15 +3,17 @@ package neatlogic.framework.form.dto; public class FormAttributeParentVo { private String uuid; private String name; + private String handler; private FormAttributeParentVo parent; public FormAttributeParentVo() { } - public FormAttributeParentVo(String uuid, String name, FormAttributeParentVo parent) { + public FormAttributeParentVo(String uuid, String name, String handler, FormAttributeParentVo parent) { this.uuid = uuid; this.name = name; + this.handler = handler; this.parent = parent; } @@ -31,6 +33,14 @@ public class FormAttributeParentVo { this.name = name; } + public String getHandler() { + return handler; + } + + public void setHandler(String handler) { + this.handler = handler; + } + public FormAttributeParentVo getParent() { return parent; } diff --git a/src/main/java/neatlogic/framework/util/FormUtil.java b/src/main/java/neatlogic/framework/util/FormUtil.java index dbf1613fcb793c52fc84c9d032914fb6ff80c73c..972bb99a94f5be2c395b2aa7d5402044ca20192a 100644 --- a/src/main/java/neatlogic/framework/util/FormUtil.java +++ b/src/main/java/neatlogic/framework/util/FormUtil.java @@ -356,7 +356,7 @@ public class FormUtil { uuid = sceneObj.getString("uuid"); if (Objects.equals(uuid, sceneUuid)) { tableList = sceneObj.getJSONArray("tableList"); - parent = new FormAttributeParentVo(uuid, sceneObj.getString("name"), null); + parent = new FormAttributeParentVo(uuid, sceneObj.getString("name"), "scene",null); } } } @@ -436,14 +436,14 @@ public class FormUtil { resultList.add(formAttribute); } if (Objects.equals(FormHandler.FORMTABLEINPUTER.getHandler(), handler)) { - FormAttributeParentVo parent2 = new FormAttributeParentVo(componentObj.getString("uuid"), componentObj.getString("label"), parent); + FormAttributeParentVo parent2 = new FormAttributeParentVo(componentObj.getString("uuid"), componentObj.getString("label"), FormHandler.FORMTABLEINPUTER.getHandler(), parent); JSONObject config = componentObj.getJSONObject("config"); JSONArray dataConfigList = config.getJSONArray("dataConfig"); for (int i = 0; i < dataConfigList.size(); i++) { JSONObject dataObj = dataConfigList.getJSONObject(i); resultList.addAll(getFormAttributeList(dataObj, parent2)); if (Objects.equals("formtable", dataObj.getString("handler"))) { - FormAttributeParentVo parent3 = new FormAttributeParentVo(dataObj.getString("uuid"), dataObj.getString("label"), parent2); + FormAttributeParentVo parent3 = new FormAttributeParentVo(dataObj.getString("uuid"), dataObj.getString("label"), "formtable", parent2); JSONObject config2 = dataObj.getJSONObject("config"); if (MapUtils.isNotEmpty(config2)) { JSONArray dataConfigList2 = config2.getJSONArray("dataConfig"); @@ -457,7 +457,7 @@ public class FormUtil { } } } else if (Objects.equals(FormHandler.FORMTABLESELECTOR.getHandler(), handler)) { - FormAttributeParentVo parent2 = new FormAttributeParentVo(componentObj.getString("uuid"), componentObj.getString("label"), parent); + FormAttributeParentVo parent2 = new FormAttributeParentVo(componentObj.getString("uuid"), componentObj.getString("label"), FormHandler.FORMTABLESELECTOR.getHandler(), parent); JSONObject config = componentObj.getJSONObject("config"); JSONArray dataConfigList = config.getJSONArray("dataConfig"); for (int i = 0; i < dataConfigList.size(); i++) { @@ -465,7 +465,7 @@ public class FormUtil { resultList.addAll(getFormAttributeList(dataObj, parent2)); } } else if (Objects.equals(FormHandler.FORMSUBASSEMBLY.getHandler(), handler)) { - FormAttributeParentVo parent2 = new FormAttributeParentVo(componentObj.getString("uuid"), componentObj.getString("label"), parent); + FormAttributeParentVo parent2 = new FormAttributeParentVo(componentObj.getString("uuid"), componentObj.getString("label"), FormHandler.FORMSUBASSEMBLY.getHandler(), parent); JSONObject formData = componentObj.getJSONObject("formData"); if (MapUtils.isNotEmpty(formData)) { JSONObject formConfig = formData.getJSONObject("formConfig"); @@ -477,7 +477,7 @@ public class FormUtil { } else { JSONArray componentArray = componentObj.getJSONArray("component"); if (CollectionUtils.isNotEmpty(componentArray)) { - FormAttributeParentVo parent2 = new FormAttributeParentVo(componentObj.getString("uuid"), componentObj.getString("label"), parent); + FormAttributeParentVo parent2 = new FormAttributeParentVo(componentObj.getString("uuid"), componentObj.getString("label"), componentObj.getString("handler"), parent); for (int i = 0; i < componentArray.size(); i++) { JSONObject component = componentArray.getJSONObject(i); if (MapUtils.isNotEmpty(component)) {