Ver Fonte

增加合同类型,完善成交方式注释

Ping há 1 ano atrás
pai
commit
3c7c26024f
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      etl_bill_detail.py

+ 3 - 1
etl_bill_detail.py

@@ -38,7 +38,7 @@ cols = {
     'renter_phone': [NVARCHAR(20), '租客手机号'],
     'renter_id_type': [NVARCHAR(50), '租客证件类型证件类型【1-身份证,2-护照,3-港澳通行证,4-台湾同胞证,5-军官证,6-驾驶证 7-社会信用代码'],
     'renter_id_number': [NVARCHAR(50), '租客证件号码'],
-    'sign_type': [NVARCHAR(50), '成交方式【1-新签,2-续签,3-转租,4-换房】'],
+    'sign_type': [NVARCHAR(50), '成交方式【1-新签,2-续签,3-转租,4-换房,5-补签】'],
     'contract_begin_date': [Date, '合同开始日期'],
     'contract_end_date': [Date, '合同结束日期'],
     'payment_method': [NVARCHAR(50), '付款方式【付款模式【1-提前付款天数,2-固定付款日期,3-提前1个月固定付款日期】'],
@@ -52,6 +52,7 @@ cols = {
     'fee_subject_id': [NVARCHAR(64), '费用科目ID'],
     'fee_subject_label': [NVARCHAR(64), '费用科目标签'],
     'fee_subject_name': [NVARCHAR(64), '费用科目名称'],
+    'contract_type': [INTEGER, '合同类型 1个人、2企业、4协议'],
     'day': [Date, '日期'],
     'kind': [NVARCHAR(10), '类型'],
     'money': [DECIMAL(14, 2), '金额'],
@@ -86,6 +87,7 @@ def extract(conn, batch_size, i) -> pd.DataFrame:
             rc.sign_type 'sign_type', rc.begin_time 'contract_begin_date', rc.end_time 'contract_end_date',  rc.pay_pattern 'payment_method',
             rc.sign_time 'sign_date', rc.sign_emp_id 'signer_id', sign_emp.name 'signer_name', rc.periodMonth 'pay_months', rc.depositMonth 'deposit_months',
             bd.bill_id, bd.id as 'bill_detail_id', bd.fee_subject_id, sd.label as 'fee_subject_label', sd.name as 'fee_subject_name', 
+            rc.`type` 'contract_type',
             0 'splitter',
             bd.fee_direction, bd.original_money, bd.occurred_money,
             bd.begin_time, bd.end_time, bd.is_occur, rc.cancel_info, bd.predict_time