def fetch_by_date(to_date: str = date_utils.get_current_dt()): to_date = trade_date_service.get_next_trade_date(to_date) from_date = fetch_from_date() trade_date_service.refresh_cache(trade_date_service.get_previous_trade_date(from_date), to_date) return fetch.common_fetch_report(TsExpress, 'fetch_express', TsExpress.ts_code, TsExpress.mq_ann_date, from_date=from_date, to_date=to_date)
def fetch_by_date(to_date: str = date_utils.get_current_dt()): to_date = trade_date_service.get_next_trade_date(to_date) from_date = fetch_from_date() return fetch.common_fetch_report(TsForecast, 'fetch_forecast', TsForecast.ts_code, TsForecast.mq_ann_date, from_date=from_date, to_date=to_date)