Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
蒋勇
zhichan
Commits
dd60b4c8
Commit
dd60b4c8
authored
May 19, 2020
by
黄静
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hj
parent
b120ec7f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
31 deletions
+27
-31
entprofile/service/__pycache__/select_es_result.cpython-37.pyc
+0
-0
entprofile/service/select_es_result.py
+27
-31
No files found.
entprofile/service/__pycache__/select_es_result.cpython-37.pyc
View file @
dd60b4c8
No preview for this file type
entprofile/service/select_es_result.py
View file @
dd60b4c8
...
...
@@ -30,6 +30,20 @@ class HX:
# self.es = Elasticsearch([self.esip], port=self.esport)
def
hxsearch
(
self
,
re_item
):
if
re_item
==
[]:
querybody
=
{
"query"
:
{
"bool"
:
{
"must"
:
[
{
"match_all"
:
{}
}
]
}
},
"size"
:
2000
}
else
:
querybody
=
{
"query"
:
{
"bool"
:
{
...
...
@@ -39,7 +53,6 @@ class HX:
},
"size"
:
2000
,
}
if
"qiyeguimo"
in
re_item
:
dsl
=
{
"terms"
:
{
...
...
@@ -270,47 +283,30 @@ def hx_company_list(server):
def
hx_select_main
():
if
request
.
method
==
'POST'
:
requestdata
=
request
.
json
try
:
base_result_list
=
[]
print
(
requestdata
,
1121212
)
base_result
=
""
re_item
=
{}
# try
:
if
requestdata
!=
[]
:
for
item
in
requestdata
:
name
=
item
[
'name'
]
list
=
item
[
'list'
]
re_item
[
name
]
=
list
company_hx_list
=
hx
.
hxsearch
(
re_item
)
base_result_list
=
[]
for
company_name
in
company_hx_list
:
base_result
=
companybase
.
companyinfo
(
company_name
)
logo_url
=
hx
.
select_url
(
company_name
)
base_result
[
'logo'
]
=
logo_url
base_result_list
.
append
(
base_result
)
print
(
"len_result"
,
len
(
base_result_list
))
# except:
# base_result = [{
# "company_name": "北京晟软在线科技有限公司",
# "business_scope": "技术开发、技术转让、技术咨询、技术服务;计算机系统服务;应用软件服务;软件开发。(企业依法自主选择经营项目,开展经营活动;依法须经批准的项目,经相关部门批准后依批准的内容开展经营活动;不得从事本市产业政策禁止和限制类项目的经营活动。)",
# "reg_unit": "100.000",
# "establish_time": "2010-11-03",
# "legal_person_name": "赵学军",
# "reg_location": "北京市海淀区中关村软件园11号楼3层330",
# "logo": "https://gsb-zc.oss-cn-beijing.aliyuncs.com/北京晟软在线科技有限公司.png"
# }, {
# "company_name": "北京游逗科技有限公司",
# "business_scope": "技术推广服务;票务代理(不含航空机票销售代理);旅游信息咨询(不含中介服务);酒店管理;风景名胜区规划;企业形象策划;企业管理咨询(不含中介服务);应用软件服务(不含医用软件服务);销售计算机、软件及辅助设备、电子产品、通讯设备;计算机系统服务。(企业依法自主选择经营项目,开展经营活动;依法须经批准的项目,经相关部门批准后依批准的内容开展经营活动;不得从事本市产业政策禁止和限制类项目的经营活动。)",
# "reg_unit": "200.000",
# "establish_time": "2017-11-27",
# "legal_person_name": "王京",
# "reg_location": "北京市丰台区程庄北里13号楼二层207室",
# "logo": "暂无logo"
# }, {
# "company_name": "北京码农村科技有限公司",
# "business_scope": "技术开发、技术转让、技术咨询、技术推广、技术服务;计算机系统服务;软件开发;电脑动画设计;经济贸易咨询;企业策划;企业管理咨询;销售自行开发后的产品。(企业依法自主选择经营项目,开展经营活动;依法须经批准的项目,经相关部门批准后依批准的内容开展经营活动;不得从事本市产业政策禁止和限制类项目的经营活动。)",
# "reg_unit": "100.000",
# "establish_time": "2016-07-06",
# "legal_person_name": "白冰",
# "reg_location": "北京市海淀区高里掌路1号院6号楼104-165",
# "logo": "暂无logo"
# }]
print
(
base_result_list
,
111
)
else
:
company_hx_list
=
hx
.
hxsearch
(
requestdata
)
for
company_name
in
company_hx_list
:
base_result
=
companybase
.
companyinfo
(
company_name
)
logo_url
=
hx
.
select_url
(
company_name
)
base_result
[
'logo'
]
=
logo_url
base_result_list
.
append
(
base_result
)
print
(
"len_result"
,
len
(
base_result_list
))
except
:
base_result_list
=
"暂无该检索信息,请您修改条件进行检索!"
return
{
"status"
:
200
,
"msg"
:
"成功"
,
"data"
:
base_result_list
}
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