Commit 801ff693 by kangxiaoshan

提示

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