正在显示
1 个修改的文件
包含
8 行增加
和
3 行删除
@@ -157,9 +157,14 @@ class CheckAuth(APIView): | @@ -157,9 +157,14 @@ class CheckAuth(APIView): | ||
157 | order = int(Auditor.objects.filter(user_id=request.user.id).values_list('order', flat=True).first()) | 157 | order = int(Auditor.objects.filter(user_id=request.user.id).values_list('order', flat=True).first()) |
158 | results = Result.objects.filter(project_id=kwargs['pk']) | 158 | results = Result.objects.filter(project_id=kwargs['pk']) |
159 | if order > 0: | 159 | if order > 0: |
160 | - index = order - 1 if order > 1 else 0 | ||
161 | - return response(True) if bool(results[index].is_accept) else response(False) | 160 | + # 当审核人员排队时 需要判断是否已经流转到自己 前一个人员是否已经有处理 |
161 | + # 还要判断自己是否已经审核过了 | ||
162 | + index = order - 1 | ||
163 | + if bool(results[index].is_accept) and not bool(results[order].is_accept): | ||
164 | + return response(True) | ||
162 | else: | 165 | else: |
163 | - return response(False) if results[order].is_accept else response(True) | 166 | + return response(False) |
167 | + else: | ||
168 | + return response(False) if bool(results[0].is_accept) else response(True) | ||
164 | 169 | ||
165 | 170 |
-
请 注册 或 登录 后发表评论