Files
ccdi/sql/dpc_intermediary_dict_data_20260129.sql
2026-01-29 13:39:47 +08:00

140 lines
8.5 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.
-- ============================================================
-- 中介黑名单字典数据脚本
-- 功能:创建个人和机构中介所需的字典数据
-- 作者ruoyi
-- 日期2026-01-29
-- ============================================================
-- 设置客户端字符集为 utf8mb4
SET NAMES utf8mb4;
SET CHARACTER SET utf8mb4;
SET character_set_client = utf8mb4;
SET character_set_connection = utf8mb4;
SET character_set_results = utf8mb4;
USE `discipline-prelim-check`;
-- ============================================================
-- 人员类型字典dpc_person_type
-- ============================================================
-- 先删除旧数据(如果存在)
DELETE FROM sys_dict_data WHERE dict_type = 'dpc_person_type';
DELETE FROM sys_dict_type WHERE dict_type = 'dpc_person_type';
-- 插入字典类型
INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark)
VALUES ('人员类型', 'dpc_person_type', '0', 'admin', NOW(), '中介黑名单-人员类型');
-- 插入字典数据
INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark)
VALUES
(1, '中介', '中介', 'dpc_person_type', '', 'default', 'N', '0', 'admin', NOW(), NULL),
(2, '职业背债人', '职业背债人', 'dpc_person_type', '', 'default', 'N', '0', 'admin', NOW(), NULL),
(3, '房产中介', '房产中介', 'dpc_person_type', '', 'default', 'N', '0', 'admin', NOW(), NULL);
-- ============================================================
-- 人员子类型字典dpc_person_sub_type
-- ============================================================
DELETE FROM sys_dict_data WHERE dict_type = 'dpc_person_sub_type';
DELETE FROM sys_dict_type WHERE dict_type = 'dpc_person_sub_type';
INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark)
VALUES ('人员子类型', 'dpc_person_sub_type', '0', 'admin', NOW(), '中介黑名单-人员子类型');
INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark)
VALUES
(1, '本人', '本人', 'dpc_person_sub_type', '', 'default', 'N', '0', 'admin', NOW(), NULL),
(2, '配偶', '配偶', 'dpc_person_sub_type', '', 'default', 'N', '0', 'admin', NOW(), NULL),
(3, '子女', '子女', 'dpc_person_sub_type', '', 'default', 'N', '0', 'admin', NOW(), NULL),
(9, '其他', '其他', 'dpc_person_sub_type', '', 'default', 'N', '0', 'admin', NOW(), NULL);
-- ============================================================
-- 性别字典dpc_indiv_gender- 用于个人中介Excel下拉框
-- ============================================================
DELETE FROM sys_dict_data WHERE dict_type = 'dpc_indiv_gender';
DELETE FROM sys_dict_type WHERE dict_type = 'dpc_indiv_gender';
INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark)
VALUES ('个人中介性别', 'dpc_indiv_gender', '0', 'admin', NOW(), '中介黑名单-个人中介性别');
INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark)
VALUES
(1, '', 'M', 'dpc_indiv_gender', '', 'default', 'N', '0', 'admin', NOW(), NULL),
(2, '', 'F', 'dpc_indiv_gender', '', 'default', 'N', '0', 'admin', NOW(), NULL),
(3, '其他', 'O', 'dpc_indiv_gender', '', 'default', 'N', '0', 'admin', NOW(), NULL);
-- ============================================================
-- 证件类型字典dpc_certificate_type- 用于个人中介Excel下拉框
-- ============================================================
DELETE FROM sys_dict_data WHERE dict_type = 'dpc_certificate_type';
DELETE FROM sys_dict_type WHERE dict_type = 'dpc_certificate_type';
INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark)
VALUES ('证件类型', 'dpc_certificate_type', '0', 'admin', NOW(), '中介黑名单-证件类型');
INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark)
VALUES
(1, '身份证', '身份证', 'dpc_certificate_type', '', 'default', 'N', '0', 'admin', NOW(), NULL),
(2, '护照', '护照', 'dpc_certificate_type', '', 'default', 'N', '0', 'admin', NOW(), NULL),
(3, '港澳通行证', '港澳通行证', 'dpc_certificate_type', '', 'default', 'N', '0', 'admin', NOW(), NULL),
(4, '台胞证', '台胞证', 'dpc_certificate_type', '', 'default', 'N', '0', 'admin', NOW(), NULL),
(5, '军官证', '军官证', 'dpc_certificate_type', '', 'default', 'N', '0', 'admin', NOW(), NULL);
-- ============================================================
-- 主体类型字典dpc_entity_type- 用于机构中介Excel下拉框
-- ============================================================
DELETE FROM sys_dict_data WHERE dict_type = 'dpc_entity_type';
DELETE FROM sys_dict_type WHERE dict_type = 'dpc_entity_type';
INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark)
VALUES ('主体类型', 'dpc_entity_type', '0', 'admin', NOW(), '中介黑名单-主体类型');
INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark)
VALUES
(1, '有限责任公司', '有限责任公司', 'dpc_entity_type', '', 'default', 'N', '0', 'admin', NOW(), NULL),
(2, '股份有限公司', '股份有限公司', 'dpc_entity_type', '', 'default', 'N', '0', 'admin', NOW(), NULL),
(3, '合伙企业', '合伙企业', 'dpc_entity_type', '', 'default', 'N', '0', 'admin', NOW(), NULL),
(4, '个体工商户', '个体工商户', 'dpc_entity_type', '', 'default', 'N', '0', 'admin', NOW(), NULL),
(5, '外资企业', '外资企业', 'dpc_entity_type', '', 'default', 'N', '0', 'admin', NOW(), NULL);
-- ============================================================
-- 企业性质字典dpc_enterprise_nature- 用于机构中介Excel下拉框
-- ============================================================
DELETE FROM sys_dict_data WHERE dict_type = 'dpc_enterprise_nature';
DELETE FROM sys_dict_type WHERE dict_type = 'dpc_enterprise_nature';
INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark)
VALUES ('企业性质', 'dpc_enterprise_nature', '0', 'admin', NOW(), '中介黑名单-企业性质');
INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark)
VALUES
(1, '国企', '国企', 'dpc_enterprise_nature', '', 'default', 'N', '0', 'admin', NOW(), NULL),
(2, '民企', '民企', 'dpc_enterprise_nature', '', 'default', 'N', '0', 'admin', NOW(), NULL),
(3, '外企', '外企', 'dpc_enterprise_nature', '', 'default', 'N', '0', 'admin', NOW(), NULL),
(4, '合资', '合资', 'dpc_enterprise_nature', '', 'default', 'N', '0', 'admin', NOW(), NULL),
(9, '其他', '其他', 'dpc_enterprise_nature', '', 'default', 'N', '0', 'admin', NOW(), NULL);
-- ============================================================
-- 数据来源字典dpc_data_source
-- ============================================================
DELETE FROM sys_dict_data WHERE dict_type = 'dpc_data_source';
DELETE FROM sys_dict_type WHERE dict_type = 'dpc_data_source';
INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark)
VALUES ('数据来源', 'dpc_data_source', '0', 'admin', NOW(), '中介黑名单-数据来源');
INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark)
VALUES
(1, '手动录入', 'MANUAL', 'dpc_data_source', '', 'default', 'N', '0', 'admin', NOW(), NULL),
(2, '系统同步', 'SYSTEM', 'dpc_data_source', '', 'default', 'N', '0', 'admin', NOW(), NULL),
(3, '批量导入', 'IMPORT', 'dpc_data_source', '', 'default', 'N', '0', 'admin', NOW(), NULL),
(4, '接口获取', 'API', 'dpc_data_source', '', 'default', 'N', '0', 'admin', NOW(), NULL);
-- ============================================================
-- 执行完成后操作说明
-- ============================================================
-- 1. 执行完成后,请通过系统管理 > 字典管理验证字典数据
-- 2. 重要:在每个字典类型页面点击"刷新缓存"按钮,确保字典数据加载到 Redis
-- 3. 验证字典缓存是否生效(可通过测试模板下载确认下拉框是否显示)
-- 4. 检查 Redis 缓存中的字典数据sys_dict_cache:*