- 新增 base_project_structure_t 表,存储项目结构信息 - 新增 cm_contract_template 和 template_component 表,支持合同模板管理 - 添加合同管理相关字典类型和数据,包含合同分类等 - 添加基础配置字典类型及项目阶段、预算阶段、成本维度等字典数据 - 调整字符集和索引提升数据库性能和数据完整性保障
38 lines
7.2 KiB
SQL
38 lines
7.2 KiB
SQL
----------------------------- 一级字典分类 -----------------------------
|
||
-- ----------------------------
|
||
-- 字典类型:合同管理(cm)和字典数据
|
||
-- ----------------------------
|
||
INSERT INTO `base_dictionary_type` (`f_id`, `f_parent_id`, `f_full_name`, `f_en_code`, `f_is_tree`, `f_type`, `f_description`, `f_enabled_mark`, `f_sort_code`, `f_creator_time`, `f_creator_user_id`, `f_last_modify_time`, `f_last_modify_user_id`, `f_delete_time`, `f_delete_user_id`, `f_delete_mark`, `f_tenant_id`) VALUES ('bc', '-1', '基础配置', 'bc', 0, 0, NULL, 1, 0, '2026-02-27 11:58:17', 'admin', NULL, NULL, NULL, NULL, NULL, '0');
|
||
|
||
|
||
----------------------------- 二级字典分类 -----------------------------
|
||
-- ----------------------------
|
||
-- 字典类型:项目阶段(projectPhase)和字典数据
|
||
-- ----------------------------
|
||
INSERT INTO `base_dictionary_type` (`f_id`, `f_parent_id`, `f_full_name`, `f_en_code`, `f_is_tree`, `f_type`, `f_description`, `f_enabled_mark`, `f_sort_code`, `f_creator_time`, `f_creator_user_id`, `f_last_modify_time`, `f_last_modify_user_id`, `f_delete_time`, `f_delete_user_id`, `f_delete_mark`, `f_tenant_id`) VALUES ('projectPhase', 'bc', '项目阶段', 'projectPhase', 0, 0, '项目阶段', 1, 0, '2026-03-23 15:50:49', 'admin', '2026-04-24 10:01:11', 'admin', NULL, NULL, NULL, '0');
|
||
|
||
INSERT INTO `base_dictionary_data` (`f_id`, `f_parent_id`, `f_full_name`, `f_en_code`, `f_simple_spelling`, `f_is_default`, `f_description`, `f_enabled_mark`, `f_dictionary_type_id`, `f_sort_code`, `f_creator_time`, `f_creator_user_id`, `f_last_modify_time`, `f_last_modify_user_id`, `f_delete_time`, `f_delete_user_id`, `f_delete_mark`, `f_tenant_id`) VALUES ('projectPhase_LXJD', 'projectPhase', '立项阶段', 'LXJD', 'LXJD', NULL, NULL, 1, 'projectPhase', 10, '2026-03-23 15:51:15', 'admin', NULL, NULL, NULL, NULL, NULL, '0');
|
||
INSERT INTO `base_dictionary_data` (`f_id`, `f_parent_id`, `f_full_name`, `f_en_code`, `f_simple_spelling`, `f_is_default`, `f_description`, `f_enabled_mark`, `f_dictionary_type_id`, `f_sort_code`, `f_creator_time`, `f_creator_user_id`, `f_last_modify_time`, `f_last_modify_user_id`, `f_delete_time`, `f_delete_user_id`, `f_delete_mark`, `f_tenant_id`) VALUES ('projectPhase_KYJD', 'projectPhase', '可研阶段', 'KYJD', 'KYJD', NULL, NULL, 1, 'projectPhase', 20, '2026-03-23 15:51:32', 'admin', NULL, NULL, NULL, NULL, NULL, '0');
|
||
INSERT INTO `base_dictionary_data` (`f_id`, `f_parent_id`, `f_full_name`, `f_en_code`, `f_simple_spelling`, `f_is_default`, `f_description`, `f_enabled_mark`, `f_dictionary_type_id`, `f_sort_code`, `f_creator_time`, `f_creator_user_id`, `f_last_modify_time`, `f_last_modify_user_id`, `f_delete_time`, `f_delete_user_id`, `f_delete_mark`, `f_tenant_id`) VALUES ('projectPhase_SSJD', 'projectPhase', '实施阶段', 'SSJD', 'SSJD', NULL, NULL, 1, 'projectPhase', 30, '2026-03-23 15:51:48', 'admin', NULL, NULL, NULL, NULL, NULL, '0');
|
||
|
||
-- ----------------------------
|
||
-- 字典类型:项目预算阶段(projectBudgetPhase)和字典数据
|
||
-- ----------------------------
|
||
INSERT INTO `base_dictionary_type` (`f_id`, `f_parent_id`, `f_full_name`, `f_en_code`, `f_is_tree`, `f_type`, `f_description`, `f_enabled_mark`, `f_sort_code`, `f_creator_time`, `f_creator_user_id`, `f_last_modify_time`, `f_last_modify_user_id`, `f_delete_time`, `f_delete_user_id`, `f_delete_mark`, `f_tenant_id`) VALUES ('projectBudgetPhase', 'bc', '项目预算阶段', 'projectBudgetPhase', 0, 0, '项目预算阶段', 1, 0, '2026-03-23 15:50:49', 'admin', '2026-04-24 10:01:11', 'admin', NULL, NULL, NULL, '0');
|
||
|
||
INSERT INTO `base_dictionary_data` (`f_id`, `f_parent_id`, `f_full_name`, `f_en_code`, `f_simple_spelling`, `f_is_default`, `f_description`, `f_enabled_mark`, `f_dictionary_type_id`, `f_sort_code`, `f_creator_time`, `f_creator_user_id`, `f_last_modify_time`, `f_last_modify_user_id`, `f_delete_time`, `f_delete_user_id`, `f_delete_mark`, `f_tenant_id`) VALUES ('projectBudgetPhase_rom', 'projectBudgetPhase', '匡算', 'rom', 'KS', NULL, NULL, 1, 'projectBudgetPhase', 10, '2026-03-23 15:51:15', 'admin', NULL, NULL, NULL, NULL, NULL, '0');
|
||
INSERT INTO `base_dictionary_data` (`f_id`, `f_parent_id`, `f_full_name`, `f_en_code`, `f_simple_spelling`, `f_is_default`, `f_description`, `f_enabled_mark`, `f_dictionary_type_id`, `f_sort_code`, `f_creator_time`, `f_creator_user_id`, `f_last_modify_time`, `f_last_modify_user_id`, `f_delete_time`, `f_delete_user_id`, `f_delete_mark`, `f_tenant_id`) VALUES ('projectBudgetPhase_pre', 'projectBudgetPhase', '估算', 'pre', 'GS', NULL, NULL, 1, 'projectBudgetPhase', 20, '2026-03-23 15:51:32', 'admin', NULL, NULL, NULL, NULL, NULL, '0');
|
||
INSERT INTO `base_dictionary_data` (`f_id`, `f_parent_id`, `f_full_name`, `f_en_code`, `f_simple_spelling`, `f_is_default`, `f_description`, `f_enabled_mark`, `f_dictionary_type_id`, `f_sort_code`, `f_creator_time`, `f_creator_user_id`, `f_last_modify_time`, `f_last_modify_user_id`, `f_delete_time`, `f_delete_user_id`, `f_delete_mark`, `f_tenant_id`) VALUES ('projectBudgetPhase_estimate', 'projectBudgetPhase', '概算', 'estimate', 'GS', NULL, NULL, 1, 'projectBudgetPhase', 30, '2026-03-23 15:51:48', 'admin', NULL, NULL, NULL, NULL, NULL, '0');
|
||
INSERT INTO `base_dictionary_data` (`f_id`, `f_parent_id`, `f_full_name`, `f_en_code`, `f_simple_spelling`, `f_is_default`, `f_description`, `f_enabled_mark`, `f_dictionary_type_id`, `f_sort_code`, `f_creator_time`, `f_creator_user_id`, `f_last_modify_time`, `f_last_modify_user_id`, `f_delete_time`, `f_delete_user_id`, `f_delete_mark`, `f_tenant_id`) VALUES ('projectBudgetPhase_budget', 'projectBudgetPhase', '预算', 'budget', 'YS', NULL, NULL, 1, 'projectBudgetPhase', 40, '2026-03-23 15:51:48', 'admin', NULL, NULL, NULL, NULL, NULL, '0');
|
||
|
||
-- ----------------------------
|
||
-- 字典类型:成本维度(costDimension)和字典数据
|
||
-- ----------------------------
|
||
INSERT INTO `base_dictionary_type` (`f_id`, `f_parent_id`, `f_full_name`, `f_en_code`, `f_is_tree`, `f_type`, `f_description`, `f_enabled_mark`, `f_sort_code`, `f_creator_time`, `f_creator_user_id`, `f_last_modify_time`, `f_last_modify_user_id`, `f_delete_time`, `f_delete_user_id`, `f_delete_mark`, `f_tenant_id`) VALUES ('costDimension', 'bc', '成本维度', 'costDimension', 1, 0, '成本维度', 1, 0, '2026-03-23 15:50:49', 'admin', '2026-04-24 10:01:11', 'admin', NULL, NULL, NULL, '0');
|
||
|
||
INSERT INTO `base_dictionary_data` VALUES ('costDimension_RL', '0', '人力', '10', 'RL', NULL, NULL, 1, 'costDimension', 10, '2026-05-14 16:04:01', 'admin', '2026-05-14 16:05:36', 'admin', NULL, NULL, NULL, '0');
|
||
INSERT INTO `base_dictionary_data` VALUES ('costDimension_WL', '0', '物料', '20', 'WL', NULL, NULL, 1, 'costDimension', 20, '2026-05-14 16:05:54', 'admin', NULL, NULL, NULL, NULL, NULL, '0');
|
||
INSERT INTO `base_dictionary_data` VALUES ('costDimension_SB', '0', '设备', '30', 'SB', NULL, NULL, 1, 'costDimension', 30, '2026-05-14 16:06:15', 'admin', NULL, NULL, NULL, NULL, NULL, '0');
|
||
INSERT INTO `base_dictionary_data` VALUES ('costDimension_FW', '0', '服务', '40', 'FW', NULL, NULL, 1, 'costDimension', 40, '2026-05-14 16:06:39', 'admin', NULL, NULL, NULL, NULL, NULL, '0');
|
||
INSERT INTO `base_dictionary_data` VALUES ('costDimension_JJ', '0', '间接', '50', 'JJ', NULL, NULL, 1, 'costDimension', 50, '2026-05-14 16:06:52', 'admin', NULL, NULL, NULL, NULL, NULL, '0');
|