main
HuangHai 4 months ago
parent 8a24a7ab3f
commit bdd99ea77a

@ -1,6 +1,5 @@
{ {
"基教幼儿园": { "基教幼儿园": {
"skipRows": 7,
"schoolName": { "schoolName": {
"index": 1, "index": 1,
"name": "学校名称", "name": "学校名称",
@ -28,7 +27,6 @@
} }
}, },
"基教小学": { "基教小学": {
"skipRows": 7,
"schoolName": { "schoolName": {
"index": 1, "index": 1,
"name": "学校名称", "name": "学校名称",
@ -56,7 +54,6 @@
} }
}, },
"基教初中": { "基教初中": {
"skipRows": 7,
"schoolName": { "schoolName": {
"index": 1, "index": 1,
"name": "学校名称", "name": "学校名称",
@ -84,7 +81,6 @@
} }
}, },
"基教高中": { "基教高中": {
"skipRows": 7,
"schoolName": { "schoolName": {
"index": 1, "index": 1,
"name": "学校名称", "name": "学校名称",
@ -113,7 +109,6 @@
}, },
"基教特教": { "基教特教": {
"skipRows": 7,
"schoolName": { "schoolName": {
"index": 1, "index": 1,
"name": "学校名称", "name": "学校名称",
@ -142,7 +137,6 @@
}, },
"基教工读": { "基教工读": {
"skipRows": 7,
"schoolName": { "schoolName": {
"index": 1, "index": 1,
"name": "学校名称", "name": "学校名称",

@ -62,12 +62,10 @@ public class SchoolCountSummary {
JSONObject typeConfig = config.getJSONObject(schoolType); JSONObject typeConfig = config.getJSONObject(schoolType);
Map<String, ColumnConfig> columnConfigs = new HashMap<>(); Map<String, ColumnConfig> columnConfigs = new HashMap<>();
//表头的行数 //表头的行数,发现全都是前7行是表头
int skipRows = typeConfig.getIntValue("skipRows"); int skipRows = 7;
// 转换配置为ColumnConfig对象 // 转换配置为ColumnConfig对象
for (String key : typeConfig.keySet()) { for (String key : typeConfig.keySet()) {
if (key.equals("skipRows")) continue;
JSONObject colConfig = typeConfig.getJSONObject(key); JSONObject colConfig = typeConfig.getJSONObject(key);
columnConfigs.put(key, new ColumnConfig( columnConfigs.put(key, new ColumnConfig(
colConfig.getIntValue("index"), colConfig.getIntValue("index"),

Loading…
Cancel
Save