Commit 905997cb by dong

fix20230202

parent ab2d6c1e
...@@ -106,6 +106,7 @@ class Enterprise(db.Model): ...@@ -106,6 +106,7 @@ class Enterprise(db.Model):
isfive = db.Column(db.String(32), doc='是否中国500强', comment='是否中国500强') # 是否中国500强 isfive = db.Column(db.String(32), doc='是否中国500强', comment='是否中国500强') # 是否中国500强
product_all = db.Column(db.String(255), doc='公司拥有产品', comment='公司拥有产品') # 公司拥有产品 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='营收') # 营收 takingn = db.Column(db.Float, doc='营收', comment='营收') # 营收
hots = db.Column(db.Integer, doc='企业热度(权重值)', comment='企业热度(权重值)') # 企业热度(权重值) hots = db.Column(db.Integer, doc='企业热度(权重值)', comment='企业热度(权重值)') # 企业热度(权重值)
......
...@@ -16,7 +16,6 @@ class Common(object): ...@@ -16,7 +16,6 @@ class Common(object):
).all() ).all()
return area_obj_list return area_obj_list
@staticmethod @staticmethod
def get_total_factory_area(time1, time2, district_name): def get_total_factory_area(time1, time2, district_name):
area_obj_list = CarrierFactory.query.filter( area_obj_list = CarrierFactory.query.filter(
......
...@@ -174,7 +174,6 @@ def show_area(): ...@@ -174,7 +174,6 @@ def show_area():
else: else:
total_empty_rate = 0 total_empty_rate = 0
# 今年的闲置率 # 今年的闲置率
if build_current_total_area != 0: if build_current_total_area != 0:
current_build_empty_rate = round((build_current_empty_area / build_current_total_area) * 100, 2) current_build_empty_rate = round((build_current_empty_area / build_current_total_area) * 100, 2)
...@@ -234,7 +233,6 @@ def carrier_energy(): ...@@ -234,7 +233,6 @@ def carrier_energy():
"life_gas_three": energy_obj.life_gas_three} "life_gas_three": energy_obj.life_gas_three}
} }
return jsonify(code=RET.OK, data=data, msg='数据查询成功!') return jsonify(code=RET.OK, data=data, msg='数据查询成功!')
except Exception as e: except Exception as e:
current_app.logger.error(e) current_app.logger.error(e)
return jsonify(code=RET.DBERR, msg='数据查询错误!') return jsonify(code=RET.DBERR, msg='数据查询错误!')
......
...@@ -346,6 +346,7 @@ def attract_enterprise(): ...@@ -346,6 +346,7 @@ def attract_enterprise():
try: try:
enterprise_obj = Enterprise.query.filter( enterprise_obj = Enterprise.query.filter(
Enterprise.product_all.like("%{}%".format(product)) if product else text(''), Enterprise.product_all.like("%{}%".format(product)) if product else text(''),
Enterprise.product_all1.like("%{}%".format(product)) if product else text(''), # 测试用
Enterprise.entype.like('%{}%'.format(entype)) if entype else text(''), Enterprise.entype.like('%{}%'.format(entype)) if entype else text(''),
Enterprise.company_name.like('%{}%'.format(company_name)) if company_name else text(''), Enterprise.company_name.like('%{}%'.format(company_name)) if company_name else text(''),
Enterprise.c_type == inid if inid else text(''), Enterprise.c_type == inid if inid 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