Commit 5c7696d1 by zhouhaibao

feat(data-report): 新增未匹配费用汇总表及商户别名映射数据

- 创建 biz_unmatched_fee 表用于记录未匹配费用汇总信息
- 添加唯一索引 uk_task_month_feetype 防止重复数据
- 向 merchant_4s 表插入10条商户标准名称与别名映射
- 向 merchant_yq 表插入4条园区店别名映射数据
1 parent fcf3a94b
-- data_report.biz_unmatched_fee definition
CREATE TABLE `biz_unmatched_fee` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`task_id` int(11) NOT NULL COMMENT '所属任务单据ID',
`stat_month` varchar(7) NOT NULL COMMENT '统计月份YYYY-MM',
`fee_type` varchar(50) NOT NULL COMMENT '费用类型: market_fee/external_construction/technician_salary/marketing_team_salary/rent_utilities/renovation_amortization/store_consumables',
`unmatched_amount` decimal(15,2) NOT NULL COMMENT '未匹配金额(正数=未分摊的费用;负数=未冲减的金额)',
`created_at` datetime DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_task_month_feetype` (`task_id`,`stat_month`,`fee_type`)
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8mb4 COMMENT='未匹配费用汇总表';
\ No newline at end of file
INSERT INTO merchant_4s
(standard_name, alias_name, create_time, update_time)
VALUES('龙联汽车科技(深圳)有限公司', '深圳趣融汽车科技有限公司', '2026-08-10 14:03:43', '2026-08-10 14:03:43');
INSERT INTO merchant_4s
(standard_name, alias_name, create_time, update_time)
VALUES('宁夏瑞华博汽车销售服务有限公司', '(内部结算)银川华为', '2026-08-10 14:03:43', '2026-08-10 14:03:43');
INSERT INTO merchant_4s
(standard_name, alias_name, create_time, update_time)
VALUES('广州市聚辉汽车销售服务有限公司', '广州溢桂汽车销售服务有限公司', '2026-08-10 14:03:43', '2026-08-10 14:03:43');
INSERT INTO merchant_4s
(standard_name, alias_name, create_time, update_time)
VALUES('广州市聚辉汽车销售服务有限公司', '自然到店(溢丰)', '2026-08-10 14:03:43', '2026-08-10 14:03:43');
INSERT INTO merchant_4s
(standard_name, alias_name, create_time, update_time)
VALUES('宜宾宜盛汽车销售服务有限公司', '宜宾广信汽车销售有限公司', '2026-08-10 14:03:43', '2026-08-10 14:03:43');
INSERT INTO merchant_4s
(standard_name, alias_name, create_time, update_time)
VALUES('重庆纵优达商贸有限公司', '(深蓝)中国长安汽车集团天津销售有限公司', '2026-08-10 14:03:43', '2026-08-10 14:03:43');
INSERT INTO merchant_4s
(standard_name, alias_name, create_time, update_time)
VALUES('重庆纵优达商贸有限公司', '(长安福特)中国长安汽车集团天津销售有限公司', '2026-08-10 14:03:43', '2026-08-10 14:03:43');
INSERT INTO merchant_4s
(standard_name, alias_name, create_time, update_time)
VALUES('重庆纵优达商贸有限公司', '(长安新能源)中国长安汽车集团天津销售有限公司', '2026-08-10 14:03:43', '2026-08-10 14:03:43');
INSERT INTO merchant_4s
(standard_name, alias_name, create_time, update_time)
VALUES('重庆纵优达商贸有限公司', '(长安油车)中国长安汽车集团天津销售有限公司', '2026-08-10 14:03:43', '2026-08-10 14:03:43');
INSERT INTO merchant_4s
(standard_name, alias_name, create_time, update_time)
VALUES('北京中益德诚汽车销售有限公司', '北京中益德诚姚家园新能源汽车销售有限公司', '2026-08-10 14:03:43', '2026-08-10 14:03:43');
INSERT INTO merchant_yq
(standard_name, alias_name, create_time, update_time)
VALUES('D+龙南比亚迪园区店', 'D+龙南比亚迪园区店/深圳万国城布吉店', '2026-08-10 14:03:43', '2026-08-10 14:03:43');
INSERT INTO merchant_yq
(standard_name, alias_name, create_time, update_time)
VALUES('D+深圳布吉万国城园区店', 'D+龙南比亚迪园区店/深圳万国城布吉店', '2026-08-10 14:03:43', '2026-08-10 14:03:43');
INSERT INTO merchant_yq
(standard_name, alias_name, create_time, update_time)
VALUES('D+新疆永祥瑞欣园区店', '乌鲁木齐永祥瑞欣汽车销售有限公司/D+新疆乌市友好园区店', '2026-08-10 14:03:43', '2026-08-19 14:11:32');
INSERT INTO merchant_yq
(standard_name, alias_name, create_time, update_time)
VALUES('D+新疆乌市友好园区店', '乌鲁木齐永祥瑞欣汽车销售有限公司/D+新疆乌市友好园区店', '2026-08-10 14:03:43', '2026-08-19 14:11:32');
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!