Commit 9c66eeef authored by wujipeng's avatar wujipeng
Browse files

文件解析优化

parent 029e3e71
......@@ -188,7 +188,9 @@ public class AnalysisServiceImpl implements AnalysisService {
.type("2")
.build());
}
userService.saveUserBatch(userList);
if(!userList.isEmpty()){
userService.saveUserBatch(userList);
}
} else {
List<ExcelDataEntity> excelData1 = Lists.newArrayList();
for (ExcelDataEntity excelDataEntity : excelData) {
......@@ -215,7 +217,9 @@ public class AnalysisServiceImpl implements AnalysisService {
.type("2")
.build());
}
userService.saveUserBatch(userList);
if(!userList.isEmpty()){
userService.saveUserBatch(userList);
}
}
//保存账户
groupedMap.forEach((paymentAccount, paymentBankName) -> userAccountList.add(UserAccountEntity.builder().userName(folderName).account(paymentBankName).caseId(caseId).code(paymentAccount).build()));
......@@ -259,8 +263,10 @@ public class AnalysisServiceImpl implements AnalysisService {
}
if (filterIndex.contains(2)) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String formattedDate = sdf.format(excelDatum.getTime());
key.append(formattedDate);
if(!ObjectUtils.isEmpty(excelDatum.getTime())){
String formattedDate = sdf.format(excelDatum.getTime());
key.append(formattedDate);
}
}
if (filterIndex.contains(3)) {
key.append(excelDatum.getAmount());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment