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
4115f64a
Commit
4115f64a
authored
Feb 23, 2023
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix20230223
parent
d99b26b4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
1 deletions
+9
-1
apps/models.py
+0
-0
apps/view_choose/map_view.py
+1
-1
apps/view_map/view.py
+8
-0
apps/view_xiaocx/view.py
+0
-0
No files found.
apps/models.py
View file @
4115f64a
This diff is collapsed.
Click to expand it.
apps/view_choose/map_view.py
View file @
4115f64a
...
...
@@ -52,7 +52,7 @@ def show_area():
# print(gong_total_area)
# 获取商业用地面积
shang_area_obj_list
=
com
.
get_total_land_area
(
''
,
''
,
district_name
,
'商
业
用地'
,
''
)
shang_area_obj_list
=
com
.
get_total_land_area
(
''
,
''
,
district_name
,
'商
服
用地'
,
''
)
shang_total_area
=
round
(
sum
([
float
(
area_obj
.
total_area
if
area_obj
.
total_area
else
0
)
for
area_obj
in
shang_area_obj_list
]),
2
)
# print(shang_total_area)
...
...
apps/view_map/view.py
View file @
4115f64a
...
...
@@ -44,6 +44,11 @@ def attract_map():
district
=
req_dict
.
get
(
"district"
)
product
=
req_dict
.
get
(
"product"
)
# 产业产品选择
name_query
=
"AttractMap"
+
str
(
inid
)
+
province
+
city
+
district
+
product
if
redis_store
.
get
(
name_query
)
is
not
None
:
data
=
json
.
loads
(
redis_store
.
get
(
name_query
))
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"获取成功"
,
data
=
data
)
try
:
enterprise
=
Enterprise
.
query
.
filter
(
or_
(
Enterprise
.
c_type
==
inid
,
...
...
@@ -108,6 +113,9 @@ def attract_map():
"color"
:
""
,
# "jwd": {"lng": district_data.d_lng, "lat": district_data.d_lat}})
})
# redis缓存
redis_store
.
setex
(
name_query
,
30
*
24
*
3600
,
json
.
dumps
(
df
))
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"获取成功"
,
data
=
df
)
else
:
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"无满足条件数据"
,
data
=
df
)
...
...
apps/view_xiaocx/view.py
View file @
4115f64a
This diff is collapsed.
Click to expand it.
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