diff --git a/dags/jh/price/price_exception.py b/dags/jh/price/price_exception.py index 3910a7a..f6634d6 100644 --- a/dags/jh/price/price_exception.py +++ b/dags/jh/price/price_exception.py @@ -80,6 +80,11 @@ month_before = dateutils.format_date(dateutils.add_months(dateutils.datetime.dat type = sys.argv[1] if len(sys.argv) > 1 else '' log.info("输出类型" + type) +# 新增支持上一月与前月对比 +if type == month_last: + month_now = month_last + month_last = month_before + df = oracle.scan_by_sql_to_data_frame("SELECT id, cityname, distname, commid, commname, calc_type, confidence, avg_price, year_month FROM community_base_price_gj WHERE year_month IN('"+month_now+"', '"+month_last+"') " + " ORDER BY cityname, distname, commid, commname, year_month")