新增上月与前月对比
This commit is contained in:
@@ -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 ''
|
type = sys.argv[1] if len(sys.argv) > 1 else ''
|
||||||
log.info("输出类型" + type)
|
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+"') " +
|
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")
|
" ORDER BY cityname, distname, commid, commname, year_month")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user