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
d9c1b347
Commit
d9c1b347
authored
Apr 04, 2023
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix20230404
parent
e8786ba5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
13 deletions
+19
-13
apps/models.py
+12
-6
apps/view_xiaocx/view.py
+7
-7
No files found.
apps/models.py
View file @
d9c1b347
...
...
@@ -618,7 +618,8 @@ class Project(BaseModel, db.Model):
project_stage_id
=
db
.
Column
(
db
.
Integer
,
comment
=
'项目阶段id:落地项目为1,招商项目为2'
)
name
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'工程名'
)
# 一.工程名
district
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'区县名称'
)
# 二.县区
money
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'项目投资金额'
)
# 三.(2)项目投资金额
# money = db.Column(db.String(255), comment='项目投资金额') # 三.(2)项目投资金额
money
=
db
.
Column
(
db
.
Float
,
comment
=
'项目投资金额'
)
# 三.(2)项目投资金额
attract_industry
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'招引业态'
)
# 三.(2)项目投资金额
type
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'工程类型'
)
# 三.(1)工程类型
background
=
db
.
Column
(
db
.
Text
,
comment
=
'项目背景'
)
# 三.(3)项目背景
...
...
@@ -1511,7 +1512,8 @@ class CarrierLand(db.Model):
detail_address
=
db
.
Column
(
db
.
String
(
50
),
comment
=
'土地位置'
)
land_use
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'用地四至'
)
land_nature
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'用地性质(工业用地/商服用地/物流仓储用地/科研用地/居住用地)(包括用地性质类别代码)'
)
total_area
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'用地面积(净用地面积)(公顷)'
)
# total_area = db.Column(db.String(255), comment='用地面积(净用地面积)(公顷)')
total_area
=
db
.
Column
(
db
.
Float
,
comment
=
'用地面积(净用地面积)(公顷)'
)
surface_area
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'地上控制建面(㎡)'
)
plot_ratio
=
db
.
Column
(
db
.
String
(
10
),
comment
=
'容积率'
)
greening_rate
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'绿化率'
)
...
...
@@ -1556,7 +1558,8 @@ class CarrierBuild(db.Model):
detail_address
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'详细地址(地址需填写准确、详细、精准)'
)
construction_time
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'建成时间(年)'
)
cover_land_area
=
db
.
Column
(
db
.
String
(
10
),
comment
=
'总占地面积(㎡)'
)
build_area
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'总建筑面积(㎡)'
)
# build_area = db.Column(db.String(20), comment='总建筑面积(㎡)')
build_area
=
db
.
Column
(
db
.
Float
,
comment
=
'总建筑面积(㎡)'
)
single_area
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'单层面积(㎡)'
)
empty_area
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'闲置面积(㎡)'
)
layer_num
=
db
.
Column
(
db
.
Integer
,
comment
=
'总层数'
)
...
...
@@ -1571,8 +1574,10 @@ class CarrierBuild(db.Model):
attract_status
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'拟招引产业'
)
other_attract_status
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'其他产业名称'
)
cooperation_model
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'合作模式(出租/出售/转让)'
)
rent_money
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'租金(元/平米/天)'
)
wuye_money
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'物业费(元/平米/月)'
)
# rent_money = db.Column(db.String(20), comment='租金(元/平米/天)')
# wuye_money = db.Column(db.String(20), comment='物业费(元/平米/月)')
rent_money
=
db
.
Column
(
db
.
Float
,
comment
=
'租金(元/平米/天)'
)
wuye_money
=
db
.
Column
(
db
.
Float
,
comment
=
'物业费(元/平米/月)'
)
linkman
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'联系人'
)
link_mobile
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'联系方式'
)
inside_picture_url
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'内部照片url'
)
...
...
@@ -1595,7 +1600,8 @@ class CarrierFactory(db.Model):
detail_address
=
db
.
Column
(
db
.
String
(
50
),
comment
=
'详细地址(地址需填写准确、详细、精准)'
)
construction_time
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'建成时间(年)'
)
cover_land_area
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'总占地面积(㎡)'
)
factory_area
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'总建筑面积(㎡)'
)
# factory_area = db.Column(db.String(255), comment='总建筑面积(㎡)')
factory_area
=
db
.
Column
(
db
.
Float
,
comment
=
'总建筑面积(㎡)'
)
empty_area
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'闲置面积(㎡)'
)
layer_num
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'总层数'
)
factory_structure
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'建筑结构(混凝土框架、钢结构、砖混、砖混钢筋、钢筋混凝土、轻钢)'
)
...
...
apps/view_xiaocx/view.py
View file @
d9c1b347
...
...
@@ -130,7 +130,7 @@ def index_search():
if
carrier_name
:
build_obj
=
CarrierBuild
.
query
.
filter
(
# CarrierBuild.build_name.like('%{}%'.format(carrier_name)) if carrier_name else text(''),
CarrierBuild
.
attract_status
==
industry
if
industry
else
text
(
''
),
CarrierBuild
.
attract_status
.
like
(
'
%
{}
%
'
.
format
(
industry
))
if
industry
else
text
(
''
),
CarrierBuild
.
district_name
==
district
if
district
else
text
(
''
),
CarrierBuild
.
build_area
>
build_area
[
0
]
if
build_area
[
0
]
else
text
(
''
),
CarrierBuild
.
build_area
<=
build_area
[
1
]
if
build_area
[
1
]
else
text
(
''
),
...
...
@@ -149,7 +149,7 @@ def index_search():
else
:
build_obj
=
CarrierBuild
.
query
.
filter
(
CarrierBuild
.
build_name
.
like
(
'
%
{}
%
'
.
format
(
carrier_name
))
if
carrier_name
else
text
(
''
),
CarrierBuild
.
attract_status
==
industry
if
industry
else
text
(
''
),
CarrierBuild
.
attract_status
.
like
(
'
%
{}
%
'
.
format
(
industry
))
if
industry
else
text
(
''
),
CarrierBuild
.
district_name
==
district
if
district
else
text
(
''
),
CarrierBuild
.
build_area
>
build_area
[
0
]
if
build_area
[
0
]
else
text
(
''
),
CarrierBuild
.
build_area
<=
build_area
[
1
]
if
build_area
[
1
]
else
text
(
''
),
...
...
@@ -173,7 +173,7 @@ def index_search():
if
carrier_name
:
factory_obj
=
CarrierFactory
.
query
.
filter
(
# CarrierFactory.factory_name.like('%{}%'.format(carrier_name)) if carrier_name else text(''),
CarrierFactory
.
attract_status
==
industry
if
industry
else
text
(
''
),
CarrierFactory
.
attract_status
.
like
(
'
%
{}
%
'
.
format
(
industry
))
if
industry
else
text
(
''
),
CarrierFactory
.
district_name
==
district
if
district
else
text
(
''
),
CarrierFactory
.
factory_area
>
build_area
[
0
]
if
build_area
[
0
]
else
text
(
''
),
CarrierFactory
.
factory_area
<=
build_area
[
1
]
if
build_area
[
1
]
else
text
(
''
)
...
...
@@ -188,7 +188,7 @@ def index_search():
else
:
factory_obj
=
CarrierFactory
.
query
.
filter
(
CarrierFactory
.
factory_name
.
like
(
'
%
{}
%
'
.
format
(
carrier_name
))
if
carrier_name
else
text
(
''
),
CarrierFactory
.
attract_status
==
industry
if
industry
else
text
(
''
),
CarrierFactory
.
attract_status
.
like
(
'
%
{}
%
'
.
format
(
industry
))
if
industry
else
text
(
''
),
CarrierFactory
.
district_name
==
district
if
district
else
text
(
''
),
CarrierFactory
.
factory_area
>
build_area
[
0
]
if
build_area
[
0
]
else
text
(
''
),
CarrierFactory
.
factory_area
<=
build_area
[
1
]
if
build_area
[
1
]
else
text
(
''
)
...
...
@@ -209,7 +209,7 @@ def index_search():
if
carrier_name
:
zone_obj
=
Induzone
.
query
.
filter
(
# Induzone.name.like('%{}%'.format(carrier_name)) if carrier_name else text(''),
Induzone
.
navigat
==
industry
if
industry
else
text
(
''
),
Induzone
.
navigat
.
like
(
'
%
{}
%
'
.
format
(
industry
))
if
industry
else
text
(
''
),
Induzone
.
district
==
district
if
district
else
text
(
''
),
Induzone
.
level
==
zone_level
if
zone_level
else
text
(
''
)
)
.
filter
(
...
...
@@ -225,7 +225,7 @@ def index_search():
else
:
zone_obj
=
Induzone
.
query
.
filter
(
Induzone
.
name
.
like
(
'
%
{}
%
'
.
format
(
carrier_name
))
if
carrier_name
else
text
(
''
),
Induzone
.
navigat
==
industry
if
industry
else
text
(
''
),
Induzone
.
navigat
.
like
(
'
%
{}
%
'
.
format
(
industry
))
if
industry
else
text
(
''
),
Induzone
.
district
==
district
if
district
else
text
(
''
),
Induzone
.
level
==
zone_level
if
zone_level
else
text
(
''
)
)
...
...
@@ -246,7 +246,7 @@ def index_search():
project_obj
=
Project
.
query
.
filter
(
# Project.name.like('%{}%'.format(carrier_name)) if carrier_name else text(''),
Project
.
district
==
district
if
district
else
text
(
''
),
Project
.
attract_industry
==
industry
if
industry
else
text
(
''
),
Project
.
attract_industry
.
like
(
'
%
{}
%
'
.
format
(
industry
))
if
industry
else
text
(
''
),
Project
.
money
>
float
(
investment_volume_list
[
0
])
*
10000
if
investment_volume_list
[
0
]
else
text
(
''
),
Project
.
money
<=
float
(
investment_volume_list
[
1
])
*
10000
if
investment_volume_list
[
1
]
else
text
(
''
),
)
.
filter
(
...
...
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