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
d7658369
Commit
d7658369
authored
Feb 02, 2023
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix20230202
parent
a2c8b8a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
10 deletions
+6
-10
apps/models.py
+4
-5
apps/view_map/view.py
+2
-5
No files found.
apps/models.py
View file @
d7658369
...
...
@@ -106,7 +106,6 @@ class Enterprise(db.Model):
isfive
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'是否中国500强'
,
comment
=
'是否中国500强'
)
# 是否中国500强
product_all
=
db
.
Column
(
db
.
String
(
255
),
doc
=
'公司拥有产品'
,
comment
=
'公司拥有产品'
)
# 公司拥有产品
product_all1
=
db
.
Column
(
db
.
String
(
255
),
doc
=
'公司拥有产品'
,
comment
=
'公司拥有产品'
)
# 公司拥有产品
takingn
=
db
.
Column
(
db
.
Float
,
doc
=
'营收'
,
comment
=
'营收'
)
# 营收
hots
=
db
.
Column
(
db
.
Integer
,
doc
=
'企业热度(权重值)'
,
comment
=
'企业热度(权重值)'
)
# 企业热度(权重值)
...
...
@@ -1217,7 +1216,7 @@ class ProgressCondition(db.Model):
add_time
=
db
.
Column
(
db
.
DateTime
,
comment
=
'添加时间'
)
info
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'项目对接情况'
)
project_id
=
db
.
Column
(
db
.
Integer
,
db
.
ForeignKey
(
"siku_project.id"
),
comment
=
'外键id,项目id'
)
project
=
db
.
relationship
(
'SikuProject'
,
backref
=
db
.
backref
(
'progress_conditions'
))
# 项目1-N项目对接情况
project
=
db
.
relationship
(
'SikuProject'
,
backref
=
db
.
backref
(
'progress_conditions'
))
# 四库管理对接库-相关印证资料图片/项目管理项目协议
...
...
@@ -1233,10 +1232,10 @@ class ProjectFile(db.Model):
upload_people
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'上传人'
)
upload_people_id
=
db
.
Column
(
db
.
Integer
,
comment
=
'上传人id'
)
project_id
=
db
.
Column
(
db
.
Integer
,
db
.
ForeignKey
(
"siku_project.id"
),
comment
=
'外键id,项目id'
)
project
=
db
.
relationship
(
'SikuProject'
,
backref
=
db
.
backref
(
'project_files'
))
# 项目1-N项目对接情况
project
=
db
.
relationship
(
'SikuProject'
,
backref
=
db
.
backref
(
'project_files'
))
project_manager_id
=
db
.
Column
(
db
.
Integer
,
db
.
ForeignKey
(
"project_management.id"
),
comment
=
'外键id,项目id'
)
project_manager
=
db
.
relationship
(
'ProjectManagement'
,
backref
=
db
.
backref
(
'project_files1'
))
# 项目1-N项目对接情况
project_manager
=
db
.
relationship
(
'ProjectManagement'
,
backref
=
db
.
backref
(
'project_files1'
))
# 签约库-签约的第三方
...
...
@@ -1249,7 +1248,7 @@ class SignThree(db.Model):
people
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'第三方联系人'
)
mobile
=
db
.
Column
(
db
.
String
(
20
),
comment
=
'第三方联系方式'
)
project_id
=
db
.
Column
(
db
.
Integer
,
db
.
ForeignKey
(
"siku_project.id"
),
comment
=
'外键id,项目id'
)
project
=
db
.
relationship
(
'SikuProject'
,
backref
=
db
.
backref
(
'sign_threes'
))
# 项目1-N项目对接情况
project
=
db
.
relationship
(
'SikuProject'
,
backref
=
db
.
backref
(
'sign_threes'
))
# 四库管理-项目动态数据表
...
...
apps/view_map/view.py
View file @
d7658369
...
...
@@ -345,8 +345,7 @@ def attract_enterprise():
try
:
enterprise_obj
=
Enterprise
.
query
.
filter
(
# Enterprise.product_all.like("%{}%".format(product)) if product else text(''),
# Enterprise.product_all1.like("%{}%".format(product)) if product else text(''), # 测试用
Enterprise
.
product_all
.
like
(
"
%
{}
%
"
.
format
(
product
))
if
product
else
text
(
''
),
Enterprise
.
entype
.
like
(
'
%
{}
%
'
.
format
(
entype
))
if
entype
else
text
(
''
),
Enterprise
.
company_name
.
like
(
'
%
{}
%
'
.
format
(
company_name
))
if
company_name
else
text
(
''
),
Enterprise
.
c_type
==
inid
if
not
product
else
text
(
''
),
...
...
@@ -364,9 +363,7 @@ def attract_enterprise():
Enterprise
.
isfive
==
'1'
if
qualificat
==
'中国500强企业'
else
text
(
''
),
Enterprise
.
scale
==
'1'
if
qualificat
==
'规模以上企业'
else
text
(
''
),
Enterprise
.
serve
==
'1'
if
qualificat
==
'限额以上服务业企业'
else
text
(
''
)
)
.
filter
(
or_
(
Enterprise
.
product_all
.
like
(
"
%
{}
%
"
.
format
(
product
))
if
product
else
text
(
''
),
Enterprise
.
product_all1
.
like
(
"
%
{}
%
"
.
format
(
product
))
if
product
else
text
(
''
)))
)
# enterprise_obj = enterprise_obj.filter(or_(Enterprise.product_all.like("%{}%".format(product)) if product else text(''),
# Enterprise.product_all1.like("%{}%".format(product)) if product else text(''), # 测试用
# ))
...
...
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