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
f5b98ec4
Commit
f5b98ec4
authored
Nov 07, 2023
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
bb1a46b1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
108 additions
and
1 deletions
+108
-1
apps/models.py
+106
-0
apps/view_atlas/view.py
+2
-1
No files found.
apps/models.py
View file @
f5b98ec4
...
...
@@ -166,6 +166,112 @@ class Enterprise(db.Model):
__table_args__
=
({
'comment'
:
'全国企业表'
})
# 添加表注释
class
Enterprise1
(
db
.
Model
):
__tablename__
=
"enterprise1"
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
,
autoincrement
=
True
,
doc
=
'企业主键id'
,
comment
=
'企业主键id主键id'
)
# 企业
chain_master
=
db
.
Column
(
db
.
String
(
20
),
doc
=
'链主企业'
,
comment
=
'链主企业'
)
company_id
=
db
.
Column
(
db
.
String
(
255
),
index
=
True
,
comment
=
'企业id'
)
# 企业
company_name
=
db
.
Column
(
db
.
String
(
255
),
index
=
True
,
doc
=
'企业名'
,
comment
=
'企业名'
)
# 企业名
status
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'经营状态'
,
comment
=
'经营状态'
)
# 经营状态
legal
=
db
.
Column
(
db
.
String
(
255
),
doc
=
'发定代表人'
,
comment
=
'发定代表人'
)
# 发定代表人
capital
=
db
.
Column
(
db
.
String
(
255
),
doc
=
'注册资本,22万美元'
,
comment
=
'注册资本,22万美元'
)
# 注册资本,22万美元
capital_nums
=
db
.
Column
(
db
.
Float
,
doc
=
'注册资本转换成人民币数值'
,
comment
=
'注册资本转换成人民币数值'
)
# 注册资本转换成人民币数值
capital_id
=
db
.
Column
(
db
.
Integer
,
doc
=
'注册资本大小类型,0-100,1,100-500,2,500-1000,3,1000-5000,4,5000-10000,5,10000+,6'
,
comment
=
'注册资本大小类型,0-100,1,100-500,2,500-1000,3,1000-5000,4,5000-10000,5,10000+,6'
)
# 注册资本大小类型,0-100,1,100-500,2,500-1000,3,1000-5000,4,5000-10000,5,10000+,6
build_date
=
db
.
Column
(
db
.
DateTime
,
doc
=
'注册时间'
,
comment
=
'注册时间'
)
# 注册时间
yearid
=
db
.
Column
(
db
.
Integer
,
index
=
True
,
doc
=
'成立时间年限id(1-3,1)(3-5,2)(5-8,3)(8-10,4)(10-15,5)(15以上,6)'
,
comment
=
'成立时间年限id(1-3,1)(3-5,2)(5-8,3)(8-10,4)(10-15,5)(15以上,6)'
)
# 成立时间年限id(1-3,1)(3-5,2)(5-8,3)(8-10,4)(10-15,5)(15以上,6)
province
=
db
.
Column
(
db
.
String
(
32
),
index
=
True
,
doc
=
'省'
,
comment
=
'省'
)
# 省
city
=
db
.
Column
(
db
.
String
(
32
),
index
=
True
,
doc
=
'市'
,
comment
=
'市'
)
# 市
district
=
db
.
Column
(
db
.
String
(
32
),
index
=
True
,
doc
=
'区'
,
comment
=
'区'
)
# 区
lng
=
db
.
Column
(
db
.
String
(
100
),
doc
=
'经度'
,
comment
=
'经度'
)
# 经度
lat
=
db
.
Column
(
db
.
String
(
100
),
doc
=
'纬度'
,
comment
=
'纬度'
)
# 纬度
p_lng
=
db
.
Column
(
db
.
String
(
100
),
doc
=
'省经度'
,
comment
=
'省经度'
)
# 省经度
p_lat
=
db
.
Column
(
db
.
String
(
100
),
doc
=
'省纬度'
,
comment
=
'省纬度'
)
# 省纬度
c_lng
=
db
.
Column
(
db
.
String
(
100
),
doc
=
'市经度'
,
comment
=
'市经度'
)
# 市经度
c_lat
=
db
.
Column
(
db
.
String
(
100
),
doc
=
'市纬度'
,
comment
=
'市纬度'
)
# 市纬度
d_lng
=
db
.
Column
(
db
.
String
(
100
),
doc
=
'区经度'
,
comment
=
'区经度'
)
# 区经度
d_lat
=
db
.
Column
(
db
.
String
(
100
),
doc
=
'区纬度'
,
comment
=
'区纬度'
)
# 区纬度
address
=
db
.
Column
(
db
.
String
(
255
),
doc
=
'企业地址'
,
comment
=
'企业地址'
)
# 企业地址
telephone
=
db
.
Column
(
db
.
Text
,
doc
=
'电话'
,
comment
=
'电话'
)
# 电话
telephone_more
=
db
.
Column
(
db
.
Text
,
doc
=
'更多电话'
,
comment
=
'更多电话'
)
# 更多电话
email
=
db
.
Column
(
db
.
Text
,
doc
=
'邮箱'
,
comment
=
'邮箱'
)
# 邮箱
social_code
=
db
.
Column
(
db
.
String
(
100
),
doc
=
'统一社会信用代码'
,
comment
=
'统一社会信用代码'
)
# 统一社会信用代码
tax_code
=
db
.
Column
(
db
.
String
(
100
),
doc
=
'纳税人识别号'
,
comment
=
'纳税人识别号'
)
# 纳税人识别号
register_code
=
db
.
Column
(
db
.
String
(
100
),
doc
=
'注册号'
,
comment
=
'注册号'
)
# 注册号
company_code
=
db
.
Column
(
db
.
String
(
100
),
doc
=
'组织机构代码'
,
comment
=
'组织机构代码'
)
# 组织机构代码
bao_num
=
db
.
Column
(
db
.
Integer
,
doc
=
'参保人数'
,
comment
=
'参保人数'
)
# 参保人数
entype
=
db
.
Column
(
db
.
String
(
100
),
doc
=
'企业类型'
,
comment
=
'企业类型'
)
# 企业类型
entypeid
=
db
.
Column
(
db
.
Integer
,
index
=
True
,
doc
=
'公司类型id(个人独资企业-1)(股份有限公司-2)(有限责任公司-3)(合伙企业-4)(集体所有制-5)(全民所有制企业-6)(外商企业-7)'
,
comment
=
'公司类型id(个人独资企业-1)(股份有限公司-2)(有限责任公司-3)(合伙企业-4)(集体所有制-5)(全民所有制企业-6)(外商企业-7)'
)
# 公司类型id(个人独资企业-1)(股份有限公司-2)(有限责任公司-3)(合伙企业-4)(集体所有制-5)(全民所有制企业-6)(外商企业-7)
scale_range
=
db
.
Column
(
db
.
Integer
,
index
=
True
,
doc
=
'企业规模id,1:20人以下,2:20-99人,3:100-499人,4:500-999人,5: 1000-4999人,6:5000-9999人,7:10000人'
,
comment
=
'企业规模id,1:20人以下,2:20-99人,3:100-499人,4:500-999人,5: 1000-4999人,6:5000-9999人,7:10000人'
)
company_industry
=
db
.
Column
(
db
.
String
(
100
),
doc
=
'所属行业'
,
comment
=
'所属行业'
)
# 所属行业
web_site
=
db
.
Column
(
db
.
String
(
255
),
doc
=
'企业网址'
,
comment
=
'企业网址'
)
# 企业网址
business_scope
=
db
.
Column
(
db
.
Text
,
doc
=
'企业经营范围'
,
comment
=
'企业经营范围'
)
# 企业经营范围
register_org
=
db
.
Column
(
db
.
String
(
100
),
doc
=
'登记机关'
,
comment
=
'登记机关'
)
money_type
=
db
.
Column
(
db
.
String
(
100
),
doc
=
'注册币种'
,
comment
=
'注册币种'
)
# 注册币种
money_type_id
=
db
.
Column
(
db
.
Integer
,
doc
=
'注册币种类型id'
,
comment
=
'注册币种类型id'
)
# 注册币种类型id
high_new
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'是否高新技术企业'
,
comment
=
'是否高新技术企业'
)
# 是否高新技术企业
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_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
=
'是否为有融资企业'
)
# 是否为有融资企业
fianacing_rounds
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'融资轮次'
,
comment
=
'融资轮次'
)
# 融资轮次
roundid
=
db
.
Column
(
db
.
Integer
,
index
=
True
,
doc
=
'融资轮次id(天使/种子,1)(PreA/A+,2)(PreB/B+,3)(C轮以上,4)(收并购,5)(战略投资,6)(其他,7)'
,
comment
=
'融资轮次id(天使/种子,1)(PreA/A+,2)(PreB/B+,3)(C轮以上,4)(收并购,5)(战略投资,6)(其他,7)'
)
# 融资轮次id(天使/种子,1)(PreA/A+,2)(PreB/B+,3)(C轮以上,4)(收并购,5)(战略投资,6)(其他,7)
financing_amount
=
db
.
Column
(
db
.
Float
,
doc
=
'融资金额'
,
comment
=
'融资金额'
)
# 融资金额
software_copyright
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'是否为有软件著作权'
,
comment
=
'是否为有软件著作权'
)
# 是否为有软件著作权
num_software
=
db
.
Column
(
db
.
Integer
,
doc
=
'软件著作权个数'
,
comment
=
'软件著作权个数'
)
# 软件著作权个数
quoted_company
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'是否上市企业'
,
comment
=
'是否上市企业'
)
# 是否上市企业
public_sector
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'上市板块'
,
comment
=
'上市板块'
)
# 上市板块
public_id
=
db
.
Column
(
db
.
Integer
,
index
=
True
,
doc
=
'上市版块的id----360企业画像(A股,1)(创业股,2)(港股,3)(新三股,4)(新四股,5)(中小板,6)'
,
comment
=
'上市版块的id----360企业画像(A股,1)(创业股,2)(港股,3)(新三股,4)(新四股,5)(中小板,6)'
)
# 上市版块的id----360企业画像(A股,1)(创业股,2)(港股,3)(新三股,4)(新四股,5)(中小板,6)
foreign_investment
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'是否外商投资'
,
comment
=
'是否外商投资'
)
# 是否外商投资
patent
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'是否为有专利企业'
,
comment
=
'是否为有专利企业'
)
# 是否为有专利企业
num_patent
=
db
.
Column
(
db
.
Integer
,
doc
=
'专利个数'
,
comment
=
'专利个数'
)
# 专利个数
company_info
=
db
.
Column
(
db
.
Text
,
doc
=
'公司简介'
,
comment
=
'公司简介'
)
# 公司简介
dengl
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'瞪羚'
,
comment
=
'瞪羚'
)
# 瞪羚
unicorn
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'独角兽企业'
,
comment
=
'独角兽企业'
)
# 独角兽企业
isfive
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'是否中国500强'
,
comment
=
'是否中国500强'
)
# 是否中国500强
takingn
=
db
.
Column
(
db
.
Float
,
doc
=
'营收'
,
comment
=
'营收'
)
# 营收
hots
=
db
.
Column
(
db
.
Integer
,
doc
=
'企业热度(权重值)'
,
comment
=
'企业热度(权重值)'
)
# 企业热度(权重值)
c_name
=
db
.
Column
(
db
.
String
(
255
),
doc
=
'行业类名'
,
comment
=
'行业类名'
)
# 行业类名
c_type
=
db
.
Column
(
db
.
Integer
,
index
=
True
,
doc
=
'行业类id'
,
comment
=
'行业类id'
)
# 行业类id
product_all
=
db
.
Column
(
db
.
String
(
255
),
doc
=
'公司拥有产品'
,
comment
=
'公司拥有产品'
)
# 公司拥有产品
c_name1
=
db
.
Column
(
db
.
String
(
255
),
doc
=
'行业类名'
,
comment
=
'行业类名'
)
# 行业类名
c_type1
=
db
.
Column
(
db
.
Integer
,
index
=
True
,
doc
=
'行业类id'
,
comment
=
'行业类id'
)
# 行业类id
product_all1
=
db
.
Column
(
db
.
String
(
255
),
doc
=
'公司拥有产品'
,
comment
=
'公司拥有产品'
)
# 公司拥有产品
c_name2
=
db
.
Column
(
db
.
String
(
255
),
doc
=
'行业类名'
,
comment
=
'行业类名'
)
# 行业类名
c_type2
=
db
.
Column
(
db
.
Integer
,
index
=
True
,
doc
=
'行业类id'
,
comment
=
'行业类id'
)
# 行业类id
product_all2
=
db
.
Column
(
db
.
String
(
255
),
doc
=
'公司拥有产品'
,
comment
=
'公司拥有产品'
)
# 公司拥有产品
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强
scale
=
db
.
Column
(
db
.
String
(
32
),
comment
=
'规模以上企业'
)
# 规模以上企业
serve
=
db
.
Column
(
db
.
String
(
32
),
comment
=
'限额以上服务业'
)
# 限额以上服务业
__table_args__
=
({
'comment'
:
'全国企业表'
})
# 添加表注释
# 晋城企业表
class
Company
(
db
.
Model
):
__tablename__
=
"company"
...
...
apps/view_atlas/view.py
View file @
f5b98ec4
...
...
@@ -1082,7 +1082,8 @@ def industry_enterprise():
try
:
company
=
Company
.
query
.
filter
(
Company
.
city
==
"晋城市"
,
# Company.city == "晋城市",
Company
.
district
==
"满城区"
,
Company
.
entype
.
like
(
'
%
{}
%
'
.
format
(
entype
))
if
entype
else
text
(
''
),
Company
.
company_name
.
like
(
'
%
{}
%
'
.
format
(
company_name
))
if
company_name
else
text
(
''
),
Company
.
public_sector
==
status
if
status
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