parent
ad26028cc1
commit
9950c97873
|
@ -192,12 +192,12 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
|
||||||
}
|
}
|
||||||
jsonArray.add(json);
|
jsonArray.add(json);
|
||||||
codeEdit.setText(jsonArray.toJSONString());
|
codeEdit.setText(jsonArray.toJSONString());
|
||||||
logger.info("JSON:{}", jsonArray.toJSONString());
|
logger.info("数组 → JSON:{}", jsonArray.toJSONString());
|
||||||
} else {
|
} else {
|
||||||
JSONObject resultJson = new JSONObject();
|
JSONObject resultJson = new JSONObject();
|
||||||
processFloor(resultJson, "data", floors.get(0), floors, billObject);
|
processFloor(resultJson, "data", floors.get(0), floors, billObject);
|
||||||
codeEdit.setText(resultJson.toJSONString());
|
codeEdit.setText(resultJson.toJSONString());
|
||||||
logger.info("JSON:{}", resultJson.toJSONString());
|
logger.info("对象 → JSON:{}", resultJson.toJSONString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,6 +234,7 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void processFloor(JSONObject parentJson, String parentKey, List<DynamicObject> currentFloor, List<List<DynamicObject>> floors, DynamicObject dynamic) {
|
private void processFloor(JSONObject parentJson, String parentKey, List<DynamicObject> currentFloor, List<List<DynamicObject>> floors, DynamicObject dynamic) {
|
||||||
|
logger.info("进入processFloor方法");
|
||||||
if (currentFloor.isEmpty()) {
|
if (currentFloor.isEmpty()) {
|
||||||
logger.info("currentFloor.isEmpty()");
|
logger.info("currentFloor.isEmpty()");
|
||||||
return;
|
return;
|
||||||
|
@ -246,6 +247,7 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("arrayList".equals(currentFloor.get(0).getString("shkd_tartype"))) {
|
if ("arrayList".equals(currentFloor.get(0).getString("shkd_tartype"))) {
|
||||||
|
logger.info("进入数组");
|
||||||
JSONArray jsonArray = new JSONArray();
|
JSONArray jsonArray = new JSONArray();
|
||||||
//目前JSONArray都是一层
|
//目前JSONArray都是一层
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
|
@ -322,6 +324,7 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
|
||||||
jsonArray.add(json);
|
jsonArray.add(json);
|
||||||
parentJson.put(parentKey, jsonArray);
|
parentJson.put(parentKey, jsonArray);
|
||||||
} else {
|
} else {
|
||||||
|
logger.info("进入对象");
|
||||||
for (DynamicObject dynamicObject : currentFloor) {
|
for (DynamicObject dynamicObject : currentFloor) {
|
||||||
String key = dynamicObject.getString("shkd_tarfield");
|
String key = dynamicObject.getString("shkd_tarfield");
|
||||||
Object shkd_soufield = dynamicObject.get("shkd_soufield");
|
Object shkd_soufield = dynamicObject.get("shkd_soufield");
|
||||||
|
|
Loading…
Reference in New Issue