Commit d7658369 by dong

fix20230202

parent a2c8b8a4
......@@ -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'))
# 四库管理-项目动态数据表
......
......@@ -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(''), # 测试用
# ))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment