|
|
|
@ -105,6 +105,7 @@ public class C1 {
|
|
|
|
|
ExcelKit.putData(outRow, new ArrayList<>(Arrays.asList(r.getFirst(), "2022年基数", "", source2.getFirst().get(4),
|
|
|
|
|
"", cityName, "云南省")), dataStyle);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//城区+镇区+乡村
|
|
|
|
|
List<String> areaList = new ArrayList<>();
|
|
|
|
|
areaList.add("城区");
|
|
|
|
@ -117,32 +118,17 @@ public class C1 {
|
|
|
|
|
for (int i = 0; i < source1.size(); i++) {
|
|
|
|
|
List<String> r = source1.get(i);
|
|
|
|
|
Row outRow = outSheet.createRow(++rowIndex);
|
|
|
|
|
// 需要写死列的对应关系
|
|
|
|
|
outRow.createCell(0).setCellValue(r.getFirst());//年份
|
|
|
|
|
outRow.createCell(1).setCellValue("");//总量分类
|
|
|
|
|
outRow.createCell(2).setCellValue(areaName);//区域分类
|
|
|
|
|
outRow.createCell(3).setCellValue("");//总量数值
|
|
|
|
|
outRow.createCell(4).setCellValue(r.get(k + 1));//区域数值
|
|
|
|
|
outRow.createCell(5).setCellValue(cityName);//行政区划
|
|
|
|
|
outRow.createCell(6).setCellValue("云南省");//上级行政区划
|
|
|
|
|
//应用一下样式
|
|
|
|
|
ExcelKit.applyStyle(outRow, 0, 6, dataStyle);
|
|
|
|
|
//年份,总量分类,区域分类,总量数值,区域数值,行政区划,上级行政区划
|
|
|
|
|
ExcelKit.putData(outRow, new ArrayList<>(Arrays.asList(r.getFirst(), "", areaName, "",
|
|
|
|
|
r.get(k + 1), cityName, "云南省")), dataStyle);
|
|
|
|
|
}
|
|
|
|
|
for (int i = 0; i < source2.size(); i++) {
|
|
|
|
|
if (i == 0) continue;
|
|
|
|
|
List<String> r = source2.get(i);
|
|
|
|
|
Row outRow = outSheet.createRow(++rowIndex);
|
|
|
|
|
// 需要写死列的对应关系
|
|
|
|
|
outRow.createCell(0).setCellValue(r.getFirst());//年份
|
|
|
|
|
outRow.createCell(1).setCellValue("");//基数
|
|
|
|
|
outRow.createCell(2).setCellValue(areaName);//区域分类
|
|
|
|
|
outRow.createCell(3).setCellValue("");//总量数值
|
|
|
|
|
outRow.createCell(4).setCellValue(r.get(k + 1));//区域数值
|
|
|
|
|
|
|
|
|
|
outRow.createCell(5).setCellValue(cityName);//行政区划
|
|
|
|
|
outRow.createCell(6).setCellValue("云南省");//上级行政区划
|
|
|
|
|
//应用一下样式
|
|
|
|
|
ExcelKit.applyStyle(outRow, 0, 6, dataStyle);
|
|
|
|
|
//年份,总量分类,区域分类,总量数值,区域数值,行政区划,上级行政区划
|
|
|
|
|
ExcelKit.putData(outRow, new ArrayList<>(Arrays.asList(r.getFirst(), "", areaName, "",
|
|
|
|
|
r.get(k + 1), cityName, "云南省")), dataStyle);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|