-- 集运应收账单模板 v1:适用于已存在 ar_export_template 表的数据库。 -- 执行一次;相同业务类型、模板编码和版本已存在时,唯一索引报错,不覆盖已有配置。 -- 配套部署支持 AR_BILL_JY 的后端代码,导出时保留模板固定公司抬头及收款信息。 INSERT INTO `ar_export_template` ( `template_code`, `template_name`, `business_type`, `template_version`, `storage_type`, `storage_key`, `file_hash`, `status`, `is_default`, `effective_start`, `effective_end`, `remark`, `create_by`, `create_time` ) VALUES ( 'AR_BILL_JY', '应收账单集运模板', 'AR_BILL', '1.0', 'CLASSPATH', 'templates/receivable/ar_bill_template_jy.xlsx', NULL, 'ENABLED', '0', NULL, NULL, '威狮国际集运物流(深圳)有限公司应收账单模板', SUBSTRING_INDEX(CURRENT_USER(), '@', 1), NOW() ); -- 核对新增记录,正常应返回一条。 SELECT `template_id`, `template_code`, `template_name`, `business_type`, `template_version`, `storage_type`, `storage_key`, `status`, `is_default`, `effective_start`, `effective_end` FROM `ar_export_template` WHERE `business_type` = 'AR_BILL' AND `template_code` = 'AR_BILL_JY' AND `template_version` = '1.0';