|
@@ -81,7 +81,7 @@ def open_servicerequest_booked_process(localtask):
|
|
# Проверка срочности заказа
|
|
# Проверка срочности заказа
|
|
if True:
|
|
if True:
|
|
#Заглушка назначение исполнителя системой
|
|
#Заглушка назначение исполнителя системой
|
|
- if set_provider(order.client_id, order.provider) == "success":
|
|
|
|
|
|
+ if set_provider(order.ticket, order.provider) == "success":
|
|
bot.proceed_status(proceed_to[0], localtask)
|
|
bot.proceed_status(proceed_to[0], localtask)
|
|
else:
|
|
else:
|
|
bot.bot_log(botname+" "+str(datetime.now())+" "+"Ошибка назначения исполнителя\n")
|
|
bot.bot_log(botname+" "+str(datetime.now())+" "+"Ошибка назначения исполнителя\n")
|
|
@@ -110,9 +110,9 @@ def get_balance(client):
|
|
except Exception as ex:
|
|
except Exception as ex:
|
|
print(ex)
|
|
print(ex)
|
|
|
|
|
|
-def set_provider(client, provider):
|
|
|
|
|
|
+def set_provider(ticket, provider):
|
|
headers = {'Authorization': f'Token {token}'}
|
|
headers = {'Authorization': f'Token {token}'}
|
|
- data = {'client': client,
|
|
|
|
|
|
+ data = {'ticket': ticket,
|
|
'provider': provider}
|
|
'provider': provider}
|
|
response = requests.post(config.API_URL+f"/api/example/set-provider", headers=headers, data=data)
|
|
response = requests.post(config.API_URL+f"/api/example/set-provider", headers=headers, data=data)
|
|
print(response.json())
|
|
print(response.json())
|
|
@@ -127,6 +127,7 @@ def set_provider(client, provider):
|
|
return message
|
|
return message
|
|
except Exception as ex:
|
|
except Exception as ex:
|
|
print(ex)
|
|
print(ex)
|
|
|
|
+
|
|
def open_servicerequest_booked():
|
|
def open_servicerequest_booked():
|
|
while (len(tasklist)):
|
|
while (len(tasklist)):
|
|
localtask=tasklist.pop(0)
|
|
localtask=tasklist.pop(0)
|