|
|
@ -1534,22 +1534,23 @@ public class BankServiceImpl implements BankService { |
|
|
|
if (files == null) { |
|
|
|
throw new RegularFailureException("压缩文件为空,没有数据"); |
|
|
|
} |
|
|
|
|
|
|
|
if (files.length != 1) { |
|
|
|
throw new RegularFailureException("银行流水导入模板有误,请重新下载后载入数据."); |
|
|
|
File dir = null; |
|
|
|
for (File file : files) { |
|
|
|
if (file.isDirectory()) { |
|
|
|
dir = file; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
File file = files[0]; |
|
|
|
if (!file.isDirectory()) { |
|
|
|
throw new RegularFailureException(FileUtil.getName(file) + "是文件夹."); |
|
|
|
if (dir == null) { |
|
|
|
throw new RegularFailureException("未解析到流水文件!"); |
|
|
|
} |
|
|
|
|
|
|
|
// 异步去拆分文件 |
|
|
|
File fDir = zipDir; |
|
|
|
// File fDir = zipDir; |
|
|
|
// masterPool.executeAsync(() -> HelperUtil.splitBsAndOaiFiles(fDir)); |
|
|
|
|
|
|
|
// 导入数据 |
|
|
|
ImportResultPromptVO execVo = analysisBankData(file, caseId); |
|
|
|
ImportResultPromptVO execVo = analysisBankData(dir, caseId); |
|
|
|
|
|
|
|
// 等待任务完成 |
|
|
|
sw.stop(); |
|
|
|