Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
data_report
/
data-report
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 642410a9
authored
Oct 16, 2026
by
周立明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
删除不需要的字段
1 parent
9fffbc34
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
85 additions
and
1 deletions
data-process/models.py
data-process/models.py
View file @
642410a
...
...
@@ -886,7 +886,6 @@ class BaicSpecialMonthlyBusiness(db.Model):
store_id
=
db
.
Column
(
db
.
BigInteger
,
nullable
=
False
,
comment
=
'关联 baic_special_month_data.store_id'
)
business_type
=
db
.
Column
(
db
.
Integer
,
nullable
=
False
,
comment
=
'业务类型:延保/权益'
)
order_cnt
=
db
.
Column
(
db
.
Integer
,
nullable
=
False
,
default
=
0
,
comment
=
'订单数'
)
delivery_penetration_rate
=
db
.
Column
(
db
.
DECIMAL
(
18
,
8
),
comment
=
'交车渗透率'
)
class
BaicSpecialMonthSummaryMetrics
(
db
.
Model
):
...
...
@@ -918,6 +917,91 @@ class BaicSpecialMonthSummaryMetrics(db.Model):
created_at
=
db
.
Column
(
db
.
DateTime
,
default
=
datetime
.
now
,
comment
=
'创建时间'
)
class
RecruitmentMonthData
(
db
.
Model
):
"""招聘管理月度明细表(每个品牌一行,合计/占比在渲染时计算,无 summary 表)
结果表「统计」sheet 字段来源:
- 待招聘需求合计(B~H):按 品牌 + 业务类型 过滤 待招人员(招聘状态=招聘中)计数
- 待招聘需求(I~AF,业务×周期档 6×4):在合计基础上再按 周期档(账龄:优秀≤7天/良好7-14/正常14-30/异常>30)拆分
- 新增(AG~AL):按 招聘数量 过滤 提需求时间∈当月(不看状态)
- 月待招(AM~AR):按 待招人员 过滤 招聘状态=招聘中 AND 提需求时间∈当月
- 入职(AS)/ 离职(AT)
周期档以 cutoff_date(当前工作日)为基准计算账龄;选月基准(W1/W2/W3)在渲染时计算。
"""
__tablename__
=
'recruitment_month_data'
__table_args__
=
(
db
.
UniqueConstraint
(
'task_id'
,
'stat_month'
,
'brand'
,
name
=
'uk_recruitment_task_month_brand'
),
{
'comment'
:
'招聘管理月度明细表(每品牌一行)'
},
)
id
=
db
.
Column
(
db
.
BIGINT
,
primary_key
=
True
,
autoincrement
=
True
,
comment
=
'主键'
)
task_id
=
db
.
Column
(
db
.
Integer
,
nullable
=
False
,
comment
=
'关联数据处理任务ID'
)
stat_month
=
db
.
Column
(
db
.
String
(
7
),
nullable
=
False
,
comment
=
'统计月份 YYYY-MM'
)
cutoff_date
=
db
.
Column
(
db
.
Date
,
comment
=
'账龄基准日(当前工作日),用于计算周期档'
)
brand
=
db
.
Column
(
db
.
String
(
50
),
nullable
=
False
,
comment
=
'品牌'
)
brand_order
=
db
.
Column
(
db
.
Integer
,
comment
=
'品牌排序(问界>鸿蒙智行>广爱>北汽>阿维塔>零跑>岚图>其他品牌)'
)
# 待招聘需求合计(B~H)
pending_total
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'待招聘需求合计'
)
pending_ext_warranty
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'待招聘需求-延保'
)
pending_rights
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'待招聘需求-权益'
)
pending_rights_ext
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'待招聘需求-权益+延保'
)
pending_light_sales
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'待招聘需求-轻改销售'
)
pending_technician
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'待招聘需求-技师'
)
pending_used_car
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'待招聘需求-二手车'
)
# 待招聘需求 × 周期档(I~AF,6业务×4档)
pending_ext_warranty_excellent
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'延保-优秀(≤7天)'
)
pending_ext_warranty_good
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'延保-良好(7-14天)'
)
pending_ext_warranty_normal
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'延保-正常(14-30天)'
)
pending_ext_warranty_abnormal
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'延保-异常(>30天)'
)
pending_rights_excellent
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'权益-优秀(≤7天)'
)
pending_rights_good
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'权益-良好(7-14天)'
)
pending_rights_normal
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'权益-正常(14-30天)'
)
pending_rights_abnormal
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'权益-异常(>30天)'
)
pending_rights_ext_excellent
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'权益+延保-优秀(≤7天)'
)
pending_rights_ext_good
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'权益+延保-良好(7-14天)'
)
pending_rights_ext_normal
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'权益+延保-正常(14-30天)'
)
pending_rights_ext_abnormal
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'权益+延保-异常(>30天)'
)
pending_light_sales_excellent
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'轻改销售-优秀(≤7天)'
)
pending_light_sales_good
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'轻改销售-良好(7-14天)'
)
pending_light_sales_normal
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'轻改销售-正常(14-30天)'
)
pending_light_sales_abnormal
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'轻改销售-异常(>30天)'
)
pending_technician_excellent
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'技师-优秀(≤7天)'
)
pending_technician_good
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'技师-良好(7-14天)'
)
pending_technician_normal
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'技师-正常(14-30天)'
)
pending_technician_abnormal
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'技师-异常(>30天)'
)
pending_used_car_excellent
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'二手车-优秀(≤7天)'
)
pending_used_car_good
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'二手车-良好(7-14天)'
)
pending_used_car_normal
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'二手车-正常(14-30天)'
)
pending_used_car_abnormal
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'二手车-异常(>30天)'
)
# 新增(AG~AL,按招聘数量,提需求时间∈当月,不看状态)
new_ext_warranty
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'新增-延保'
)
new_rights
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'新增-权益'
)
new_rights_ext
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'新增-权益+延保'
)
new_light_sales
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'新增-轻改销售'
)
new_technician
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'新增-技师'
)
new_used_car
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'新增-二手车'
)
# 月待招(AM~AR,待招人员,招聘状态=招聘中 AND 提需求时间∈当月)
pend_month_ext_warranty
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'月待招-延保'
)
pend_month_rights
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'月待招-权益'
)
pend_month_rights_ext
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'月待招-权益+延保'
)
pend_month_light_sales
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'月待招-轻改销售'
)
pend_month_technician
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'月待招-技师'
)
pend_month_used_car
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'月待招-二手车'
)
# 入职 / 离职
entry_cnt
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'入职人数'
)
leave_cnt
=
db
.
Column
(
db
.
Integer
,
default
=
0
,
comment
=
'离职人数'
)
is_deleted
=
db
.
Column
(
db
.
Integer
,
nullable
=
False
,
default
=
0
,
comment
=
'是否删除:0正常 / 1已删除(软删除)'
)
created_at
=
db
.
Column
(
db
.
DateTime
,
default
=
datetime
.
now
,
comment
=
'创建时间'
)
updated_at
=
db
.
Column
(
db
.
DateTime
,
default
=
datetime
.
now
,
onupdate
=
datetime
.
now
,
comment
=
'更新时间'
)
class
ReportStoreEffectSummary
(
db
.
Model
):
"""门店店效人效汇总表(整体合计,单任务一行;合并结果表第5个sheet)"""
__tablename__
=
'report_store_effect_summary'
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment