diff --git a/safesite/views.py b/safesite/views.py index 76c15c8c..4d55df9a 100644 --- a/safesite/views.py +++ b/safesite/views.py @@ -8369,7 +8369,7 @@ def apiriskacttask(req): 'taskdo', 'state', 'user__ubelongpart__partname', 'user__name', 'taskdo', 'istask') return HttpResponse(transjson(total, objs), content_type="application/json") elif a == 'listalltodo': # 全厂待办任务 - objs = RiskActTask.objects.filter(istask=1, taskdo=None, usable=1) + objs = RiskActTask.objects.filter(istask=1, taskdo=None, usable=1, user__usecomp__partid=companyid) objs = objs.filter(riskact__table_type=req.GET.get('table_type', 1)) total = objs.count() startnum, endnum = fenye(req)