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
904b82da
Commit
904b82da
authored
Dec 23, 2021
by
赵宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
ac661929
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
40 deletions
+72
-40
apps/__init__.py
+2
-2
apps/atlas/view_graph.py
+0
-0
apps/models.py
+66
-0
apps/util.py
+1
-1
apps/utils/neo4j_conn.py
+3
-37
No files found.
apps/__init__.py
View file @
904b82da
...
@@ -89,7 +89,7 @@ def creat_app(config_name):
...
@@ -89,7 +89,7 @@ def creat_app(config_name):
# 注册蓝图,推迟导入,防止循环嵌套
# 注册蓝图,推迟导入,防止循环嵌套
from
apps.view_attract
import
api_attract
# 招商驾驶舱
from
apps.view_attract
import
api_attract
# 招商驾驶舱
# from apps.user_pc import api_user
# from apps.user_pc import api_user
#
from apps.atlas import api_atlas
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.attract import api_att
# from apps.view_360 import api_portraits
# from apps.view_360 import api_portraits
...
@@ -100,7 +100,7 @@ def creat_app(config_name):
...
@@ -100,7 +100,7 @@ def creat_app(config_name):
# app.register_blueprint(api_user, url_prefix='/api/user')
# 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_atlas
,
url_prefix
=
'/api/atlas'
)
# app.register_blueprint(api_att, url_prefix='/api/att')
# app.register_blueprint(api_att, url_prefix='/api/att')
#
#
app
.
register_blueprint
(
api_attract
,
url_prefix
=
'/api/attract/industry'
)
app
.
register_blueprint
(
api_attract
,
url_prefix
=
'/api/attract/industry'
)
...
...
apps/atlas/view_graph.py
View file @
904b82da
This diff is collapsed.
Click to expand it.
apps/models.py
View file @
904b82da
...
@@ -180,6 +180,72 @@ class Company(db.Model):
...
@@ -180,6 +180,72 @@ class Company(db.Model):
__table_args__
=
({
'comment'
:
'晋城企业表'
})
# 添加表注释
__table_args__
=
({
'comment'
:
'晋城企业表'
})
# 添加表注释
# 晋城企业行政许可
class
CompanyAdminPermission
(
db
.
Model
):
__tablename_
=
"company_admin_permission"
__table_args__
=
({
'comment'
:
'晋城企业行政许可数据表'
})
# 添加表注释
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
,
autoincrement
=
True
,
doc
=
'晋城企业行政许可主键id'
,
comment
=
'晋城企业行政许可主键id'
)
# 企业
company_id
=
db
.
Column
(
db
.
Integer
,
doc
=
'晋城企业id'
,
comment
=
'晋城企业id'
)
number
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'晋城企业行政许可编号'
,
comment
=
'晋城企业行政许可编号'
)
name
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'晋城企业行政许可证名称'
,
comment
=
'晋城企业行政许可证名称'
)
time
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'许可证名称'
,
comment
=
'许可证名称'
)
effective_data
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'有效日期'
,
comment
=
'有效日期'
)
Licensing_authority
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'许可机关'
,
comment
=
'许可机关'
)
content
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'许可内容'
,
comment
=
'许可内容'
)
source
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'来源'
,
comment
=
'来源'
)
# 晋城企业税务信用
class
CompanyTaxCredit
(
db
.
Model
):
__tablename_
=
"company_tax_credit"
__table_args__
=
({
'comment'
:
'晋城企业税务信用数据表'
})
# 添加表注释
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
,
autoincrement
=
True
,
doc
=
'晋城企业税务信用主键id'
,
comment
=
'晋城企业税务信用主键id'
)
# 企业
company_id
=
db
.
Column
(
db
.
Integer
,
doc
=
'晋城企业id'
,
comment
=
'晋城企业id'
)
evaluation_annual
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'评价年度'
,
comment
=
'评价年度'
)
identify_number
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'纳税人识别号'
,
comment
=
'纳税人识别号'
)
level
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'纳税信用等级'
,
comment
=
'纳税信用等级'
)
evaluate
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'单位评价'
,
comment
=
'单位评价'
)
# 晋城企业进出口信用
class
CompanyImportExport
(
db
.
Model
):
__tablename_
=
"company_import_export"
__table_args__
=
({
'comment'
:
'晋城企业进出口信用数据表'
})
# 添加表注释
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
,
autoincrement
=
True
,
doc
=
'晋城企业进出口信用主键id'
,
comment
=
'晋城企业进出口信用主键id'
)
# 企业
company_id
=
db
.
Column
(
db
.
Integer
,
doc
=
'晋城企业id'
,
comment
=
'晋城企业id'
)
register_customs
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'注册海关'
,
comment
=
'注册海关'
)
business_category
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'经营类别'
,
comment
=
'经营类别'
)
register_date
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'注册日期'
,
comment
=
'注册日期'
)
# 晋城企业供应商
class
CompanySupplier
(
db
.
Model
):
__tablename_
=
"company_supplier"
__table_args__
=
({
'comment'
:
'晋城企业供应商数据表'
})
# 添加表注释
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
,
autoincrement
=
True
,
doc
=
'晋城企业供应商主键id'
,
comment
=
'晋城企业供应商主键id'
)
# 企业
company_id
=
db
.
Column
(
db
.
Integer
,
doc
=
'晋城企业id'
,
comment
=
'晋城企业id'
)
supplier_name
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'客户名字'
,
comment
=
'客户名字'
)
buy_rate
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'采购占比'
,
comment
=
'采购占比'
)
buy_money
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'采购金额'
,
comment
=
'采购金额'
)
open_time
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'公开时间'
,
comment
=
'公开时间'
)
data_source
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'数据来源'
,
comment
=
'数据来源'
)
relation
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'关联关系'
,
comment
=
'关联关系'
)
# 晋城企业客户
class
CompanyCustomer
(
db
.
Model
):
__tablename_
=
"company_customer"
__table_args__
=
({
'comment'
:
'晋城企业客户数据表'
})
# 添加表注释
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
,
autoincrement
=
True
,
doc
=
'晋城企业客户主键id'
,
comment
=
'晋城企业客户主键id'
)
# 企业
company_id
=
db
.
Column
(
db
.
Integer
,
doc
=
'晋城企业id'
,
comment
=
'晋城企业id'
)
customer_name
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'客户'
,
comment
=
'客户'
)
sales_rate
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'销售占比'
,
comment
=
'销售占比'
)
sales_money
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'销售金额'
,
comment
=
'销售金额'
)
open_time
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'公开时间'
,
comment
=
'公开时间'
)
data_source
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'数据来源'
,
comment
=
'数据来源'
)
relation
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'关联关系'
,
comment
=
'关联关系'
)
# 产业导航目录
# 产业导航目录
class
Industry
(
db
.
Model
):
class
Industry
(
db
.
Model
):
__tablename_
=
"industry"
__tablename_
=
"industry"
...
...
apps/util.py
View file @
904b82da
...
@@ -4,7 +4,7 @@ from itsdangerous import TimedJSONWebSignatureSerializer as Serializer
...
@@ -4,7 +4,7 @@ from itsdangerous import TimedJSONWebSignatureSerializer as Serializer
from
itsdangerous
import
SignatureExpired
,
BadSignature
from
itsdangerous
import
SignatureExpired
,
BadSignature
from
flask
import
request
,
jsonify
,
current_app
from
flask
import
request
,
jsonify
,
current_app
from
config
import
Config
from
config
import
Config
from
apps.models
import
User
,
Bstage
#
from apps.models import User, Bstage
import
functools
import
functools
# from flask_httpauth import HTTPBasicAuth
# from flask_httpauth import HTTPBasicAuth
#
#
...
...
apps/utils/neo4j_conn.py
View file @
904b82da
...
@@ -2,45 +2,11 @@ from py2neo import Graph
...
@@ -2,45 +2,11 @@ from py2neo import Graph
def
conn_neo4j
():
def
conn_neo4j
():
graph
=
Graph
(
"http://localhost:7474"
,
username
=
"neo4j"
,
password
=
"century-english-almanac-havana-golf-9040"
)
#
graph = Graph("http://localhost:7474", username="neo4j", password="century-english-almanac-havana-golf-9040")
#
graph = Graph("http://localhost:7474", username="neo4j", password="123456")
graph
=
Graph
(
"http://localhost:7474"
,
username
=
"neo4j"
,
password
=
"123456"
)
return
graph
return
graph
# 'match (n) -[r:`下位产品`]->(m) WHERE n.name=\\'网络安全\\' return n.name,r.type,m.name'
# s = "match (n) -[r:`下位产品`]->(m) WHERE n.name='轨道交通' return n.name,r.type,m.name"
# #
# graph = conn_neo4j()
# res = graph.run(s).data()
# print(res)
def
neo4j_dict
():
def
neo4j_dict
():
ptp
=
{
"轨道交通"
:
"轨道交通"
,
ptp
=
{
"煤层气开采储运利用"
:
"煤层气开采储运利用"
}
"新能源汽车"
:
"新能源汽车"
,
"智能煤机"
:
"智能煤机"
,
"数控机床及机器人"
:
"工业机器人"
,
"通用航空"
:
"通用航空"
,
"智能电网"
:
"智能电网"
,
"氢能"
:
"氢能"
,
"碳基新材料"
:
"碳基新材料"
,
"特种金属新材料"
:
"特种金属材料"
,
"化工新材料"
:
"新型化工材料"
,
"生物基新材料"
:
"生物基新材料"
,
"信息技术应用创新"
:
"信息创新技术"
,
"网络安全"
:
"网络安全"
,
"云计算"
:
"云计算"
,
"大数据及人工智能"
:
"大数据及人工智能"
,
"物联网"
:
"物联网"
,
"康养产业"
:
"康养服务"
,
"生物制药"
:
"生物医药"
,
"现代物流"
:
"现代物流"
,
"现代金融"
:
"现代金融"
,
"半导体及光电子"
:
"新一代半导体"
,
"节能环保"
:
"节能环保装备"
}
return
ptp
return
ptp
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