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
5c5ddeab
Commit
5c5ddeab
authored
Jan 06, 2022
by
赵宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加产业赞赏雷达接口
parent
672251b1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
38 deletions
+36
-38
apps/__init__.py
+2
-2
apps/atlas/view_graph.py
+0
-21
apps/models.py
+32
-13
apps/radar/view.py
+0
-0
apps/utils/neo4j_conn.py
+2
-2
No files found.
apps/__init__.py
View file @
5c5ddeab
...
...
@@ -90,7 +90,7 @@ def creat_app(config_name):
from
apps.view_attract
import
api_attract
# 招商驾驶舱
# from apps.user_pc import api_user
from
apps.atlas
import
api_atlas
#
from apps.radar import api_radar
from
apps.radar
import
api_radar
# from apps.attract import api_att
# from apps.view_360 import api_portraits
# from apps.view_choose_address import api_address
...
...
@@ -99,7 +99,7 @@ def creat_app(config_name):
# from apps.view_mobile import api_mobile
# app.register_blueprint(api_user, url_prefix='/api/user')
#
app.register_blueprint(api_radar, url_prefix='/api/radar')
app
.
register_blueprint
(
api_radar
,
url_prefix
=
'/api/radar'
)
app
.
register_blueprint
(
api_atlas
,
url_prefix
=
'/api/atlas'
)
# app.register_blueprint(api_att, url_prefix='/api/att')
#
...
...
apps/atlas/view_graph.py
View file @
5c5ddeab
...
...
@@ -399,13 +399,6 @@ def industry_zaiti():
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"数据查询成功"
,
data
=
data
)
except
Exception
as
e
:
current_app
.
logger
.
error
(
e
)
# else:
# name = '煤层气' # 默认页面为煤层气的数据
# try:
# data = get_data(name, 1, 1, page, perpage)
# return jsonify(code=RET.OK, msg="数据查询成功", data=data)
# except Exception as e:
# current_app.logger.error(e)
# 产业政策
...
...
@@ -537,19 +530,6 @@ def get_zaiti_detail_data():
id
=
req_dict
.
get
(
'id'
)
cate_id
=
req_dict
.
get
(
'cate_id'
)
# 1为行政区,2为园区,3为土地,4为楼宇,5为厂房
print
(
cate_id
)
# if cate_id == 1:
# try:
# induzone = Induzone.query.filter_by(id=id).first()
# data = {
# "district": induzone.district,
# "cate": induzone.cate,
# "area": induzone.area,
# "address": induzone.address,
# "cluster": induzone.cluster
# }
# return jsonify(code=RET.OK, msg='行政区详情查询成功!', data=data)
# except Exception as e:
# current_app.logger.error(e)
if
cate_id
in
[
1
,
2
]:
try
:
...
...
@@ -560,7 +540,6 @@ def get_zaiti_detail_data():
"area"
:
induzone
.
area
,
"address"
:
induzone
.
address
,
"cluster"
:
induzone
.
cluster
,
"name"
:
induzone
.
name
,
# 名称
# "district": induzone.district, # 所属地区
"phone"
:
induzone
.
phone
,
# 电话
...
...
apps/models.py
View file @
5c5ddeab
...
...
@@ -925,6 +925,37 @@ class ZaitiFactory(db.Model):
navigator
=
db
.
Column
(
db
.
String
(
10
))
navigat
=
db
.
Column
(
db
.
String
(
20
))
# 雷达评估页行业在不同地区的测评分数
class
EvaluationNodeData
(
db
.
Model
):
__tablename_
=
"evaluation_data"
__table_args__
=
({
'comment'
:
'产业招商雷达-产业评估'
})
# 添加表注释
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
,
autoincrement
=
True
,
doc
=
'主键id'
,
comment
=
'主键id'
)
c_type
=
db
.
Column
(
db
.
Integer
,
index
=
True
,
doc
=
'行业id'
,
comment
=
'行业id'
)
# 行业id
province
=
db
.
Column
(
db
.
String
(
32
),
index
=
True
,
doc
=
'省份'
,
comment
=
'省份'
)
# 省份
city
=
db
.
Column
(
db
.
String
(
32
),
index
=
True
,
doc
=
'城市'
,
comment
=
'城市'
)
# 城市
district
=
db
.
Column
(
db
.
String
(
32
),
index
=
True
,
doc
=
'区域'
,
comment
=
'区域'
)
# 区域
product
=
db
.
Column
(
db
.
String
(
32
),
index
=
True
,
doc
=
'产品名'
,
comment
=
'产品名'
)
# 产品名
score
=
db
.
Column
(
db
.
Integer
,
doc
=
'综合分'
,
comment
=
'综合分'
)
# 综合分
# # 创新资源-双创平台
# class Platform(db.Model):
# __tablename_ = "platform"
...
...
@@ -1063,19 +1094,7 @@ class ZaitiFactory(db.Model):
# general = db.Column(db.Integer) # 综合分
#
#
# # 雷达评估页行业在不同地区的测评分数
# class EvaluationNodeData(db.Model):
# __tablename_ = "evaluationnodedata"
#
# id = db.Column(db.Integer, primary_key=True, autoincrement=True)
# c_type = db.Column(db.Integer, index=True) # 行业id
#
# province = db.Column(db.String(32), index=True) # 省份
# city = db.Column(db.String(32), index=True) # 城市
# district = db.Column(db.String(32), index=True) # 区域
#
# product = db.Column(db.String(32), index=True) # 产品名
# score = db.Column(db.Integer) # 综合分
#
#
# # 查找历史表
...
...
apps/radar/view.py
View file @
5c5ddeab
This diff is collapsed.
Click to expand it.
apps/utils/neo4j_conn.py
View file @
5c5ddeab
...
...
@@ -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
...
...
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