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
a0fa13b1
Commit
a0fa13b1
authored
Jan 09, 2023
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix20230109
parent
23fd0b8b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
apps/view_atlas/view.py
+9
-12
No files found.
apps/view_atlas/view.py
View file @
a0fa13b1
...
@@ -217,7 +217,6 @@ def find_up_thr1(industry_type, industry_id):
...
@@ -217,7 +217,6 @@ def find_up_thr1(industry_type, industry_id):
for
pname_one
in
res_one
:
# 一级节点
for
pname_one
in
res_one
:
# 一级节点
chain_name1
=
pname_one
[
"chain_name"
]
chain_name1
=
pname_one
[
"chain_name"
]
total_count
=
0
total_count
=
0
node_one
=
''
# 一级的企业数量
# 一级的企业数量
company_count
=
get_count
(
chain_name1
)
company_count
=
get_count
(
chain_name1
)
total_count
+=
company_count
total_count
+=
company_count
...
@@ -234,8 +233,7 @@ def find_up_thr1(industry_type, industry_id):
...
@@ -234,8 +233,7 @@ def find_up_thr1(industry_type, industry_id):
"chain_name_id"
:
chain_two_obj
.
id
"chain_name_id"
:
chain_two_obj
.
id
}
for
chain_two_obj
in
chain_two_obj_list
]
}
for
chain_two_obj
in
chain_two_obj_list
]
for
item
in
res_two
:
for
pname_two
in
res_two
:
pname_two
=
item
chain_name2
=
pname_two
[
"chain_name"
]
chain_name2
=
pname_two
[
"chain_name"
]
company_count
=
get_count
(
chain_name2
)
company_count
=
get_count
(
chain_name2
)
total_count
+=
company_count
total_count
+=
company_count
...
@@ -252,8 +250,7 @@ def find_up_thr1(industry_type, industry_id):
...
@@ -252,8 +250,7 @@ def find_up_thr1(industry_type, industry_id):
res_three
=
[{
"chain_name"
:
chain_three_obj
.
industry_name
,
res_three
=
[{
"chain_name"
:
chain_three_obj
.
industry_name
,
"chain_name_id"
:
chain_three_obj
.
id
"chain_name_id"
:
chain_three_obj
.
id
}
for
chain_three_obj
in
chain_three_obj_list
]
}
for
chain_three_obj
in
chain_three_obj_list
]
for
itm
in
res_three
:
for
pname_thr
in
res_three
:
pname_thr
=
itm
chain_name3
=
pname_thr
[
"chain_name"
]
chain_name3
=
pname_thr
[
"chain_name"
]
company_count
=
get_count
(
chain_name3
)
company_count
=
get_count
(
chain_name3
)
total_count
+=
company_count
total_count
+=
company_count
...
@@ -266,13 +263,13 @@ def find_up_thr1(industry_type, industry_id):
...
@@ -266,13 +263,13 @@ def find_up_thr1(industry_type, industry_id):
"subNodeList"
:
[]
"subNodeList"
:
[]
}
}
node_two
[
"subNodeList"
]
.
append
(
node_thr
)
node_two
[
"subNodeList"
]
.
append
(
node_thr
)
# 一级
#
#
一级
node_one
=
{
#
node_one = {
"node"
:
"{}"
.
format
(
chain_name1
),
#
"node": "{}".format(chain_name1),
"level"
:
2
,
#
"level": 2,
"company_count"
:
total_count
,
#
"company_count": total_count,
"subNodeList"
:
[]
#
"subNodeList": []
}
#
}
node_one
[
"subNodeList"
]
.
append
(
node_two
)
node_one
[
"subNodeList"
]
.
append
(
node_two
)
data
[
"subNodeList"
]
.
append
(
node_one
)
data
[
"subNodeList"
]
.
append
(
node_one
)
return
data
return
data
...
...
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