|
@@ -159,14 +159,19 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
|
|
|
//默认系统中设置的有审核权限的人审核
|
|
|
if (isAuditor) {
|
|
|
sheet.setStatus(0);
|
|
|
+ sheet.setReviewProcess(2);
|
|
|
} else {
|
|
|
sheet.setStatus(1);
|
|
|
+ sheet.setReviewProcess(0);
|
|
|
}
|
|
|
+
|
|
|
} else if (auditSetting.getAuditType() == 1) {
|
|
|
//项目经理审核,默认为待审核状态
|
|
|
sheet.setStatus(1);
|
|
|
+ sheet.setReviewProcess(0);
|
|
|
} else if (auditSetting.getAuditType() == 2) {
|
|
|
sheet.setStatus(1);//修改为待审核状态
|
|
|
+ sheet.setReviewProcess(0);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -444,6 +449,7 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
|
|
|
QueryWrapper<ExpenseSheet> queryWrapper = new QueryWrapper<ExpenseSheet>();
|
|
|
//当前用户
|
|
|
String token = request.getHeader("TOKEN");
|
|
|
+ User user = userMapper.selectById(token);
|
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
|
queryWrapper.eq("company_id", sheet.getCompanyId()).orderByDesc("id");
|
|
|
ExpenseAuditSetting expenseAuditSetting = expenseAuditSettingMapper.selectById(sheet.getCompanyId());
|
|
@@ -462,7 +468,6 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
|
|
|
if (expenseAuditSetting == null || expenseAuditSetting.getAuditType() == 0) {
|
|
|
if (sheet.getStatus() != null && sheet.getStatus() == 1) {
|
|
|
//待审核列表,检查是否有权限
|
|
|
- User user = userMapper.selectById(token);
|
|
|
List<SysRichFunction> functionList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "费用审核");
|
|
|
if (functionList.size() == 0) {
|
|
|
//无权查看待审核
|
|
@@ -559,6 +564,9 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
|
|
|
return httpRespMsg;
|
|
|
}
|
|
|
}else {
|
|
|
+ if (user.getCompanyId()==4811&& org.apache.commons.lang3.StringUtils.isNotEmpty(user.getRoleName())&&user.getRoleName().equals("费用管理员")){
|
|
|
+ queryWrapper.eq("operator_id",user.getId());
|
|
|
+ }
|
|
|
IPage<ExpenseSheet> listIPager = expenseSheetMapper.selectPage(new Page<>(pageIndex, pageSize),
|
|
|
queryWrapper);
|
|
|
List<ExpenseSheet> records = listIPager.getRecords();
|