Commit 26702e89 authored by xupeng's avatar xupeng

审核结算状态提交

parent b7093749
......@@ -531,7 +531,7 @@ def GuildSettlementAdd(db, data):
if guild_data.status == 0:
try:
url = "http://106.55.103.148:8787/api/guild/editSettlementLog"
json = {'id': guild_data.work_id, 'status': 2}
json = {'id': guild_data.work_id, 'status': 1}
res = requests.post(url=url, json=json)
if res.status_code != 200:
return 400, {"msg": "业务请求失败"}
......@@ -566,6 +566,17 @@ def GuildSettlementAdd(db, data):
db.commit()
return 400, {"msg": "结算错误"}
first_sta = 1
try:
url = "http://106.55.103.148:8787/api/guild/editSettlementLog"
json = {'id': guild_data.work_id, 'status': 2}
res = requests.post(url=url, json=json)
if res.status_code != 200:
return 400, {"msg": "业务请求失败"}
except:
db.query(GuildSettlementLog).filter(GuildSettlementLog.id == data.id).update(
{GuildSettlementLog.status: 3, GuildSettlementLog.update_time: get_now_datetime()})
db.commit()
return 400, {"msg": "业务请求失败"}
db.query(GuildSettlementLog).filter(GuildSettlementLog.id == data.id).update(
{GuildSettlementLog.status: data.status, GuildSettlementLog.update_time: get_now_datetime()})
db.commit()
......
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