Commit 801ff693 by kangxiaoshan

提示

parent 9071c041
...@@ -139,7 +139,7 @@ public class DmpIncomeServiceImpl implements DmpIncomeService { ...@@ -139,7 +139,7 @@ public class DmpIncomeServiceImpl implements DmpIncomeService {
row.createCell(i).setCellValue(title[i]); row.createCell(i).setCellValue(title[i]);
} }
String[] bussinesName = new String[]{"", "VIP", "共管","前置机"}; String[] bussinesName = new String[]{"", "VIP", "共管", "前置机"};
for (int j = 0; j < dmpIncomes.size(); j++) { for (int j = 0; j < dmpIncomes.size(); j++) {
HSSFRow rowBody = sheet.createRow(j + 1); HSSFRow rowBody = sheet.createRow(j + 1);
DmpIncome income = dmpIncomes.get(j); DmpIncome income = dmpIncomes.get(j);
...@@ -214,7 +214,10 @@ public class DmpIncomeServiceImpl implements DmpIncomeService { ...@@ -214,7 +214,10 @@ public class DmpIncomeServiceImpl implements DmpIncomeService {
dmpIncomeRepository.save(income); dmpIncomeRepository.save(income);
} }
}, executorService) }, executorService)
.exceptionally((t) -> null) .exceptionally((t) -> {
logger.error("the line " + index, t);
return null;
})
).toArray(size -> new CompletableFuture[size]); ).toArray(size -> new CompletableFuture[size]);
CompletableFuture.allOf(futures).join(); CompletableFuture.allOf(futures).join();
executorService.shutdownNow(); executorService.shutdownNow();
...@@ -270,8 +273,19 @@ public class DmpIncomeServiceImpl implements DmpIncomeService { ...@@ -270,8 +273,19 @@ public class DmpIncomeServiceImpl implements DmpIncomeService {
contract.setDs(DateTime.now().toString("yyyy-MM-dd")); contract.setDs(DateTime.now().toString("yyyy-MM-dd"));
String sysErro = null;
try {
//填充数据 //填充数据
fillDataByRow(contract, rowItem); fillDataByRow(contract, rowItem);
} catch (Exception e) {
logger.error("the line " + i, e);
sysErro = e.getMessage();
}
if (sysErro != null) {
return erroValueTip(i, sysErro);
}
//校验数据有效性 //校验数据有效性
if ("erro".equals(contract.getStartDate()) || "erro".equals(contract.getEndDate())) { if ("erro".equals(contract.getStartDate()) || "erro".equals(contract.getEndDate())) {
return erroValueTip(i, "开始时间或结束时间"); return erroValueTip(i, "开始时间或结束时间");
...@@ -320,7 +334,7 @@ public class DmpIncomeServiceImpl implements DmpIncomeService { ...@@ -320,7 +334,7 @@ public class DmpIncomeServiceImpl implements DmpIncomeService {
return erroValueTip(i, "签约类型"); return erroValueTip(i, "签约类型");
} else { } else {
contract.setContractType(CONTRACT_TYPE_NAME.get(contract.getContractType())); contract.setContractType(CONTRACT_TYPE_NAME.get(contract.getContractType()));
if("续签".equals(contract.getContractType())){ if ("续签".equals(contract.getContractType())) {
contract.setContractType("1"); contract.setContractType("1");
} }
} }
......
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