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
6bec1fd3
Commit
6bec1fd3
authored
Apr 12, 2023
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix20230412
parent
a5b9f6bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
28 deletions
+28
-28
apps/big_data/view.py
+28
-28
No files found.
apps/big_data/view.py
View file @
6bec1fd3
...
@@ -38,30 +38,30 @@ def get_jjzb():
...
@@ -38,30 +38,30 @@ def get_jjzb():
return
jsonify
(
code
=
RET
.
DBERR
,
msg
=
"查询出错!"
)
return
jsonify
(
code
=
RET
.
DBERR
,
msg
=
"查询出错!"
)
@api_bigdata.route
(
"/GetJjzb"
,
methods
=
[
"GET"
])
# 项目跟踪
# @api_bigdata.route("/GetJjzb", methods=["GET"]) # 项目跟踪
def
get_jjzb
():
# def get_jjzb():
try
:
# try:
obj_li
=
City
.
query
.
all
()
# obj_li = City.query.all()
data
=
[{
# data = [{
"id"
:
obj
.
id
,
# "id": obj.id,
"area"
:
obj
.
area
,
# "area": obj.area,
"size"
:
obj
.
size
,
# "size": obj.size,
"year"
:
obj
.
year
,
# "year": obj.year,
"people"
:
obj
.
people
,
# "people": obj.people,
"GDP"
:
obj
.
GDP
,
# "GDP": obj.GDP,
"addscale"
:
obj
.
addscale
,
# "addscale": obj.addscale,
"investment"
:
obj
.
investment
,
# "investment": obj.investment,
"retail"
:
obj
.
retail
,
# "retail": obj.retail,
"in_out"
:
obj
.
in_out
,
# "in_out": obj.in_out,
"public"
:
obj
.
public
,
# "public": obj.public,
"people_out"
:
obj
.
people_out
,
# "people_out": obj.people_out,
"people_per"
:
obj
.
people_per
,
# "people_per": obj.people_per,
"public_in"
:
obj
.
public_in
,
# "public_in": obj.public_in,
"info"
:
obj
.
info
,
# "info": obj.info,
"question"
:
obj
.
question
,
# "question": obj.question,
"flag"
:
obj
.
flag
# "flag": obj.flag
}
for
obj
in
obj_li
]
# } for obj in obj_li]
return
jsonify
(
code
=
RET
.
OK
,
data
=
data
,
msg
=
"查询成功!"
)
# return jsonify(code=RET.OK, data=data, msg="查询成功!")
except
Exception
as
e
:
# except Exception as e:
current_app
.
logger
.
error
(
e
)
# current_app.logger.error(e)
return
jsonify
(
code
=
RET
.
DBERR
,
msg
=
"查询出错!"
)
# return jsonify(code=RET.DBERR, msg="查询出错!")
\ No newline at end of file
\ No newline at end of file
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