Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mancheng
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mancheng
Commits
07dbafd0
Commit
07dbafd0
authored
Dec 09, 2022
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix20221209
parent
d652d3a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
apps/view_index/view.py
+5
-4
No files found.
apps/view_index/view.py
View file @
07dbafd0
...
@@ -17,16 +17,17 @@ from apps import db, constants, redis_store
...
@@ -17,16 +17,17 @@ from apps import db, constants, redis_store
# 获取左上角经济指标数据
# 获取左上角经济指标数据
def
get_jjzb
(
district
,
year
):
def
get_jjzb
(
district
,
year
):
'''经济指标数据'''
'''经济指标数据'''
# year1 = datetime.now().year - 1
year1
=
datetime
.
now
()
.
year
-
1
year1
=
'2022年1-11月'
year2
=
datetime
.
now
()
.
year
year2
=
datetime
.
now
()
.
year
years
=
''
years
=
''
if
year
==
year1
:
if
year
==
year1
:
years
=
str
(
year
)
+
'年'
years
=
str
(
year
)
+
'年'
if
year
==
year2
:
if
year
==
year2
:
month
=
datetime
.
now
()
.
month
# month = datetime.now().month
years
=
str
(
year
)
+
'年1-'
+
str
(
month
)
+
'月'
# years = str(year) + '年1-' + str(month) + '月'
years
=
'2022年1-11月'
try
:
try
:
if
not
district
or
district
==
'晋城市'
:
if
not
district
or
district
==
'晋城市'
:
datas
=
City
.
query
.
filter_by
(
area
=
'晋城市'
,
year
=
year
)
.
first
()
datas
=
City
.
query
.
filter_by
(
area
=
'晋城市'
,
year
=
year
)
.
first
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment