Commit ddeb1986 by dong

fix20230104

parent aee106d9
......@@ -107,15 +107,18 @@ def get_jjzb(district, year):
if year == year1:
years = str(year) + '年'
if year == year2:
# month = datetime.now().month
# years = str(year) + '年1-' + str(month) + '月'
years = '2022年1-11月'
month = datetime.now().month
if month == 1:
years = str(year) + '年' + str(month) + '月'
else:
years = str(year) + '年1-' + str(month) + '月'
# years = '2022年1-11月'
try:
if not district or district == '晋城市':
datas = City.query.filter_by(area='晋城市', year=year1).first()
datas = City.query.filter_by(area='晋城市', year=year).first()
else:
datas = City.query.filter_by(area=district, year=year1).first()
datas = City.query.filter_by(area=district, year=year).first()
df_dic = ''
if datas:
df_dic = {"GDP": '%.2f亿元' % (datas.GDP / 10000) if datas.GDP else "-亿元", # 地区生产总值
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment