|
@@ -320,13 +320,16 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
|
|
|
if (invoiceNoCell != null) invoiceNoCell.setCellType(CellType.STRING);
|
|
|
if (taxPercentCell != null) taxPercentCell.setCellType(CellType.NUMERIC);
|
|
|
if (remarkCell != null) remarkCell.setCellType(CellType.STRING);
|
|
|
+ if(codeCell==null){
|
|
|
+ throw new Exception("项目编号/项目名称不能为空");
|
|
|
+ }
|
|
|
ExpenseItem expenseItem = new ExpenseItem();
|
|
|
Optional<Project> project = projectList.stream().filter(pro ->(StringUtils.isEmpty(pro.getProjectCode())?"":pro.getProjectCode()).equals(codeCell.getStringCellValue())
|
|
|
|| (StringUtils.isEmpty(pro.getProjectName())?"":pro.getProjectName()).equals(codeCell.getStringCellValue())).findFirst();
|
|
|
if (project.isPresent()) {
|
|
|
expenseItem.setProjectId(project.get().getId());
|
|
|
} else {
|
|
|
- throw new Exception("项目编号为[" + codeCell.getStringCellValue() + "]的项目不存在");
|
|
|
+ throw new Exception("项目编号/项目名称为[" + codeCell.getStringCellValue() + "]的项目不存在");
|
|
|
}
|
|
|
expenseItem.setExpenseId(expenseSheet.getId());
|
|
|
LocalDate happenDate = Instant.ofEpochMilli(happenDateCell.getDateCellValue().getTime())
|