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
ab857622
Commit
ab857622
authored
Jan 25, 2022
by
赵宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
82dc05cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
apps/utils/neo4j_conn.py
+2
-2
apps/view_index/view.py
+9
-5
No files found.
apps/utils/neo4j_conn.py
View file @
ab857622
...
...
@@ -2,8 +2,8 @@ from py2neo import Graph
def
conn_neo4j
():
graph
=
Graph
(
"http://localhost:7474"
,
username
=
"neo4j"
,
password
=
"123456"
)
# 本地neo4j
#
graph = Graph("http://localhost:7476", username="neo4j", password="123456") # 上传到50服务器前需更改
#
graph = Graph("http://localhost:7474", username="neo4j", password="123456") # 本地neo4j
graph
=
Graph
(
"http://localhost:7476"
,
username
=
"neo4j"
,
password
=
"123456"
)
# 上传到50服务器前需更改
# graph = Graph("http://39.100.39.50:7476/", username="neo4j", password="123456") # 测试50服务器上的neo4j时使用
return
graph
...
...
apps/view_index/view.py
View file @
ab857622
...
...
@@ -27,10 +27,14 @@ def get_jjzb(district):
"addscale"
:
'
%.2
f'
%
datas
.
addscale
+
"
%
"
if
datas
.
addscale
else
"-
%
"
,
# 规上工业增加值增速
"investment"
:
'
%.2
f亿元'
%
(
datas
.
investment
/
10000
)
if
datas
.
investment
else
"-亿元"
,
# 固定资产投资
"retail"
:
'
%.2
f亿元'
%
(
datas
.
retail
/
10000
)
if
datas
.
retail
else
"-亿元"
,
# 社会消费品零售额
"in_out"
:
'
%.2
f亿元'
%
(
datas
.
in_out
/
10000
)
if
datas
.
in_out
else
"-亿元"
,
# 进出口总额
# "in_out": '%.2f亿元' % (datas.in_out / 10000) if datas.in_out else "-亿元", # 进出口总额
"public_in"
:
'
%.2
f亿元'
%
(
datas
.
public_in
/
10000
)
if
datas
.
public_in
else
"-亿元"
,
# 一般公共预算收入
"public"
:
'
%.2
f亿元'
%
(
datas
.
public
/
10000
)
if
datas
.
public
else
"-亿元"
,
# 一般公共预算支出
"people_out"
:
'
%.2
f元'
%
datas
.
people_out
if
datas
.
people_out
else
"-元"
,
# 居民人均可支配收入
"people_per"
:
'
%.2
f'
%
datas
.
people_per
if
datas
.
people_per
else
"-"
}
# 居民消费价格指数
"people_per"
:
'
%.2
f'
%
datas
.
people_per
if
datas
.
people_per
else
"-"
,
"question"
:
datas
.
question
}
# 居民消费价格指数
# print(df_dic)
# return jsonify(code=RET.OK, msg="查找成功", data=df)
return
df_dic
...
...
@@ -126,9 +130,9 @@ def menu():
qt
=
100
-
mcq
-
gjd
-
mtmhg
-
gtzz
-
qyly
# 产业结构分布
industry
=
[
{
"per"
:
mtmhg
,
"name"
:
"煤炭煤化工"
,
"count"
:
count_mtmhg
},
{
"per"
:
mcq
,
"name"
:
"煤层气"
,
"count"
:
count_mcq
},
# {百分比,value}
{
"per"
:
gjd
,
"name"
:
"光机电"
,
"count"
:
count_gjd
},
{
"per"
:
mtmhg
,
"name"
:
"煤炭煤化工"
,
"count"
:
count_mtmhg
},
{
"per"
:
gtzz
,
"name"
:
"钢铁铸造"
,
"count"
:
count_gtzz
},
{
"per"
:
qyly
,
"name"
:
"全域旅游和康养"
,
"count"
:
count_qyly
},
{
"per"
:
qt
,
"name"
:
"其他"
,
"count"
:
count_qt
},
...
...
@@ -372,8 +376,8 @@ def policy_details():
"pubdate"
:
str
(
policy
.
pubdate
)[
0
:
10
]
if
policy
.
pubdate
else
"-"
,
# 发布时间
"url"
:
policy
.
url
if
policy
.
pubdate
else
"-"
,
# 外链接
"post_num"
:
policy
.
post_num
if
policy
.
post_num
else
""
,
# 发文字号
"
last"
:
[
policy2
.
name
,
_id1
]
if
policy2
else
""
,
"
next"
:
[
policy1
.
name
,
_id2
]
if
policy1
else
""
}
"
next"
:
[
policy1
.
name
,
_id1
]
if
policy1
else
""
,
"
last"
:
[
policy2
.
name
,
_id2
]
if
policy2
else
""
}
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"查找成功"
,
data
=
data
)
else
:
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"查找成功,无数据"
,
data
=
''
)
...
...
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