Files
dzpt/src/main/java/com/saye/hospitalgd/controller/update_dicinfo.sql
2025-09-22 11:12:27 +08:00

37 lines
1.9 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 更新HIS支付方式字典表适配你的四种支付方式
-- 1. 更新现有的PAY_TYPE字典值确保与汇总统计逻辑匹配
-- 现金支付保持为5
UPDATE `dicinfo` SET `dicvalue` = '4' WHERE `diccode` = 'f0230cea94134322982d45544255ee8f' AND `parent_code` = 'PAY_TYPE';
-- 微信支付改为1扫码支付
UPDATE `dicinfo` SET `dicname` = '微信支付', `dicvalue` = '1' WHERE `diccode` = '48c8044ee33649bcaf64181b570c1c75' AND `parent_code` = 'PAY_TYPE';
-- 银行卡支付保持为1但改名为扫码支付
UPDATE `dicinfo` SET `dicname` = '扫码支付', `dicvalue` = '1' WHERE `diccode` = 'a6ef5f470ae744a4ae1571825ddb8ca5' AND `parent_code` = 'PAY_TYPE';
-- 2. 新增聚合支付和军保支付
INSERT INTO `dicinfo` VALUES ('juhezf001', '聚合支付', '1', 'PAY_TYPE', '2024-01-01 00:00:00', '2024-01-01 00:00:00', 6);
INSERT INTO `dicinfo` VALUES ('junbao001', '军保支付', '3', 'PAY_TYPE', '2024-01-01 00:00:00', '2024-01-01 00:00:00', 7);
-- 3. 确保字典表结构正确
-- 最终PAY_TYPE字典应该是
-- 扫码支付(包含微信、聚合) -> 1
-- 银行卡支付 -> 2
-- 军保支付 -> 3
-- 现金支付 -> 4
-- 其他 -> 5
-- 如果需要重新整理,可以删除旧数据重新插入:
/*
DELETE FROM `dicinfo` WHERE `parent_code` = 'PAY_TYPE' AND `diccode` != 'PAY_TYPE';
INSERT INTO `dicinfo` VALUES ('pay_type_001', '扫码支付', '1', 'PAY_TYPE', '2024-01-01 00:00:00', '2024-01-01 00:00:00', 1);
INSERT INTO `dicinfo` VALUES ('pay_type_002', '银行卡支付', '2', 'PAY_TYPE', '2024-01-01 00:00:00', '2024-01-01 00:00:00', 2);
INSERT INTO `dicinfo` VALUES ('pay_type_003', '军保支付', '3', 'PAY_TYPE', '2024-01-01 00:00:00', '2024-01-01 00:00:00', 3);
INSERT INTO `dicinfo` VALUES ('pay_type_004', '现金支付', '4', 'PAY_TYPE', '2024-01-01 00:00:00', '2024-01-01 00:00:00', 4);
INSERT INTO `dicinfo` VALUES ('pay_type_005', '其他', '5', 'PAY_TYPE', '2024-01-01 00:00:00', '2024-01-01 00:00:00', 5);
*/