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
c2835501
Commit
c2835501
authored
Apr 03, 2023
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix20230403
parent
42720040
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
apps/view_radar/view.py
+3
-6
No files found.
apps/view_radar/view.py
View file @
c2835501
...
...
@@ -280,7 +280,7 @@ def prolink():
page
=
req_dict
.
get
(
"page"
)
# page
perpage
=
req_dict
.
get
(
"perpage"
)
# perpage
data
=
redis_store
.
get
(
'three_link_{}_{}
'
.
format
(
inid
,
link_typ
e
))
data
=
redis_store
.
get
(
'three_link_{}_{}
_{}'
.
format
(
inid
,
link_type
,
pag
e
))
if
data
:
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"获取成功"
,
data
=
json
.
loads
(
data
))
...
...
@@ -324,10 +324,7 @@ def prolink():
df2
=
[]
# 按照企业数量排序
for
name
in
result_bylink
:
# company_count = Enterprise.query.filter(Enterprise.city != '晋城市',
# Enterprise.product_all.like("%{}%".format(name))).count()
# for name in result_bylink:
for
name
in
result_bylink
[
0
:
13
]:
company_count
=
Enterprise
.
query
.
filter
(
Enterprise
.
city
!=
'晋城市'
)
.
filter
(
or_
(
Enterprise
.
product_all
.
like
(
"
%
{}
%
"
.
format
(
name
)),
Enterprise
.
product_all1
.
like
(
"
%
{}
%
"
.
format
(
name
)),
...
...
@@ -339,7 +336,7 @@ def prolink():
data
=
{
"df"
:
df2
,
"size"
:
res
}
try
:
redis_store
.
setex
(
"three_link_
%
s_
%
s
"
%
(
inid
,
link_typ
e
),
30
*
24
*
3600
,
json
.
dumps
(
data
))
redis_store
.
setex
(
"three_link_
%
s_
%
s
_
%
s"
%
(
inid
,
link_type
,
pag
e
),
30
*
24
*
3600
,
json
.
dumps
(
data
))
except
Exception
as
e
:
current_app
.
logger
.
error
(
e
)
return
jsonify
(
code
=
RET
.
DBERR
,
msg
=
"保存产业/企业数量信息异常"
)
...
...
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