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
f93df474
Commit
f93df474
authored
Apr 12, 2023
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix20230412
parent
948d3cb4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
53 deletions
+22
-53
apps/big_data/view.py
+22
-53
No files found.
apps/big_data/view.py
View file @
f93df474
...
@@ -9,60 +9,29 @@ from apps.big_data import api_bigdata
...
@@ -9,60 +9,29 @@ from apps.big_data import api_bigdata
"""项目总览"""
"""项目总览"""
@api_bigdata.route
(
"/ProjectStalker"
,
methods
=
[
"POST"
])
# 项目跟踪
@api_bigdata.route
(
"/GetJjzb"
,
methods
=
[
"GET"
])
# 项目跟踪
def
project_stalker
():
def
get_jjzb
():
req_dic
=
request
.
get_json
()
district
=
req_dic
[
'district'
]
stalker_num1
=
0
stalker_num2
=
0
stalker_num3
=
0
sign_num
=
0
start_num
=
0
end_num
=
0
job_num
=
0
new_value_num
=
0
revenue_num
=
0
try
:
try
:
project_obj_list
=
ProjectManagement
.
query
.
filter
(
obj_li
=
City
.
query
.
all
()
ProjectManagement
.
district
==
district
if
district
else
text
(
''
),
data
=
[{
ProjectManagement
.
is_delete
==
0
"id"
:
obj
.
id
,
)
.
all
()
"area"
:
obj
.
area
,
for
project_obj
in
project_obj_list
:
"size"
:
obj
.
size
,
if
project_obj
.
sign_time
and
project_obj
.
project_stalker
==
'进展顺利项目'
:
"year"
:
obj
.
year
,
stalker_num1
+=
1
"people"
:
obj
.
people
,
if
project_obj
.
sign_time
and
project_obj
.
project_stalker
==
'进展难点项目'
:
"GDP"
:
obj
.
GDP
,
stalker_num2
+=
1
"addscale"
:
obj
.
addscale
,
if
project_obj
.
sign_time
and
project_obj
.
project_stalker
==
'进展难点项目'
:
"investment"
:
obj
.
investment
,
stalker_num3
+=
1
"retail"
:
obj
.
retail
,
if
project_obj
.
sign_time
and
project_obj
.
investment_volume
>=
100000
:
"in_out"
:
obj
.
in_out
,
stalker_num3
+=
1
"public"
:
obj
.
public
,
if
project_obj
.
sign_time
:
"people_out"
:
obj
.
people_out
,
sign_num
+=
1
"people_per"
:
obj
.
people_per
,
if
project_obj
.
start_time
:
"public_in"
:
obj
.
public_in
,
start_num
+=
1
"info"
:
obj
.
info
,
if
project_obj
.
end_time
:
"question"
:
obj
.
question
,
end_num
+=
1
"flag"
:
obj
.
flag
if
project_obj
.
job_num
:
}
for
obj
in
obj_li
]
job_num
+=
project_obj
.
job_num
if
project_obj
.
new_value
:
new_value_num
+=
project_obj
.
new_value
if
project_obj
.
revenue
:
revenue_num
+=
project_obj
.
revenue
data
=
{
"stalker_num1"
:
stalker_num1
,
"stalker_num2"
:
stalker_num2
,
"stalker_num3"
:
stalker_num3
,
"sign_num"
:
sign_num
,
"start_num"
:
start_num
,
"end_num"
:
end_num
,
"job_num"
:
job_num
,
"new_value_num"
:
new_value_num
,
"revenue_num"
:
revenue_num
}
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
)
...
...
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