from model.DateUtils import DateUtils from model.log import logger from model.DingTalkUtils import DingTalkUtils from data_stat_task import * from sync_to_ck_task import * from app.etl.dm.dm_pitcher_daily_overview import dm_pitcher_daily_overview from app.etl.dm.dm_channel_summary import dm_channel_summary from app.etl.dw.dw_channel_daily import dw_daily_channel from app.etl.dw.dw_pitcher_daily import dw_pitcher_daily,dw_pitcher_trend log=logger() du = DateUtils() import sys def do_order(st,et): for i in du.getDateLists(st,et): ods_order(i) order_sync_ck(i) def do_cost(st,et): for i in du.getDateLists(st,et): channel_by_account_daily(i) channel_info_daily(i) dw_daily_channel_cost(i) dw_order_channel_cost_sync_ck(i) dw_channel_daily_total(i) def main(st,et): do_order(st,et) do_cost(st,et) dw_daily_channel() dw_pitcher_daily() dm_pitcher_daily_overview() dm_channel_summary() dw_pitcher_trend() def hourly(): thedate=du.getTodayOrYestoday() main(thedate, thedate) def daily(): dt=du.get_n_days(-1) main(dt, dt)