优化候补逻辑

pull/726/head
xianping.wen 2019-09-18 12:46:38 +08:00
parent 288eeffb73
commit 0381e09bd9
1 changed files with 14 additions and 6 deletions

View File

@ -164,6 +164,14 @@ class query:
continue
for set_type in TickerConfig.SET_TYPE:
if TickerConfig.PASSENGER_TICKER_STR[set_type] not in nate:
if ticket_info[3][0] in ["G", "D", "C"] and set_type in ["一等座", "特等座", "二等座", "商务座", "无座"]:
return {
"secretList": ticket_info[0],
"seat": [set_type],
"train_no": ticket_info[2],
"status": True,
}
elif ticket_info[3][0] in ["T", "Z", "K"] and set_type in ["硬座", "无座", "软座", "软卧", "硬卧"]:
return {
"secretList": ticket_info[0],
"seat": [set_type],