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
e981c08a
Commit
e981c08a
authored
Apr 06, 2023
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix20230406
parent
d9c1b347
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
30 deletions
+54
-30
apps/view_atlas/view.py
+15
-13
apps/view_choose/choose_view.py
+4
-3
apps/view_index/view.py
+23
-12
apps/view_xiaocx/view.py
+12
-2
No files found.
apps/view_atlas/view.py
View file @
e981c08a
...
@@ -654,13 +654,15 @@ def industry_policy():
...
@@ -654,13 +654,15 @@ def industry_policy():
try
:
try
:
indu_policy
=
''
indu_policy
=
''
size
=
''
size
=
''
name
=
IndustryChain
.
query
.
filter_by
(
id
=
inid
)
.
first
()
.
industry_name
# 获取导航对应的真名
name
=
''
if
inid
:
name
=
IndustryChain
.
query
.
filter_by
(
id
=
inid
)
.
first
()
.
industry_name
# 获取导航对应的真名
# name = '煤层气'
# name = '煤层气'
# print(name)
# print(name)
if
industry_level
==
1
:
if
industry_level
==
1
:
if
policy_level
==
1
:
# 国家级
if
policy_level
==
1
:
# 国家级
indu_policy
=
InduPolicy
.
query
.
filter
(
indu_policy
=
InduPolicy
.
query
.
filter
(
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
))
if
name
else
text
(
''
)
,
InduPolicy
.
level
==
"国家级"
,
InduPolicy
.
level
==
"国家级"
,
InduPolicy
.
org
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
InduPolicy
.
org
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
...
@@ -672,7 +674,7 @@ def industry_policy():
...
@@ -672,7 +674,7 @@ def industry_policy():
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
elif
policy_level
==
2
:
# 省级
elif
policy_level
==
2
:
# 省级
indu_policy
=
InduPolicy
.
query
.
filter
(
indu_policy
=
InduPolicy
.
query
.
filter
(
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
))
if
name
else
text
(
''
)
,
InduPolicy
.
level
==
"省级"
,
InduPolicy
.
level
==
"省级"
,
InduPolicy
.
org
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
InduPolicy
.
org
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
...
@@ -682,7 +684,7 @@ def industry_policy():
...
@@ -682,7 +684,7 @@ def industry_policy():
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
elif
policy_level
==
3
:
# 市级
elif
policy_level
==
3
:
# 市级
indu_policy
=
InduPolicy
.
query
.
filter
(
indu_policy
=
InduPolicy
.
query
.
filter
(
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
))
if
name
else
text
(
''
)
,
InduPolicy
.
level
==
"市级"
,
InduPolicy
.
level
==
"市级"
,
InduPolicy
.
org
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
InduPolicy
.
org
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
...
@@ -692,7 +694,7 @@ def industry_policy():
...
@@ -692,7 +694,7 @@ def industry_policy():
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
elif
policy_level
==
4
:
# 区县
elif
policy_level
==
4
:
# 区县
indu_policy
=
InduPolicy
.
query
.
filter
(
indu_policy
=
InduPolicy
.
query
.
filter
(
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
))
if
name
else
text
(
''
)
,
InduPolicy
.
level
==
"区县"
,
InduPolicy
.
level
==
"区县"
,
InduPolicy
.
district
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
InduPolicy
.
district
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
...
@@ -702,7 +704,7 @@ def industry_policy():
...
@@ -702,7 +704,7 @@ def industry_policy():
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
elif
policy_level
==
5
:
# 开发区
elif
policy_level
==
5
:
# 开发区
indu_policy
=
InduPolicy
.
query
.
filter
(
indu_policy
=
InduPolicy
.
query
.
filter
(
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
))
if
name
else
text
(
''
)
,
InduPolicy
.
level
==
"开发区"
,
InduPolicy
.
level
==
"开发区"
,
InduPolicy
.
district
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
InduPolicy
.
district
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
...
@@ -712,7 +714,7 @@ def industry_policy():
...
@@ -712,7 +714,7 @@ def industry_policy():
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
else
:
else
:
indu_policy
=
InduPolicy
.
query
.
filter
(
indu_policy
=
InduPolicy
.
query
.
filter
(
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
))
if
name
else
text
(
''
)
,
# InduPolicy.level == "国家级",
# InduPolicy.level == "国家级",
InduPolicy
.
org
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
InduPolicy
.
org
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
# InduPolicy.district == policy_type if policy_type != '全部' else text(''),
# InduPolicy.district == policy_type if policy_type != '全部' else text(''),
...
@@ -726,7 +728,7 @@ def industry_policy():
...
@@ -726,7 +728,7 @@ def industry_policy():
if
industry_level
==
2
:
if
industry_level
==
2
:
if
policy_level
==
1
:
# 国家级
if
policy_level
==
1
:
# 国家级
indu_policy
=
InduPolicy
.
query
.
filter
(
indu_policy
=
InduPolicy
.
query
.
filter
(
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
))
if
name
else
text
(
''
)
,
InduPolicy
.
level
==
"国家级"
,
InduPolicy
.
level
==
"国家级"
,
InduPolicy
.
org
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
InduPolicy
.
org
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
...
@@ -736,7 +738,7 @@ def industry_policy():
...
@@ -736,7 +738,7 @@ def industry_policy():
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
elif
policy_level
==
2
:
# 省级
elif
policy_level
==
2
:
# 省级
indu_policy
=
InduPolicy
.
query
.
filter
(
indu_policy
=
InduPolicy
.
query
.
filter
(
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
))
if
name
else
text
(
''
)
,
InduPolicy
.
level
==
"省级"
,
InduPolicy
.
level
==
"省级"
,
InduPolicy
.
org
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
InduPolicy
.
org
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
...
@@ -746,7 +748,7 @@ def industry_policy():
...
@@ -746,7 +748,7 @@ def industry_policy():
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
elif
policy_level
==
3
:
# 市级
elif
policy_level
==
3
:
# 市级
indu_policy
=
InduPolicy
.
query
.
filter
(
indu_policy
=
InduPolicy
.
query
.
filter
(
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
))
if
name
else
text
(
''
)
,
InduPolicy
.
level
==
"市级"
,
InduPolicy
.
level
==
"市级"
,
InduPolicy
.
org
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
InduPolicy
.
org
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
...
@@ -756,7 +758,7 @@ def industry_policy():
...
@@ -756,7 +758,7 @@ def industry_policy():
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
elif
policy_level
==
4
:
# 区县
elif
policy_level
==
4
:
# 区县
indu_policy
=
InduPolicy
.
query
.
filter
(
indu_policy
=
InduPolicy
.
query
.
filter
(
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
))
if
name
else
text
(
''
)
,
InduPolicy
.
level
==
"区县"
,
InduPolicy
.
level
==
"区县"
,
InduPolicy
.
district
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
InduPolicy
.
district
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
...
@@ -766,7 +768,7 @@ def industry_policy():
...
@@ -766,7 +768,7 @@ def industry_policy():
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
elif
policy_level
==
5
:
# 开发区
elif
policy_level
==
5
:
# 开发区
indu_policy
=
InduPolicy
.
query
.
filter
(
indu_policy
=
InduPolicy
.
query
.
filter
(
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
))
if
name
else
text
(
''
)
,
InduPolicy
.
level
==
"开发区"
,
InduPolicy
.
level
==
"开发区"
,
InduPolicy
.
district
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
InduPolicy
.
district
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
...
@@ -776,7 +778,7 @@ def industry_policy():
...
@@ -776,7 +778,7 @@ def industry_policy():
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
indu_policy
=
indu_policy
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
.
paginate
(
page
,
perpage
)
.
items
else
:
else
:
indu_policy
=
InduPolicy
.
query
.
filter
(
indu_policy
=
InduPolicy
.
query
.
filter
(
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
)),
InduPolicy
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
))
if
name
else
text
(
''
)
,
# InduPolicy.level == "国家级",
# InduPolicy.level == "国家级",
InduPolicy
.
org
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
InduPolicy
.
org
==
policy_type
if
policy_type
!=
'全部'
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
InduPolicy
.
year
==
policy_year
if
policy_year
else
text
(
''
),
...
...
apps/view_choose/choose_view.py
View file @
e981c08a
...
@@ -81,6 +81,7 @@ def global_region(industry_id, preference, key_words, district_name, page, per_p
...
@@ -81,6 +81,7 @@ def global_region(industry_id, preference, key_words, district_name, page, per_p
"detail_address"
:
region_obj
.
address
,
# 审核信息
"detail_address"
:
region_obj
.
address
,
# 审核信息
"industry_name"
:
region_obj
.
navigat
,
"industry_name"
:
region_obj
.
navigat
,
"district_name"
:
region_obj
.
region
,
"district_name"
:
region_obj
.
region
,
"price_url"
:
region_obj
.
image
,
"lng"
:
region_obj
.
lng
,
"lng"
:
region_obj
.
lng
,
"lat"
:
region_obj
.
lat
"lat"
:
region_obj
.
lat
}
for
region_obj
in
region_obj_list
]
}
for
region_obj
in
region_obj_list
]
...
@@ -130,10 +131,8 @@ def global_land(key_words, district_name, land_name, land_nature, industry_name,
...
@@ -130,10 +131,8 @@ def global_land(key_words, district_name, land_name, land_nature, industry_name,
"land_name"
:
land_obj
.
land_name
,
"land_name"
:
land_obj
.
land_name
,
"land_nature"
:
land_obj
.
land_nature
,
"land_nature"
:
land_obj
.
land_nature
,
"total_area"
:
land_obj
.
total_area
,
"total_area"
:
land_obj
.
total_area
,
# "jing_area": land_obj.jing_area, # 审核信息
"district_name"
:
land_obj
.
district_name
,
"district_name"
:
land_obj
.
district_name
,
# "industry_name": land_obj.industry_name,
"price_url"
:
land_obj
.
price_url
,
# "attract_status": land_obj.attract_status,
"lng"
:
land_obj
.
lng
,
"lng"
:
land_obj
.
lng
,
"lat"
:
land_obj
.
lat
"lat"
:
land_obj
.
lat
}
for
land_obj
in
land_obj_list
]
}
for
land_obj
in
land_obj_list
]
...
@@ -185,6 +184,7 @@ def global_factory(key_words, district_name, factory_name, industry_name, page,
...
@@ -185,6 +184,7 @@ def global_factory(key_words, district_name, factory_name, industry_name, page,
"industry_name"
:
factory_obj
.
attract_status
,
"industry_name"
:
factory_obj
.
attract_status
,
"is_standard"
:
factory_obj
.
is_standard
,
"is_standard"
:
factory_obj
.
is_standard
,
"attract_status"
:
factory_obj
.
attract_status
,
"attract_status"
:
factory_obj
.
attract_status
,
"price_url"
:
factory_obj
.
price_url
,
"lng"
:
factory_obj
.
lng
,
"lng"
:
factory_obj
.
lng
,
"lat"
:
factory_obj
.
lat
"lat"
:
factory_obj
.
lat
}
for
factory_obj
in
factory_obj_list
]
}
for
factory_obj
in
factory_obj_list
]
...
@@ -240,6 +240,7 @@ def global_build(key_words, district_name, build_name, industry_name, build_type
...
@@ -240,6 +240,7 @@ def global_build(key_words, district_name, build_name, industry_name, build_type
"build_type"
:
build_obj
.
build_type
,
"build_type"
:
build_obj
.
build_type
,
"attract_status"
:
build_obj
.
attract_status
,
"attract_status"
:
build_obj
.
attract_status
,
"rent_money"
:
build_obj
.
rent_money
,
"rent_money"
:
build_obj
.
rent_money
,
"price_url"
:
build_obj
.
price_url
,
"lng"
:
build_obj
.
lng
,
"lng"
:
build_obj
.
lng
,
"lat"
:
build_obj
.
lat
"lat"
:
build_obj
.
lat
}
for
build_obj
in
build_obj_list
]
}
for
build_obj
in
build_obj_list
]
...
...
apps/view_index/view.py
View file @
e981c08a
...
@@ -91,7 +91,7 @@ def data_notification():
...
@@ -91,7 +91,7 @@ def data_notification():
data_dic
=
{
data_dic
=
{
"content_name"
:
content_name
,
"content_name"
:
content_name
,
"content_url"
:
content_url_list
[
i
]
.
replace
(
'./'
,
'http://zsj.jcgov.gov.cn/sjtb/sjtb/'
),
"content_url"
:
content_url_list
[
i
]
.
replace
(
'./'
,
'http://zsj.jcgov.gov.cn/sjtb/sjtb/'
),
"time"
:
time_list
[
i
]
"time"
:
time_list
[
i
]
[
1
:
-
1
]
}
}
data_list
.
append
(
data_dic
)
data_list
.
append
(
data_dic
)
i
+=
1
i
+=
1
...
@@ -101,16 +101,23 @@ def data_notification():
...
@@ -101,16 +101,23 @@ def data_notification():
current_app
.
logger
.
error
(
e
)
current_app
.
logger
.
error
(
e
)
return
jsonify
(
code
=
RET
.
DBERR
,
msg
=
"数据库错误"
)
return
jsonify
(
code
=
RET
.
DBERR
,
msg
=
"数据库错误"
)
# # 存入数据库
# 存入数据库
# inform_obj = InvestmentInformation()
for
data
in
data_list
:
# for data in data_list:
content_name
=
data
[
'content_name'
]
# inform_obj.name = data['content_name']
inform_obj
=
InvestmentInformation
.
query
.
filter_by
(
flag
=
2
,
name
=
content_name
)
.
first
()
# inform_obj.flag = 1
if
inform_obj
:
# inform_obj.time = data['time']
inform_obj
.
time
=
data
[
'time'
]
# inform_obj.source = data['']
inform_obj
.
source
=
'晋城市投资促进中心'
# inform_obj.info = data['']
db
.
session
.
commit
()
# db.session.add(inform_obj)
continue
# db.session.commit()
inform_obj
=
InvestmentInformation
()
inform_obj
.
name
=
data
[
'content_name'
]
inform_obj
.
flag
=
2
inform_obj
.
time
=
data
[
'time'
]
inform_obj
.
source
=
'晋城市投资促进中心'
inform_obj
.
info
=
''
db
.
session
.
add
(
inform_obj
)
db
.
session
.
commit
()
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"获取成功"
,
data
=
data_list
)
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"获取成功"
,
data
=
data_list
)
...
@@ -169,9 +176,13 @@ def work_trend():
...
@@ -169,9 +176,13 @@ def work_trend():
# # 存入数据库
# # 存入数据库
for
data
in
data_list
:
for
data
in
data_list
:
content_name
=
data
[
'content_name'
]
inform_obj
=
InvestmentInformation
.
query
.
filter_by
(
flag
=
1
,
name
=
content_name
)
.
first
()
if
inform_obj
:
continue
inform_obj
=
InvestmentInformation
()
inform_obj
=
InvestmentInformation
()
inform_obj
.
name
=
data
[
'content_name'
]
inform_obj
.
name
=
data
[
'content_name'
]
inform_obj
.
flag
=
2
inform_obj
.
flag
=
1
inform_obj
.
time
=
data
[
'time'
]
inform_obj
.
time
=
data
[
'time'
]
inform_obj
.
source
=
'晋城市投资促进中心'
inform_obj
.
source
=
'晋城市投资促进中心'
inform_obj
.
content
=
data
[
'content_info'
]
inform_obj
.
content
=
data
[
'content_info'
]
...
...
apps/view_xiaocx/view.py
View file @
e981c08a
...
@@ -122,6 +122,7 @@ def index_search():
...
@@ -122,6 +122,7 @@ def index_search():
"district"
:
land_obj
.
district_name
,
"district"
:
land_obj
.
district_name
,
"nature"
:
land_obj
.
land_nature
,
"nature"
:
land_obj
.
land_nature
,
"area"
:
land_obj
.
total_area
,
"area"
:
land_obj
.
total_area
,
"price_url"
:
land_obj
.
price_url
,
"lng"
:
land_obj
.
lng
,
"lng"
:
land_obj
.
lng
,
"lat"
:
land_obj
.
lat
,
"lat"
:
land_obj
.
lat
,
}
for
land_obj
in
land_obj_list
]
}
for
land_obj
in
land_obj_list
]
...
@@ -165,6 +166,7 @@ def index_search():
...
@@ -165,6 +166,7 @@ def index_search():
"rent"
:
build_obj
.
rent_money
,
"rent"
:
build_obj
.
rent_money
,
"area"
:
build_obj
.
build_area
,
"area"
:
build_obj
.
build_area
,
"attract_status"
:
build_obj
.
attract_status
,
"attract_status"
:
build_obj
.
attract_status
,
"price_url"
:
build_obj
.
price_url
,
"lng"
:
build_obj
.
lng
,
"lng"
:
build_obj
.
lng
,
"lat"
:
build_obj
.
lat
,
"lat"
:
build_obj
.
lat
,
}
for
build_obj
in
build_obj_list
]
}
for
build_obj
in
build_obj_list
]
...
@@ -201,6 +203,7 @@ def index_search():
...
@@ -201,6 +203,7 @@ def index_search():
"district"
:
factory_obj
.
district_name
,
"district"
:
factory_obj
.
district_name
,
"attract_industry"
:
factory_obj
.
attract_status
,
"attract_industry"
:
factory_obj
.
attract_status
,
"area"
:
factory_obj
.
factory_area
,
"area"
:
factory_obj
.
factory_area
,
"price_url"
:
factory_obj
.
price_url
,
"lng"
:
factory_obj
.
lng
,
"lng"
:
factory_obj
.
lng
,
"lat"
:
factory_obj
.
lat
,
"lat"
:
factory_obj
.
lat
,
}
for
factory_obj
in
factory_obj_list
]
}
for
factory_obj
in
factory_obj_list
]
...
@@ -237,6 +240,7 @@ def index_search():
...
@@ -237,6 +240,7 @@ def index_search():
"phone"
:
zone_obj
.
phone
,
"phone"
:
zone_obj
.
phone
,
"industry_position"
:
zone_obj
.
industry_position
,
"industry_position"
:
zone_obj
.
industry_position
,
"district"
:
zone_obj
.
district
,
"district"
:
zone_obj
.
district
,
"price_url"
:
zone_obj
.
image
,
"lng"
:
zone_obj
.
lng
,
"lng"
:
zone_obj
.
lng
,
"lat"
:
zone_obj
.
lat
,
"lat"
:
zone_obj
.
lat
,
}
for
zone_obj
in
zone_obj_list
]
}
for
zone_obj
in
zone_obj_list
]
...
@@ -435,6 +439,7 @@ def company_detail():
...
@@ -435,6 +439,7 @@ def company_detail():
try
:
try
:
company_obj
=
Company
.
query
.
get
(
_id
)
company_obj
=
Company
.
query
.
get
(
_id
)
data
=
{
data
=
{
"id"
:
company_obj
.
id
,
"company_name"
:
company_obj
.
company_name
,
"company_name"
:
company_obj
.
company_name
,
"chain_master"
:
'链主'
if
company_obj
.
chain_master
==
'1'
else
''
,
"chain_master"
:
'链主'
if
company_obj
.
chain_master
==
'1'
else
''
,
"district"
:
company_obj
.
district
,
"district"
:
company_obj
.
district
,
...
@@ -859,8 +864,9 @@ def collection_list():
...
@@ -859,8 +864,9 @@ def collection_list():
"district"
:
obj
.
district_name
,
"district"
:
obj
.
district_name
,
"nature"
:
obj
.
land_nature
,
"nature"
:
obj
.
land_nature
,
"area"
:
obj
.
total_area
,
"area"
:
obj
.
total_area
,
"price_url"
:
obj
.
price_url
,
"lng"
:
obj
.
lng
,
"lng"
:
obj
.
lng
,
"lat"
:
obj
.
lat
"lat"
:
obj
.
lat
,
}
for
obj
in
obj_list
]
}
for
obj
in
obj_list
]
elif
name
==
'build'
:
elif
name
==
'build'
:
obj_list
=
user_obj
.
carrier_build
obj_list
=
user_obj
.
carrier_build
...
@@ -870,6 +876,7 @@ def collection_list():
...
@@ -870,6 +876,7 @@ def collection_list():
"district"
:
obj
.
district_name
,
"district"
:
obj
.
district_name
,
"rent"
:
obj
.
rent_money
,
"rent"
:
obj
.
rent_money
,
"area"
:
obj
.
build_area
,
"area"
:
obj
.
build_area
,
"price_url"
:
obj
.
price_url
,
"lng"
:
obj
.
lng
,
"lng"
:
obj
.
lng
,
"lat"
:
obj
.
lat
,
"lat"
:
obj
.
lat
,
}
for
obj
in
obj_list
]
}
for
obj
in
obj_list
]
...
@@ -881,6 +888,7 @@ def collection_list():
...
@@ -881,6 +888,7 @@ def collection_list():
"district"
:
obj
.
district_name
,
"district"
:
obj
.
district_name
,
"attract_industry"
:
obj
.
attract_status
,
"attract_industry"
:
obj
.
attract_status
,
"area"
:
obj
.
factory_area
,
"area"
:
obj
.
factory_area
,
"price_url"
:
obj
.
price_url
,
"lng"
:
obj
.
lng
,
"lng"
:
obj
.
lng
,
"lat"
:
obj
.
lat
,
"lat"
:
obj
.
lat
,
}
for
obj
in
obj_list
]
}
for
obj
in
obj_list
]
...
@@ -892,6 +900,7 @@ def collection_list():
...
@@ -892,6 +900,7 @@ def collection_list():
"phone"
:
obj
.
phone
,
"phone"
:
obj
.
phone
,
"industry_position"
:
obj
.
industry_position
,
"industry_position"
:
obj
.
industry_position
,
"district"
:
obj
.
district
,
"district"
:
obj
.
district
,
"price_url"
:
obj
.
image
,
"lng"
:
obj
.
lng
,
"lng"
:
obj
.
lng
,
"lat"
:
obj
.
lat
,
"lat"
:
obj
.
lat
,
}
for
obj
in
obj_list
]
}
for
obj
in
obj_list
]
...
@@ -923,7 +932,8 @@ def collection_list():
...
@@ -923,7 +932,8 @@ def collection_list():
"name"
:
obj
.
name
,
"name"
:
obj
.
name
,
"post_num"
:
obj
.
post_num
,
"post_num"
:
obj
.
post_num
,
"industry"
:
obj
.
industry
,
"industry"
:
obj
.
industry
,
"pubdate"
:
obj
.
pubdate
.
strftime
(
"
%
Y-
%
m-
%
d"
)
"pubdate"
:
obj
.
pubdate
.
strftime
(
"
%
Y-
%
m-
%
d"
),
"file"
:
obj
.
file
}
for
obj
in
obj_list
]
}
for
obj
in
obj_list
]
else
:
else
:
pass
pass
...
...
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