|
@@ -244,7 +244,7 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
|
|
List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", user.getCompanyId()));
|
|
List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", user.getCompanyId()));
|
|
List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", user.getCompanyId()));
|
|
List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", user.getCompanyId()));
|
|
List<SysRichFunction> functionList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "费用审核");
|
|
List<SysRichFunction> functionList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "费用审核");
|
|
- List<ExpenseType> expenseTypeList = expenseTypeMapper.selectList(null);
|
|
|
|
|
|
+ List<ExpenseType> expenseTypeList = expenseTypeMapper.selectList(new QueryWrapper<ExpenseType>().eq("company_id",user.getCompanyId()));
|
|
//由于第一行需要指明报销人列对应的标题
|
|
//由于第一行需要指明报销人列对应的标题
|
|
XSSFRow firstRow = sheet.getRow(2);
|
|
XSSFRow firstRow = sheet.getRow(2);
|
|
if (firstRow == null) {
|
|
if (firstRow == null) {
|
|
@@ -416,7 +416,7 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
|
|
}
|
|
}
|
|
if(subExpenseTypeCell!=null){
|
|
if(subExpenseTypeCell!=null){
|
|
List<String> stringList = expenseTypeList.stream().filter(et -> et.getMainType().equals(expenseSheet.getType())).map(et -> et.getTypeName()).collect(Collectors.toList());
|
|
List<String> stringList = expenseTypeList.stream().filter(et -> et.getMainType().equals(expenseSheet.getType())).map(et -> et.getTypeName()).collect(Collectors.toList());
|
|
- if(!stringList.contains(subExpenseTypeCell.getStringCellValue())){
|
|
|
|
|
|
+ if(stringList!=null&&!stringList.contains(subExpenseTypeCell.getStringCellValue())){
|
|
//msg.setError("当前费用类型["+expenseTypeCell.getStringCellValue()+"]中不存在["+subExpenseTypeCell.getStringCellValue()+"]类型");
|
|
//msg.setError("当前费用类型["+expenseTypeCell.getStringCellValue()+"]中不存在["+subExpenseTypeCell.getStringCellValue()+"]类型");
|
|
msg.setError(MessageUtils.message("Reimbursement.TypeError",expenseTypeCell.getStringCellValue(),subExpenseTypeCell.getStringCellValue()));
|
|
msg.setError(MessageUtils.message("Reimbursement.TypeError",expenseTypeCell.getStringCellValue(),subExpenseTypeCell.getStringCellValue()));
|
|
return msg;
|
|
return msg;
|