Commit cb6391b6 authored by lvshibao's avatar lvshibao

seat_check接口的修改

parent a7a66e48
...@@ -129,8 +129,7 @@ def db_seat_check(req, if_page=False): ...@@ -129,8 +129,7 @@ def db_seat_check(req, if_page=False):
if city_id: if city_id:
city = Country.objects.filter(id=city_id).first() city = Country.objects.filter(id=city_id).first()
if city.parent is not None: if city.parent is not None:
task_condition['name__startswith'] = city.name task_condition['name__istartswith'] = city.name
print(task_condition)
tasks = Tasks.objects.filter(**task_condition).values('id', 'name', 'sessionCollectionId') tasks = Tasks.objects.filter(**task_condition).values('id', 'name', 'sessionCollectionId')
task_dict = {} task_dict = {}
task_name_dict = {} task_name_dict = {}
...@@ -160,7 +159,6 @@ def db_seat_check(req, if_page=False): ...@@ -160,7 +159,6 @@ def db_seat_check(req, if_page=False):
session_condition = {'taskId__in': v} session_condition = {'taskId__in': v}
if len(agent_names) > 0: if len(agent_names) > 0:
session_condition['agentName__in'] = list(seat_code_name_dict.keys()) session_condition['agentName__in'] = list(seat_code_name_dict.keys())
print(session_condition)
all_checks = tn.objects.filter(**session_condition).values('id', 'createdAt', 'agentName', 'extra', 'taskId', all_checks = tn.objects.filter(**session_condition).values('id', 'createdAt', 'agentName', 'extra', 'taskId',
'remainTime', 'startTime', 'closeTime', 'remainTime', 'startTime', 'closeTime',
'scoreItemRecord', 'sessionId') 'scoreItemRecord', 'sessionId')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment