|
|
|
@ -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"),
|
|
|
|
|