Обратная связь
This commit is contained in:
1 parent
7412e8793f
commit
97e0eeb701
3 files changed
+31
-10
No files matched your search
+16
-4
@@ -45,14 +45,26 @@ class Counter(ListAPIView):
|
||||
# PPV
|
||||
ppv = perioddata.count()
|
||||
|
||||
|
||||
print(ppv, '+++++++++++++++++++++++++++++++++++++')
|
||||
# Обратная связь
|
||||
feed = RatingStatus.objects.all()
|
||||
k = feed.values_list('usercom__comment', flat=True).filter(Q(usercom__time_create__range=[request.GET.get("start"), request.GET.get("end")]) & ~Q(usercom__comment='')).distinct().count()
|
||||
print(k, '------------------------------------------------')
|
||||
|
||||
return Response({'result':CountSerializer(res, many=True).data,
|
||||
# 'today':CountSerializer(nowdate, many=True).data,
|
||||
'feedback': RatingStatusStatSerializer(feed, many=True).data,
|
||||
'feedback': {
|
||||
'criteria': {},
|
||||
'data': {
|
||||
'score': {
|
||||
'all': 0,
|
||||
'period': 0
|
||||
},
|
||||
'comment': {
|
||||
'all': 0,
|
||||
'period': 0
|
||||
}
|
||||
}
|
||||
},
|
||||
'for_formulas': {
|
||||
'staff': DictEmployee.objects.filter(deleted=0).count(),
|
||||
'attendance': CountVisitor.objects.values_list('user', flat=True).filter(visitdate__range=[new_date_start, new_date_end]).distinct().count(),
|
||||
@@ -61,7 +73,7 @@ class Counter(ListAPIView):
|
||||
'indicators': {
|
||||
'crr': round(((crr_end - crr_per)/crr_start)*100, 2),
|
||||
'br': round((br/crr_per)*100, 2),
|
||||
'ppv': ppv/crr_per
|
||||
'ppv': round(ppv/crr_per, 2)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user