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
2202041e
Commit
2202041e
authored
Feb 13, 2022
by
赵宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
d58a9e55
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
7 deletions
+55
-7
apps/models.py
+0
-0
apps/view_360company/view.py
+52
-3
apps/view_atlas/view.py
+1
-2
apps/view_index/view.py
+0
-0
apps/view_map/view.py
+2
-2
No files found.
apps/models.py
View file @
2202041e
This diff is collapsed.
Click to expand it.
apps/view_360company/view.py
View file @
2202041e
...
@@ -9,6 +9,57 @@ from apps.utils.response_code import RET
...
@@ -9,6 +9,57 @@ from apps.utils.response_code import RET
from
apps
import
redis_store
from
apps
import
redis_store
# 默认显示全国企业数据功能接口
@api_portraits.route
(
'/GetAllEnterprise'
,
methods
=
[
'POST'
])
def
get_all_enterprise
():
'''
默认显示全国企业数据功能接口
:return:
'''
req_dict
=
request
.
get_json
()
page
=
req_dict
.
get
(
"page"
)
perpage
=
req_dict
.
get
(
"perpage"
)
# 校验参数完整性
if
not
all
([
id
]):
return
jsonify
(
code
=
RET
.
PARAMERR
,
msg
=
"参数不完整"
)
try
:
enterprise_list
=
Enterprise
.
query
.
paginate
(
page
,
perpage
)
.
items
if
enterprise_list
:
data
=
[{
"id"
:
enterprise
.
id
,
"company"
:
enterprise
.
company_name
,
# 企业名
"area"
:
enterprise
.
city
+
enterprise
.
district
,
"createtime"
:
enterprise
.
build_date
,
"legal"
:
enterprise
.
legal
,
"capital"
:
enterprise
.
capital
,
"entype"
:
enterprise
.
entype
,
"address"
:
enterprise
.
address
,
"telephone"
:
enterprise
.
telephone
,
"fianacing"
:
'融资企业'
if
enterprise
.
fianacing
==
"1"
else
''
,
"quoted_company"
:
'上市企业'
if
enterprise
.
quoted_company
==
"1"
else
''
,
"high_new"
:
'高新技术企业'
if
enterprise
.
high_new
==
'1'
else
"-"
,
"tbe"
:
'科技型中小企业'
if
enterprise
.
tbe
==
'1'
else
"-"
,
"quoted_enterprise"
:
'上市企业'
if
enterprise
.
quoted_company
==
'1'
else
"-"
,
"unicorn"
:
'独角兽企业'
if
enterprise
.
unicorn
==
'1'
else
"-"
,
"dengl"
:
'瞪羚'
if
enterprise
.
dengl
==
'1'
else
"-"
,
"isfive"
:
'中国500强'
if
enterprise
.
isfive
==
'1'
else
"-"
,
"zjtg"
:
'专精特新企业'
if
enterprise
.
zjtg
==
'1'
else
"-"
,
"zjtg_gjjxjr"
:
'国家级专精特新小巨人企业'
if
enterprise
.
zjtg_gjjxjr
==
'1'
else
"-"
,
"zjtg_sjxjr"
:
'省级专精特新小巨人企业'
if
enterprise
.
zjtg_sjxjr
==
'1'
else
"-"
,
"tbe_sjmy"
:
'省级民营科技企业'
if
enterprise
.
tbe_sjmy
==
'1'
else
"-"
,
}
for
enterprise
in
enterprise_list
]
else
:
return
jsonify
(
code
=
RET
.
NODATA
,
msg
=
"查无数据"
)
except
Exception
as
e
:
current_app
.
logger
.
error
(
e
)
return
jsonify
(
code
=
RET
.
DBERR
,
msg
=
"数据库查询错误"
)
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"获取成功"
,
data
=
data
)
# 360企业画像--筛选条件下拉框
# 360企业画像--筛选条件下拉框
@api_portraits.route
(
'/DropDownBox'
,
methods
=
[
'GET'
])
@api_portraits.route
(
'/DropDownBox'
,
methods
=
[
'GET'
])
# @login_required
# @login_required
...
@@ -310,7 +361,6 @@ def create_body(page, page_size, args_query, args_term):
...
@@ -310,7 +361,6 @@ def create_body(page, page_size, args_query, args_term):
print
(
body
)
print
(
body
)
return
body
return
body
# 原始
# 原始
# def create_body(page, page_size, args_query, args_term):
# def create_body(page, page_size, args_query, args_term):
# body = {
# body = {
...
@@ -358,4 +408,4 @@ def create_body(page, page_size, args_query, args_term):
...
@@ -358,4 +408,4 @@ def create_body(page, page_size, args_query, args_term):
# for k, v in args_term.items():
# for k, v in args_term.items():
# body["query"]["bool"]["must"].append({"term": {"{}".format(k): "{}".format(v)}})
# body["query"]["bool"]["must"].append({"term": {"{}".format(k): "{}".format(v)}})
#
#
# return body
# return body
\ No newline at end of file
apps/view_atlas/view.py
View file @
2202041e
...
@@ -89,7 +89,7 @@ def get_cluster():
...
@@ -89,7 +89,7 @@ def get_cluster():
current_app
.
logger
.
error
(
e
)
current_app
.
logger
.
error
(
e
)
#
行业产品公司数量(链图,根据地理位置)
#
返回上中下游产业链数据接口
@api_atlas.route
(
'/industry/chain'
,
methods
=
[
'POST'
])
@api_atlas.route
(
'/industry/chain'
,
methods
=
[
'POST'
])
# @login_required
# @login_required
def
industry_chain
():
def
industry_chain
():
...
@@ -99,7 +99,6 @@ def industry_chain():
...
@@ -99,7 +99,6 @@ def industry_chain():
'''
'''
req_dict
=
request
.
get_json
()
req_dict
=
request
.
get_json
()
inid
=
req_dict
.
get
(
"inid"
)
# 二级行业id(二级行业显示链图)
inid
=
req_dict
.
get
(
"inid"
)
# 二级行业id(二级行业显示链图)
# district = req_dict.get("district") # 区县
# 校验参数完整性
# 校验参数完整性
if
not
all
([
inid
]):
if
not
all
([
inid
]):
...
...
apps/view_index/view.py
View file @
2202041e
This diff is collapsed.
Click to expand it.
apps/view_map/view.py
View file @
2202041e
...
@@ -79,7 +79,7 @@ def attract_map():
...
@@ -79,7 +79,7 @@ def attract_map():
district_data
=
Enterprise
.
query
.
filter_by
(
province
=
province
,
city
=
city
,
district
=
dis
)
.
first
()
district_data
=
Enterprise
.
query
.
filter_by
(
province
=
province
,
city
=
city
,
district
=
dis
)
.
first
()
df
.
append
({
"name"
:
dis
,
df
.
append
({
"name"
:
dis
,
"value"
:
num
,
"value"
:
num
,
"color"
:
jishu
(
num
),
#
"color": jishu(num),
"jwd"
:
{
"lng"
:
district_data
.
d_lng
,
"lat"
:
district_data
.
d_lat
}})
"jwd"
:
{
"lng"
:
district_data
.
d_lng
,
"lat"
:
district_data
.
d_lat
}})
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"获取成功"
,
data
=
df
)
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"获取成功"
,
data
=
df
)
...
@@ -90,7 +90,7 @@ def attract_map():
...
@@ -90,7 +90,7 @@ def attract_map():
if
district_data
:
if
district_data
:
df
.
append
({
"name"
:
district
,
df
.
append
({
"name"
:
district
,
"value"
:
num
,
"value"
:
num
,
"color"
:
""
,
#
"color": "",
"jwd"
:
{
"lng"
:
district_data
.
d_lng
,
"lat"
:
district_data
.
d_lat
}})
"jwd"
:
{
"lng"
:
district_data
.
d_lng
,
"lat"
:
district_data
.
d_lat
}})
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"获取成功"
,
data
=
df
)
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"获取成功"
,
data
=
df
)
else
:
else
:
...
...
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