main
HuangHai 4 months ago
parent 8a24a7ab3f
commit bdd99ea77a

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

@ -45,7 +45,7 @@ public class SchoolCountSummary {
if (configFiles != null) {
for (File configFile : configFiles) {
// 从文件名中提取年份
String year = configFile.getName().substring(0,4);
String year = configFile.getName().substring(0, 4);
log(String.format("开始处理年份:%s", year));
// 读取配置文件
@ -62,12 +62,10 @@ public class SchoolCountSummary {
JSONObject typeConfig = config.getJSONObject(schoolType);
Map<String, ColumnConfig> columnConfigs = new HashMap<>();
//表头的行数
int skipRows = typeConfig.getIntValue("skipRows");
//表头的行数,发现全都是前7行是表头
int skipRows = 7;
// 转换配置为ColumnConfig对象
for (String key : typeConfig.keySet()) {
if (key.equals("skipRows")) continue;
JSONObject colConfig = typeConfig.getJSONObject(key);
columnConfigs.put(key, new ColumnConfig(
colConfig.getIntValue("index"),

Loading…
Cancel
Save