|
|
@ -55,12 +55,12 @@ public class C9 {
|
|
|
|
for (File file : files) {
|
|
|
|
for (File file : files) {
|
|
|
|
//判断file是不是目录,是目录的需要跳过
|
|
|
|
//判断file是不是目录,是目录的需要跳过
|
|
|
|
if (file.isDirectory()) continue;
|
|
|
|
if (file.isDirectory()) continue;
|
|
|
|
//城市名称
|
|
|
|
|
|
|
|
String cityName = ru.getCityOrAreaName(file.getName());
|
|
|
|
|
|
|
|
String fileName = file.getName();
|
|
|
|
String fileName = file.getName();
|
|
|
|
|
|
|
|
|
|
|
|
//判断是否为docx文件
|
|
|
|
//判断是否为docx文件
|
|
|
|
if (fileName.endsWith(".docx") && !fileName.startsWith("~")) {
|
|
|
|
if (fileName.endsWith(".docx") && !fileName.startsWith("~")) {
|
|
|
|
|
|
|
|
//城市名称
|
|
|
|
|
|
|
|
String cityName = ru.getCityOrAreaName(file.getName());
|
|
|
|
if (StrKit.isBlank(cityName)) {
|
|
|
|
if (StrKit.isBlank(cityName)) {
|
|
|
|
System.out.println("文件名无法解析为城市:" + fileName);
|
|
|
|
System.out.println("文件名无法解析为城市:" + fileName);
|
|
|
|
System.exit(0);
|
|
|
|
System.exit(0);
|
|
|
|