         
         let fromStation = self.fromStationNameTxt.stringValue
         let toStation = self.toStationNameTxt.stringValue
-        let date = getDateStr(queryDate.dateValue)
+        let date = getStrFromDate(queryDate.dateValue)
         
         logger.info("\(fromStation) -> \(toStation) \(date)  \(self.autoQueryNum)")
         

    
    var ticketTaskManager = TicketTasksManager()
   
    private func getDateStr(_ date:Date) -> String{
        let dateFormatter = DateFormatter()
        dateFormatter.dateFormat = "yyyy-MM-dd"
        
        return dateFormatter.string(from: date)
    }
    
    private func setQueryParams() {

        if ticketTaskManager.ticketTasks.count == 0 {
            ticketTaskManager.ticketTasks.append(TicketTask())
        }
        else {
            let todayStr = getStrFromDate(Date())
            let today = getDateFromStr(todayStr)
            
            for task in ticketTaskManager.ticketTasks {
                var dates = ticketTaskManager.convertStr2Dates(task.date)
                var hasChangeDates = false
                for i in 0..<dates.count  {
                    if dates[i] < today {
                        dates[i] = today
                        hasChangeDates = true
                    }
                }
                if hasChangeDates {
                    task.date = ticketTaskManager.convertDates2Str(dates)
                }
            }
        }
        
        setQueryParams()
        self.queryDateIndex = 0
    }
