Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
audit_2021
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 27a247fb
authored
May 04, 2023
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
更正数据库配置
1 parent
ce182770
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
149 additions
and
1 deletions
IT审计交接工作内容.txt
calc_month_share.py
数据迁移至审计库.txt
IT审计交接工作内容.txt
0 → 100644
View file @
27a247f
对外审计库:
192.168.5.25:3310@device_detail
内部开发库:
192.168.5.20:3306@glsx_biz_data
嘀加涉及表:
dj_2021_settle_details #历史累计数据
dj_2022_settle_details #22年数据,分开是为了跑数据方便
dj_2022_settle_details_record #记录仪&车充 结算明细数据
dj_2022_settle_details_return #退货数据
dj_2022_settlment_order_06plus #商务结算数据
dj_2022_settlment_order_finance_06plus #财务结算数据
dj_system_merchant 激活商户-结算客户关系表
dj_2021_settlemer_relation 发往商户-结算客户关系表
dj_2021_delivery_device 供应链真实设备
数据处理步骤:
收入数据
1.财务提供对账单Excel给到商务,商户合并硬件和套餐后发Excel给研发
2.使用脚本【loadExcelData.py】导入财务和商务的Excel表数据到数据库表 dj_2022_settlment_order_finance_06plus & dj_2022_settlment_order_06plus
3.通过SQL脚本【核对商务与财务数据.sql】核对财务商务数据是否一致,找出差异的(注意有可能是套餐匹配错误的情况),记录下差异情况
4.生成明细数据
1).使用脚本【calc_dj_income_2021.py】 query_supplychain_delivery_device 导入供应链设备
2).使用脚本【calc_dj_income_2021.py】 update_delivery_device_settle_merchant 更新结算客户 dj_system_merchant
3).使用脚本【calc_dj_income_2021.py】 match_not_direct_settlement_delivery_order 处理直销 (原代销的) dj_2022_settle_details
4).使用脚本【calc_dj_income_2021.py】 match_direct_settlement_delivery_order 处理渠道 (原直销) dj_2022_settle_details
5).使用脚本【handle_unmatch_delivery_device.py】 match_gen_sn_settlement_delivery_order生成未匹配的设备数据
6).使用SQL脚本【2022合并汇总数据.sql】合并记录车充数据到汇总表 dj_2021_settle_details
7).使用脚本【calc_dj_income_2021.py】 handle_return_device 处理退货的 dj_2022_settle_details_return
5.核对明细数据与财务数据,脚本【明细数据与财务核对sql.sql】
1).核对追踪器明细数据
2).核对记录仪数据
3).核对广汇数据
6.导出明细数据给财务核对,脚本【明细数据与财务核对sql.sql】
1).导出追踪器明细
2).导出记录仪车充明细
3).导出退货明细
7.异常回滚数据流程
1).使用脚本【handle_unmatch_delivery_device.py】 update_device_alloc 函数回滚已分配的供应链发货设备
2).使用SQL脚本【回滚数据.sql】 步骤如下
a).回退退货数据
b).删除明细数据
c).更新商户对账单数据
8.调节激活-财务提供渠道(原直销)结算客户每个月的激活数,根据激活数分配激活
1).将财务渠道测算的激活数导入到表中 dj_2022_direct_cus_active
2).使用脚本【calc_dj_income_2021.py】 active_direct_merchant_device
成本数据
1.财务提供客户每月的成本数据 格式如: 客户 月份 成本金额 硬件数量
2.将财务数据导入到数据库表中 dj_2022_hardware_cost_bill
3.使用脚本【calc_dj_cost_2021.py】 calc_2022_cost 计算并更新22年设备成本
IT审计的线索数据:
1.使用java脚本程序处理设备映射表 device_mapping
1).ExportMappingMain生成映射关系
2).ImportMain导入设备到映射表
2.使用脚本【dj_biz_data.py】sync_car_maintain 同步保养线索数据 dj_car_maintain
3.使用脚本【dj_biz_data.py】sync_car_shop_warning 同步到店线索数据 dj_car_shop_warning
4.使用脚本【dj_biz_data.py】sync_ddh_rescue_event 同步碰撞线索数据 ddh_rescue_event
运营表 cyb_os platform_common_merchant
calc_month_share.py
View file @
27a247f
...
...
@@ -3,7 +3,7 @@ import datetime
from
dateutil.relativedelta
import
relativedelta
import
logging
g_pro_biz_dbcfg
=
{
'host'
:
'192.168.5.2
0
'
,
'port'
:
3306
,
'user'
:
'biz_glsx_data'
,
'passwd'
:
'unEKczDc'
,
g_pro_biz_dbcfg
=
{
'host'
:
'192.168.5.2'
,
'port'
:
3306
,
'user'
:
'biz_glsx_data'
,
'passwd'
:
'unEKczDc'
,
'db'
:
'glsx_biz_data'
,
'charset'
:
'utf8'
}
'''
...
...
数据迁移至审计库.txt
0 → 100644
View file @
27a247f
数据迁移从192.168.5.2:3306 glsx_biz_data至审计库 192.168.5.5:3310 glsx_data
1.dj_car_maintain
2.dj_car_shop_warning
alter table dj_car_shop_warning
drop column plate_number,
drop column name,
drop column mobile,
drop column vehicle_id;
3.ddh_rescue_event_2022
rename ddh_rescue_event_2022 to ddh_rescue_event;
alter table ddh_rescue_event_2022
drop column DEVICE_NAME,
drop column SPEED,
drop column HANDLE_RESULT,
drop column HANDLE_DATE,
drop column REMIND_FLAG,
drop column SYNC_FLAG,
drop column SYNC_DATE,
drop column OUTBOUND_MEMBER_ID,
drop column OUTBOUND_RESULT,
drop column OUTBOUND_RESULT_DATE,
drop column REMARK,
drop column ACCURATE,
drop column is_emphasis_merchant,
drop column is_show,
drop column DEVICE_ID,
drop column model_result;
4.dj_2021_settle_details
rename dj_2021_settle_details to dj_settle_details;
alter table dj_settle_details
drop column is_virtual,
drop column iccid,
drop column iccid,
drop column material_code,
drop column delivery_order,
drop column pk_price_tax,
drop column hw_price_tax,
drop column install_price_tax,
drop column cost,
drop column flag,
drop column `return`;
5.dj_2021_settle_details_return
rename dj_2021_settle_details_return to dj_device_details_return;
alter table dj_device_details_return
drop column is_virtual,
drop column iccid,
drop column material_code,
drop column delivery_order,
drop column pk_price_tax,
drop column hw_price_tax,
drop column install_price_tax,
drop column cost,
drop column flag,
drop column `return`;
5.dj_system_merchant
6.财务应收单表 dj_2023_settlment_order
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