pull/49/merge
wenxianping 6 years ago
parent 2d85ef1994
commit cce998d0be

@ -184,7 +184,8 @@ class select:
_station_seat=self._station_seat, _station_seat=self._station_seat,
station_trains=self.station_trains, station_trains=self.station_trains,
station_dates=self.station_dates, station_dates=self.station_dates,
ticke_peoples_num=len(from_station),) ticke_peoples_num=len(self.ticke_peoples),
)
queryResult = q.sendQuery() queryResult = q.sendQuery()
# 查询接口 # 查询接口
if queryResult.get("status", False): if queryResult.get("status", False):

@ -68,15 +68,16 @@ class query:
stationTrainCode = ticket_info[3] stationTrainCode = ticket_info[3]
leftTicket = ticket_info[12] leftTicket = ticket_info[12]
seat = self._station_seat[j].encode("utf8") seat = self._station_seat[j].encode("utf8")
ticket_num = ticket_info[self.station_seat(self._station_seat[j].encode("utf8"))]
print (u'车次: {0} 始发车站: {1} 终点站: {2} {3}: {4}'.format(ticket_info[3], print (u'车次: {0} 始发车站: {1} 终点站: {2} {3}: {4}'.format(ticket_info[3],
self.from_station_h, self.from_station_h,
self.to_station_h, self.to_station_h,
self._station_seat[j].encode("utf8"), self._station_seat[j].encode("utf8"),
ticket_info[self.station_seat(self._station_seat[j].encode("utf8"))])) ticket_num))
if wrapcache.get(train_no): if wrapcache.get(train_no):
print(ticket.QUERY_IN_BLACK_LIST.format(train_no)) print(ticket.QUERY_IN_BLACK_LIST.format(train_no))
continue continue
if self.ticke_peoples_num < int(ticket_info[self.station_seat(self._station_seat[j].encode("utf8"))]): if ticket_num != "" and self.ticke_peoples_num < ticket_num:
# 小于乘车人数则无视此次乘车机会, 以后可以扩展为有票优先提交 # 小于乘车人数则无视此次乘车机会, 以后可以扩展为有票优先提交
continue continue
else: else:

Loading…
Cancel
Save