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
c53e9a4f
Commit
c53e9a4f
authored
Apr 11, 2023
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix20230411
parent
686df175
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
apps/view_atlas/view.py
+5
-5
No files found.
apps/view_atlas/view.py
View file @
c53e9a4f
...
...
@@ -344,8 +344,8 @@ def find_up_thr1(chain_id, industry_type, industry_id, flag):
"subNodeList"
:
[]
}
node_two
[
"subNodeList"
]
.
append
(
node_thr
)
node_one
[
"subNodeList"
]
.
append
(
node_two
)
node_two
.
update
({
"company_count"
:
len
(
set
(
two_id_li
))})
node_one
[
"subNodeList"
]
.
append
(
node_two
)
# node_one.update({"company_count": len(set(one_id_li)), "enterprise_count": total_count})
node_one
.
update
({
"company_count"
:
len
(
set
(
one_id_li
))})
data
[
"subNodeList"
]
.
append
(
node_one
)
...
...
@@ -1112,12 +1112,12 @@ def search_enterprise():
return
jsonify
(
code
=
RET
.
DBERR
,
msg
=
'查询出错!'
)
def
get_product_li
(
product
):
def
get_product_li
(
product
,
inid
):
res_two_li
=
[]
res_three_li
=
[]
product_id
=
IndustryChain
.
query
.
filter_by
(
industry_name
=
product
)
.
first
()
.
id
product_id
=
IndustryChain
.
query
.
filter_by
(
industry_name
=
product
,
chain_id
=
inid
)
.
first
()
.
id
product_li
=
[{
"chain_name"
:
product
,
"chain_name_id"
:
product_id
}]
chain_one_obj_list
=
IndustryChain
.
query
.
filter_by
(
relate_id
=
product_id
)
.
all
()
chain_one_obj_list
=
IndustryChain
.
query
.
filter_by
(
relate_id
=
product_id
,
chain_id
=
inid
)
.
all
()
res_one_li
=
[{
"chain_name"
:
chain_one_obj
.
industry_name
,
"chain_name_id"
:
chain_one_obj
.
id
}
for
chain_one_obj
in
chain_one_obj_list
]
...
...
@@ -1193,7 +1193,7 @@ def industry_enterprise():
if
product
:
# 点击上级环节,展示本级所有企业
product_li
=
get_product_li
(
product
)
product_li
=
get_product_li
(
product
,
inid
)
company1
=
[]
for
product
in
product_li
:
company2
=
''
...
...
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