新增上月与前月对比

This commit is contained in:
shenjian@fangjia.com
2022-11-03 10:47:40 +08:00
parent 2e2058b996
commit e905d49cd4
+5
View File
@@ -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")