main
黄海 8 months ago
parent b851f301fe
commit bfd2b2ada7

@ -105,6 +105,13 @@ public class A13 {
return list;
}
public static String rs(String s) {
//如果s中以 形如 (一) (二)或者 (三) (四)这样的内容替换为空,其它的内容保留下来
String regex = "(\\[一二三四五六七八九十]+\\)|(\\([一二三四五六七八九十]+\\))";
return s.replaceAll(regex, "");
}
public static void main(String[] args) throws IOException, DocumentException {
//初始化数据库连接
LocalMysqlConnectUtil.Init();
@ -164,11 +171,17 @@ public class A13 {
}
Row outRow = outSheet.createRow(++rowIndex);
DsKit.putData(outRow, Arrays.asList(areaName, "教育特征", "全县人口呈平稳增长趋势",
list4.getFirst(), list4.get(1), list4.get(2), list4.get(3),
list4.get(4), list4.get(5), list4.get(6),
rs(list4.getFirst()),
rs(list4.get(1)),
rs(list4.get(2)),
rs(list4.get(3)),
rs(list4.get(4)),
rs(list4.get(5)),
rs(list4.get(6)),
cityName), dataStyle);
List<String> list5 = get(5);
//如果list5的元素个数不足8个需要补全到8个空的用空字符串
if (list5.size() < 8) {
for (int i = list5.size(); i < 8; i++) {
@ -177,8 +190,14 @@ public class A13 {
}
outRow = outSheet.createRow(++rowIndex);
DsKit.putData(outRow, Arrays.asList(areaName, "决策建议",
list5.getFirst(), list5.get(1), list5.get(2), list5.get(3),
list5.get(4), list5.get(5), list5.get(6), list5.get(7),
rs(list5.getFirst()),
rs(list5.get(1)),
rs(list5.get(2)),
rs(list5.get(3)),
rs(list5.get(4)),
rs(list5.get(5)),
rs(list5.get(6)),
rs(list5.get(7)),
cityName), dataStyle);
}

Loading…
Cancel
Save