Files
his/sql/bug_462_add_specimen_code_dict.sql
赵云 5838b868df Fix Bug #462: [目录管理-诊疗目录] 编辑弹窗中"所需标本"下拉框数据加载失败
根因:sys_dict_type 表中缺少 specimen_code 字典类型定义,sys_dict_data
表中缺少对应标本数据记录,导致前端 useDict('specimen_code') 请求返回空数组。

修复:新增 SQL 迁移脚本,插入 specimen_code 字典类型及7条标本数据
(血液、尿液、粪便、呼吸道、无菌体液、生殖道、其他)。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 23:35:03 +08:00

19 lines
1.1 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.

-- Bug #462: 诊疗目录编辑弹窗中"所需标本"下拉框数据加载失败
-- 根因: sys_dict_type 表中缺少 specimen_code 字典类型sys_dict_data 表中缺少对应数据
-- 修复: 插入字典类型及7条标本数据
-- 插入字典类型
INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark)
VALUES ('标本类型', 'specimen_code', '0', 'admin', NOW(), '诊疗项目所需标本类型字典');
-- 插入标本数据
INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, status, create_by, create_time, remark)
VALUES
(1, '血液', '1', 'specimen_code', '0', 'admin', NOW(), '血液标本'),
(2, '尿液', '2', 'specimen_code', '0', 'admin', NOW(), '尿液标本'),
(3, '粪便', '3', 'specimen_code', '0', 'admin', NOW(), '粪便标本'),
(4, '呼吸道', '4', 'specimen_code', '0', 'admin', NOW(), '呼吸道标本'),
(5, '无菌体液', '5', 'specimen_code', '0', 'admin', NOW(), '无菌体液标本'),
(6, '生殖道', '6', 'specimen_code', '0', 'admin', NOW(), '生殖道标本'),
(7, '其他', '7', 'specimen_code', '0', 'admin', NOW(), '其他标本');