Commit f64005c1 by dong

fix

parent 39c464bd
......@@ -115,7 +115,7 @@ class Enterprise(db.Model):
parti_year = db.Column(db.Integer, doc='高新企业注册年份', comment='高新企业注册年份') # 高新企业注册年份
tbe = db.Column(db.String(32), doc='是否科技型中小企业', comment='是否科技型中小企业') # 是否科技型中小企业
tbe_sjmy = db.Column(db.String(32), doc='是否为省级民营科技企业', comment='是否为省级民营科技企业') # 省级民营科技企业
zjtg = db.Column(db.String(32), doc='是否为专精特新企业', comment='是否为专精特新企业') # 山西专精特工企业
zjtg = db.Column(db.String(32), doc='是否为专精特新企业', comment='是否为专精特新企业') # 专精特工企业
zjtg_gjjxjr = db.Column(db.String(32), doc='是否为国家级专精特新小巨人企业', comment='是否为国家级专精特新小巨人企业') # 国家级专精特新小巨人企业
zjtg_sjxjr = db.Column(db.String(32), doc='是否为省级专精特新小巨人企业', comment='是否为省级专精特新小巨人企业') # 省级专精特新小巨人企业
fianacing = db.Column(db.String(32), doc='是否为有融资企业', comment='是否为有融资企业') # 是否为有融资企业
......@@ -158,7 +158,7 @@ class Enterprise(db.Model):
f_name = db.Column(db.String(255), doc='父行业类名', comment='父行业类名') # 父行业类名
f_type = db.Column(db.Integer, index=True, doc='父行业类id', comment='父行业类id') # 父行业类id
sxonhun = db.Column(db.String(32), comment='是否山西100强') # 是否山西100强
sxonhun = db.Column(db.String(32), comment='是否100强') # 是否100强
scale = db.Column(db.String(32), comment='规模以上企业') # 规模以上企业
serve = db.Column(db.String(32), comment='限额以上服务业') # 限额以上服务业
......@@ -220,7 +220,7 @@ class Enterprise1(db.Model):
parti_year = db.Column(db.Integer, doc='高新企业注册年份', comment='高新企业注册年份') # 高新企业注册年份
tbe = db.Column(db.String(32), doc='是否科技型中小企业', comment='是否科技型中小企业') # 是否科技型中小企业
tbe_sjmy = db.Column(db.String(32), doc='是否为省级民营科技企业', comment='是否为省级民营科技企业') # 省级民营科技企业
zjtg = db.Column(db.String(32), doc='是否为专精特新企业', comment='是否为专精特新企业') # 山西专精特工企业
zjtg = db.Column(db.String(32), doc='是否为专精特新企业', comment='是否为专精特新企业') # 专精特工企业
zjtg_gjjxjr = db.Column(db.String(32), doc='是否为国家级专精特新小巨人企业', comment='是否为国家级专精特新小巨人企业') # 国家级专精特新小巨人企业
zjtg_sjxjr = db.Column(db.String(32), doc='是否为省级专精特新小巨人企业', comment='是否为省级专精特新小巨人企业') # 省级专精特新小巨人企业
fianacing = db.Column(db.String(32), doc='是否为有融资企业', comment='是否为有融资企业') # 是否为有融资企业
......@@ -263,7 +263,7 @@ class Enterprise1(db.Model):
f_name = db.Column(db.String(255), doc='父行业类名', comment='父行业类名') # 父行业类名
f_type = db.Column(db.Integer, index=True, doc='父行业类id', comment='父行业类id') # 父行业类id
sxonhun = db.Column(db.String(32), comment='是否山西100强') # 是否山西100强
sxonhun = db.Column(db.String(32), comment='是否100强') # 是否100强
scale = db.Column(db.String(32), comment='规模以上企业') # 规模以上企业
serve = db.Column(db.String(32), comment='限额以上服务业') # 限额以上服务业
......@@ -338,8 +338,8 @@ class Company(db.Model):
induzone = db.Column(db.String(255), doc='所在园区', comment='所在园区') # 所在园区
company_info = db.Column(db.Text, doc='公司简介', comment='公司简介') # 公司简介
sxmon = db.Column(db.String(32), doc='是否山西民营100强', comment='是否山西民营100强') # 是否山西民营100强(2019年)
zjtg = db.Column(db.String(32), doc='是否为山西专精特新企业', comment='是否为山西专精特新企业') # 山西专精特工企业
sxmon = db.Column(db.String(32), doc='是否民营100强', comment='是否民营100强') # 是否民营100强(2019年)
zjtg = db.Column(db.String(32), doc='是否为专精特新企业', comment='是否为专精特新企业') # 专精特工企业
zjtg_gjjxjr = db.Column(db.String(32), doc='是否为国家级专精特新小巨人企业', comment='是否为国家级专精特新小巨人企业') # 国家级专精特新小巨人企业
zjtg_sjxjr = db.Column(db.String(32), doc='是否为省级专精特新小巨人企业', comment='是否为省级专精特新小巨人企业') # 省级专精特新小巨人企业
unicorn = db.Column(db.String(32), doc='独角兽企业', comment='独角兽企业') # 独角兽企业
......@@ -348,7 +348,7 @@ class Company(db.Model):
isfive = db.Column(db.String(32), doc='是否中国500强', comment='是否中国500强') # 是否中国500强
istyfive = db.Column(db.String(32), doc='是否2020中国500强', comment='是否2020中国500强') # 是否2020中国500强
quotedate = db.Column(db.DateTime, doc='上市时间', comment='上市时间') # 上市时间
sxonhun = db.Column(db.String(32), doc='是否山西100强', comment='是否山西100强') # 是否山西100强
sxonhun = db.Column(db.String(32), doc='是否100强', comment='是否100强') # 是否100强
product_all = db.Column(db.String(255), doc='公司拥有产品', comment='公司拥有产品') # 公司拥有产品
scale = db.Column(db.String(32), doc='规模以上企业', comment='规模以上企业') # 规模以上企业
......@@ -1579,10 +1579,10 @@ class ProjectManagement(db.Model):
investor_address = db.Column(db.String(30), comment='投资方联系地址')
# 项目化管理-山西省地市指标表
# 项目化管理-省地市指标表
class ShanxiTarget(db.Model):
__tablename_ = "shanxi_target"
__table_args__ = ({'comment': '项目化管理-山西省地市指标表'}) # 添加表注释
__table_args__ = ({'comment': '项目化管理-省地市指标表'}) # 添加表注释
id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='主键id')
is_delete = db.Column(db.Integer, comment='逻辑删除')
data_time = db.Column(db.String(30), comment='数据年份')
......
......@@ -360,13 +360,10 @@ def create_body(page, page_size, args_query, args_term):
"from": page,
"size": page_size,
"sort": [{"host": {"order": "desc"}}],
# "sort": [],
"aggs": {},
"_source": [
"mysql_id", 'province', 'company_name', 'city', 'district', 'build_date', 'legal', 'capital', 'entype', 'address',
'telephone',
"high_new", "tbe", "fianacing", "quoted_company", "foreign_investment", "patent", "dengl", "unicorn",
'telephone', "high_new", "tbe", "fianacing", "quoted_company", "foreign_investment", "patent", "dengl", "unicorn",
"isfive"
],
"highlight": {
......@@ -382,7 +379,6 @@ def create_body(page, page_size, args_query, args_term):
for k, v in args_term.items():
body["query"]["bool"]["must"].append({"match": {"{}".format(k): "{}".format(v)}})
# print(body)
return body
......
......@@ -993,8 +993,8 @@ def search_enterprise():
Company.high_new == '1' if aptitude == '高新技术企业' else text(''),
Company.tbe == '1' if aptitude == '科技型中小企业' else text(''),
Company.quoted_company == '1' if aptitude == '上市企业' else text(''),
Company.sxmon == '1' if aptitude == '山西民营100强' else text(''),
Company.zjtg == '1' if aptitude == '山西专精特新企业' else text(''),
Company.sxmon == '1' if aptitude == '民营100强' else text(''),
Company.zjtg == '1' if aptitude == '专精特新企业' else text(''),
Company.unicorn == '1' if aptitude == '独角兽企业' else text(''),
Company.dengl == '1' if aptitude == '瞪羚' else text(''),
Company.isfive == '1' if aptitude == '中国500强' else text(''),
......@@ -1010,8 +1010,8 @@ def search_enterprise():
"aptitude": ["高新技术企业" if company_obj.high_new == '1' else
"科技型中小企业" if company_obj.tbe == '1' else
"上市企业" if company_obj.quoted_company == '1' else
"山西民营100强" if company_obj.sxmon == '1' else
"山西专精特新企业" if company_obj.zjtg == '1' else
"民营100强" if company_obj.sxmon == '1' else
"专精特新企业" if company_obj.zjtg == '1' else
"独角兽企业" if company_obj.unicorn == '1' else
"瞪羚企业" if company_obj.dengl == '1' else
"中国500强" if company_obj.isfive == '1' else
......@@ -1143,8 +1143,8 @@ def industry_enterprise():
"high_new": '高新技术企业' if i.high_new == '1' else '',
"tbe": '科技型中小企业' if i.tbe == '1' else '',
"quoted_company": '上市企业' if i.quoted_company == '1' else '',
"sxmon": '山西民营100强' if i.sxmon == '1' else '',
"zjtg": '山西专精特新企业' if i.zjtg == '1' else '',
"sxmon": '民营100强' if i.sxmon == '1' else '',
"zjtg": '专精特新企业' if i.zjtg == '1' else '',
"unicorn": '独角兽企业' if i.unicorn == '1' else '',
"dengl": '瞪羚企业' if i.dengl == '1' else '',
"isfive": '中国500强' if i.isfive == '1' else '',
......
......@@ -499,7 +499,7 @@ def showListb():
# "quoted_company": "上市企业" if i.public_sector != "空" else "",
"quoted_company": "上市企业" if i.quoted_company == "1" else "",
"scale": "规模以上企业" if i.scale == "1" else "",
"zjtg": "山西专精特新企业" if i.zjtg == "1" else "",
"zjtg": "专精特新企业" if i.zjtg == "1" else "",
"high_new": "高新技术企业" if i.high_new == "1" else "",
"tbe": "科技型中小企业" if i.tbe == "1" else "",
"dengl": "瞪羚企业" if i.dengl == "1" else "",
......@@ -588,7 +588,7 @@ def company_detail():
"unicorn": '独角兽企业' if company.unicorn == '1' else "",
"dengl": '瞪羚企业' if company.dengl == '1' else "",
"isfive": '中国500强' if company.isfive == '1' else "",
"zjtg": '山西专精特新企业' if company.zjtg == '1' else "",
"zjtg": '专精特新企业' if company.zjtg == '1' else "",
"zjtg_gjjxjr": '国家级专精特新小巨人企业' if company.zjtg_gjjxjr == '1' else "",
"zjtg_sjxjr": '省级专精特新小巨人企业' if company.zjtg_sjxjr == '1' else "",
"tbe_sjmy": '省级民营科技企业' if company.tbe_sjmy == '1' else "",
......
......@@ -1143,8 +1143,8 @@ def search_enterprise():
Enterprise.high_new == '1' if aptitude == '高新技术企业' else text(''),
Enterprise.tbe == '1' if aptitude == '科技型中小企业' else text(''),
Enterprise.quoted_company == '1' if aptitude == '上市企业' else text(''),
Enterprise.sxmon == '1' if aptitude == '山西民营100强' else text(''),
Enterprise.zjtg == '1' if aptitude == '山西专精特新企业' else text(''),
Enterprise.sxmon == '1' if aptitude == '民营100强' else text(''),
Enterprise.zjtg == '1' if aptitude == '专精特新企业' else text(''),
Enterprise.unicorn == '1' if aptitude == '独角兽企业' else text(''),
Enterprise.dengl == '1' if aptitude == '瞪羚' else text(''),
Enterprise.isfive == '1' if aptitude == '中国500强' else text(''),
......@@ -1162,8 +1162,8 @@ def search_enterprise():
"aptitude": ["高新技术企业" if enterprise_obj.high_new == '1' else
"科技型中小企业" if enterprise_obj.tbe == '1' else
"上市企业" if enterprise_obj.quoted_company == '1' else
"山西民营100强" if enterprise_obj.sxmon == '1' else
"山西专精特新企业" if enterprise_obj.zjtg == '1' else
"民营100强" if enterprise_obj.sxmon == '1' else
"专精特新企业" if enterprise_obj.zjtg == '1' else
"独角兽企业" if enterprise_obj.unicorn == '1' else
"瞪羚企业" if enterprise_obj.dengl == '1' else
"中国500强" if enterprise_obj.isfive == '1' else
......
......@@ -871,8 +871,8 @@ def get_collect():
"high_new": '高新技术企业' if i.high_new == '1' else '',
"tbe": '科技型中小企业' if i.tbe == '1' else '',
"quoted_company": '上市企业' if i.quoted_company == '1' else '',
"sxmon": '山西民营100强' if i.sxmon == '1' else '',
"zjtg": '山西专精特新企业' if i.zjtg == '1' else '',
"sxmon": '民营100强' if i.sxmon == '1' else '',
"zjtg": '专精特新企业' if i.zjtg == '1' else '',
"unicorn": '独角兽企业' if i.unicorn == '1' else '',
"dengl": '瞪羚企业' if i.dengl == '1' else '',
"isfive": '中国500强' if i.isfive == '1' else '',
......@@ -891,8 +891,8 @@ def get_collect():
"high_new": '高新技术企业' if i.high_new == '1' else '',
"tbe": '科技型中小企业' if i.tbe == '1' else '',
"quoted_company": '上市企业' if i.quoted_company == '1' else '',
"sxmon": '山西民营100强' if i.sxmon == '1' else '',
"zjtg": '山西专精特新企业' if i.zjtg == '1' else '',
"sxmon": '民营100强' if i.sxmon == '1' else '',
"zjtg": '专精特新企业' if i.zjtg == '1' else '',
"unicorn": '独角兽企业' if i.unicorn == '1' else '',
"dengl": '瞪羚企业' if i.dengl == '1' else '',
"isfive": '中国500强' if i.isfive == '1' else '',
......@@ -927,8 +927,8 @@ def get_collect():
"high_new": '高新技术企业' if i.high_new == '1' else '',
"tbe": '科技型中小企业' if i.tbe == '1' else '',
"quoted_company": '上市企业' if i.quoted_company == '1' else '',
"sxmon": '山西民营100强' if i.sxmon == '1' else '',
"zjtg": '山西专精特新企业' if i.zjtg == '1' else '',
"sxmon": '民营100强' if i.sxmon == '1' else '',
"zjtg": '专精特新企业' if i.zjtg == '1' else '',
"unicorn": '独角兽企业' if i.unicorn == '1' else '',
"dengl": '瞪羚企业' if i.dengl == '1' else '',
"isfive": '中国500强' if i.isfive == '1' else '',
......@@ -948,8 +948,8 @@ def get_collect():
"high_new": '高新技术企业' if i.high_new == '1' else '',
"tbe": '科技型中小企业' if i.tbe == '1' else '',
"quoted_company": '上市企业' if i.quoted_company == '1' else '',
"sxmon": '山西民营100强' if i.sxmon == '1' else '',
"zjtg": '山西专精特新企业' if i.zjtg == '1' else '',
"sxmon": '民营100强' if i.sxmon == '1' else '',
"zjtg": '专精特新企业' if i.zjtg == '1' else '',
"unicorn": '独角兽企业' if i.unicorn == '1' else '',
"dengl": '瞪羚企业' if i.dengl == '1' else '',
"isfive": '中国500强' if i.isfive == '1' else '',
......
......@@ -458,14 +458,14 @@ def company_detail():
'融资企业' if company_obj.fianacing == '1' else '',
'上市企业' if company_obj.quoted_company == '1' else '',
'专利企业' if company_obj.patent == '1' else '',
'山西民营100强' if company_obj.sxmon == '1' else '',
'山西专精特新企业' if company_obj.zjtg == '1' else '',
'民营100强' if company_obj.sxmon == '1' else '',
'专精特新企业' if company_obj.zjtg == '1' else '',
'国家级专精特新小巨人企业' if company_obj.zjtg_gjjxjr == '1' else '',
'省级专精特新小巨人企业' if company_obj.zjtg_sjxjr == '1' else '',
'独角兽企业' if company_obj.unicorn == '1' else '',
'瞪羚企业' if company_obj.dengl == '1' else '',
'中国500强' if company_obj.isfive == '1' else '',
'山西100强' if company_obj.sxonhun == '1' else '',
'100强' if company_obj.sxonhun == '1' else '',
'规模以上企业' if company_obj.scale == '1' else '',
'限额以上服务业' if company_obj.serve == '1' else '',
'链主企业' if company_obj.chain_master == '1' else ''
......
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