Browse Source

修改费用报销导入 工时导入

yurk 2 years ago
parent
commit
80cd991358

+ 2 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ExpenseSheetServiceImpl.java

@@ -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<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", user.getCompanyId()));
                 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);
                 if (firstRow == null) {
@@ -416,7 +416,7 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
                     }
                     if(subExpenseTypeCell!=null){
                         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(MessageUtils.message("Reimbursement.TypeError",expenseTypeCell.getStringCellValue(),subExpenseTypeCell.getStringCellValue()));
                             return msg;