|
|
@ -16,6 +16,7 @@ import com.inscloudtech.bankStatementAnalysis.util.AnalyzeFileHelper; |
|
|
|
import com.inscloudtech.bankStatementAnalysis.worker.ImportWorkflowWorker; |
|
|
|
import com.inscloudtech.caseMange.domain.vo.GetPersonReq; |
|
|
|
import com.inscloudtech.common.core.page.TableDataInfo; |
|
|
|
import com.inscloudtech.common.utils.file.RAR5Util; |
|
|
|
import com.inscloudtech.common.utils.poi.ExcelUtil; |
|
|
|
import com.inscloudtech.common.utils.spring.SpringUtils; |
|
|
|
import com.inscloudtech.datacenter.domain.vo.*; |
|
|
@ -1513,10 +1514,13 @@ public class BankServiceImpl implements BankService { |
|
|
|
AnalyzeFileHelper.clear(); |
|
|
|
|
|
|
|
|
|
|
|
File zipDir; |
|
|
|
File zipDir = null; |
|
|
|
try { |
|
|
|
zipDir = FileUtils.unzip(mf.getInputStream()); |
|
|
|
// zipDir = FileUtils.unrar(mf.getInputStream()); |
|
|
|
if(originalFilename.endsWith("zip")){ |
|
|
|
zipDir = FileUtils.unzip(mf.getInputStream()); |
|
|
|
}else if(originalFilename.endsWith("rar")){ |
|
|
|
zipDir = RAR5Util.unRar(mf.getInputStream()); |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("解压文件失败", e); |
|
|
|
throw new RegularFailureException("解压文件失败: " + e.getMessage()); |
|
|
@ -1528,7 +1532,7 @@ public class BankServiceImpl implements BankService { |
|
|
|
sw.start(); |
|
|
|
File[] files = zipDir.listFiles(); |
|
|
|
if (files == null) { |
|
|
|
throw new RegularFailureException("zip文件为空,没有数据"); |
|
|
|
throw new RegularFailureException("压缩文件为空,没有数据"); |
|
|
|
} |
|
|
|
|
|
|
|
if (files.length != 1) { |
|
|
@ -1549,7 +1553,8 @@ public class BankServiceImpl implements BankService { |
|
|
|
|
|
|
|
// 等待任务完成 |
|
|
|
sw.stop(); |
|
|
|
|
|
|
|
sw.getTotalTimeSeconds(); |
|
|
|
log.error("流水导入结束耗时【"+sw.getTotalTimeSeconds()+"】秒"); |
|
|
|
int total = execVo.getTotal(); |
|
|
|
|
|
|
|
rollbackProcess(execVo.getErrorItem(),caseId); |
|
|
@ -1718,7 +1723,6 @@ public class BankServiceImpl implements BankService { |
|
|
|
esIndexHelper.delFDBIndex(caseId); |
|
|
|
RedisUtils.incrAtomicValue(completeKey); |
|
|
|
long finish = System.currentTimeMillis(); |
|
|
|
log.error("富滇银行---结束耗时【{}秒】",(finish - start)/1000.0); |
|
|
|
} |
|
|
|
break; |
|
|
|
case Constants.BANK_IMPORT_MODEL_BOC_BANK: // 中国银行 |
|
|
@ -1732,7 +1736,6 @@ public class BankServiceImpl implements BankService { |
|
|
|
esIndexHelper.delBOCIndex(caseId); |
|
|
|
RedisUtils.incrAtomicValue(completeKey); |
|
|
|
long finish = System.currentTimeMillis(); |
|
|
|
log.error("中国银行---结束耗时【{}秒】",(finish - start)/1000.0); |
|
|
|
} |
|
|
|
break; |
|
|
|
case Constants.BANK_IMPORT_MODEL_CITIC_BANK: // 中信银行 |
|
|
@ -1747,7 +1750,6 @@ public class BankServiceImpl implements BankService { |
|
|
|
esIndexHelper.delCITICIndex(caseId); |
|
|
|
RedisUtils.incrAtomicValue(completeKey); |
|
|
|
long finish = System.currentTimeMillis(); |
|
|
|
log.error("中信银行---结束耗时【{}秒】",(finish - start)/1000.0); |
|
|
|
} |
|
|
|
break; |
|
|
|
case Constants.BANK_IMPORT_MODEL_MERCHANTS_BANK: // 招商银行 |
|
|
|