提交修复路口巡检任务可用用户列表异常bug
This commit is contained in:
parent
7a9d76ad2f
commit
c254619d42
|
|
@ -40,7 +40,7 @@ class TaskDbHelper(TableDbHelperBase):
|
||||||
return tasks[0]
|
return tasks[0]
|
||||||
|
|
||||||
def query_task_executor(self, nodeid, area_id):
|
def query_task_executor(self, nodeid, area_id):
|
||||||
sql_query = "select user_name, userno from user.user where userno in (select userno from user.area_user where nodeid = '%s' and area_id = %s) and department = '信号调优团队' and state != 1" % (nodeid, area_id)
|
sql_query = "select user_name, userno, role from user.user where userno in (select userno from user.area_user where nodeid = '%s' and area_id = %s) and department = '信号调优团队' and state != 1" % (nodeid, area_id)
|
||||||
executors = self.do_select(sql_query)
|
executors = self.do_select(sql_query)
|
||||||
if len(executors) <= 0:
|
if len(executors) <= 0:
|
||||||
logging.error('query_task_executor is null! %s' % (sql_query))
|
logging.error('query_task_executor is null! %s' % (sql_query))
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ def do_query_task_list_parameter(params):
|
||||||
for executor in executors:
|
for executor in executors:
|
||||||
executor_list.append(executor['user_name'])
|
executor_list.append(executor['user_name'])
|
||||||
res['data']['executor'] = executor_list
|
res['data']['executor'] = executor_list
|
||||||
res['data']['usable_user_list'] = executors
|
res['data']['usable_user_list'] = [{'userno': row['userno'], 'user_name': row['user_name']} for row in executors if row['role'] != 'business_expert']
|
||||||
|
|
||||||
#需求来源
|
#需求来源
|
||||||
srcs = db_task.query_task_src(nodeid, area_id)
|
srcs = db_task.query_task_src(nodeid, area_id)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue