Files
laws_chery_serve/db/第二阶段.sql
T
mzaxd 8a7c62a932 ci: 企标管理新增制修订类型字段并调整相关权限和字典- 在 LawsEnterpriseStandard 实体类中添加 revisionType 字段,用于表示制修订类型
- 在数据库中新增 esp_revision_type 字典,用于企标计划的制修订类型
- 为企标管理表新增制修订类型字段
-调整前端权限,新增查看征求意见的权限
- 修改字典管理,更新企标计划的字典配置
2024-10-14 10:28:03 +08:00

324 lines
20 KiB
SQL

create table laws_enterprise_standard_plan
(
id varchar(36) not null comment '主键id',
revision_type varchar(50) comment '制修订类别',
project_type varchar(50) comment '项目类型',
standard_id varchar(50) comment '标准id',
standard_number varchar(200) comment '标准编号',
standard_name varchar(200) comment '标准名称',
main_drafting_user varchar(50) comment '起草人',
depart_id varchar(50) comment '所在部门id',
professional_module varchar(30) comment '专业模块',
draft_complete_date datetime comment '初稿完成日期',
draft_complete_flag tinyint default 0 comment '初稿完成标识',
plan_archiving_date datetime comment '计划归档日期',
plan_archiving_flag tinyint default 0 comment '计划归档标识',
have_english_version varchar(50) comment '是否有英文版',
committee varchar(500) comment '所属技术委员会',
actual_archiving_date datetime comment '实际归档日期',
project_status varchar(50) default 1 comment '项目状态',
plan_status varchar(50) default 1 comment '计划状态',
create_by varchar(36) comment '创建人',
create_time datetime comment '创建时间',
update_by varchar(36) comment '更新人',
update_time datetime comment '更新时间',
org_code varchar(64) comment '所属部门',
del_flag tinyint comment '删除状态(0-正常,1-删除)',
primary key (id)
);
alter table laws_enterprise_standard_plan
comment '企标计划';
create table laws_standard_solicit_opinions
(
id varchar(36) not null comment '主键id',
standard_id varchar(36) not null comment '标准id',
standard_number varchar(200) comment '标准编号',
standard_name varchar(200) comment '标准名称',
applicable_market varchar(4) comment '适用市场',
start_time datetime comment '开始日期',
end_time datetime comment '截止日期',
number varchar(500) comment '征求意见反馈单编号',
file varchar(500) comment '意见反馈表',
process_complete_time datetime comment '流程完成日期',
create_by varchar(36) comment '创建人id',
create_time datetime comment '创建时间',
update_by varchar(36) comment '修改人id',
update_time datetime comment '修改时间',
org_code varchar(30) comment '部门code',
del_flag varchar(4) comment '删除状态(0-正常,1-删除)',
primary key (id)
);
alter table laws_standard_solicit_opinions
comment '标准征求意见';
create table laws_standard_solicit_opinions_term
(
id varchar(36) not null comment '主键id',
solicit_opinions_id varchar(36) comment '征求意见id',
proposer_id varchar(36) comment '法规工程师',
professional_module varchar(30) comment '专业模块',
term_id varchar(36) comment '条款id',
term_num varchar(200) comment '标准编号/条款号',
term_name varchar(200) comment '标准名称/条款内容',
translation varchar(200) comment '译文',
before_modify varchar(500) comment '修改前',
after_modify varchar(500) comment '修改后',
reason varchar(500) comment '修改理由',
feedback_person_id varchar(500) comment '反馈人id',
feedback_person varchar(500) comment '反馈人',
feedback_opinion varchar(10) comment '反馈意见',
create_by varchar(36) comment '创建人id',
create_time datetime comment '创建时间',
update_by varchar(36) comment '修改人id',
update_time datetime comment '修改时间',
org_code varchar(30) comment '部门code',
primary key (id, solicit_opinions_id)
);
alter table laws_standard_solicit_opinions_term
comment '标准征求意见条款关联表';
create table process_annual_init
(
id varchar(36) not null comment '主键id',
depart_manager varchar(500) comment '部门经理',
standard_depart_handler varchar(36) comment '法规部门处理人id',
standard_depart_manager varchar(36) comment '法规部门经理id',
senior_manager varchar(500) comment '高级经理',
chief_inspector varchar(500) comment '总监',
authorized_person varchar(500) comment '授权人id',
file varchar(500) comment '附件',
create_by varchar(36) comment '创建人',
create_time datetime comment '创建时间',
update_by varchar(36) comment '更新人',
update_time datetime comment '更新时间',
org_code varchar(64) comment '所属部门',
del_flag varchar(4) comment '删除状态(0-正常,1-删除)',
primary key (id)
);
alter table process_annual_init
comment '年度制修订计划流程';
create table process_annual_init_link
(
id varchar(36) not null comment '主键id',
process_id varchar(36) comment '流程主表id',
revision_type varchar(50) comment '制修订类别',
standard_id varchar(50) comment '标准id',
standard_number varchar(200) comment '标准编号',
standard_name varchar(200) comment '标准名称',
main_drafting_user varchar(50) comment '起草人',
depart_id varchar(50) comment '所在部门id',
professional_module varchar(30) comment '专业模块',
draft_complete_date datetime comment '初稿完成日期',
plan_archiving_date datetime comment '计划归档日期',
have_english_version varchar(50) comment '是否有英文版',
committee varchar(500) comment '所属技术委员会',
create_by varchar(36) comment '创建人',
create_time datetime comment '创建时间',
update_by varchar(36) comment '更新人',
update_time datetime comment '更新时间',
org_code varchar(64) comment '所属部门',
del_flag tinyint comment '删除状态(0-正常,1-删除)',
primary key (id)
);
alter table process_annual_init_link
comment '年度制修订计划流程关联标准';
create table process_plan_change
(
id varchar(36) not null comment '主键id',
change_type varchar(1) comment '变更类型',
depart_manager varchar(500) comment '部门经理',
standard_depart_handler varchar(36) comment '法规部门处理人id',
standard_depart_manager varchar(36) comment '法规部门经理id',
senior_manager varchar(500) comment '高级经理',
chief_inspector varchar(500) comment '总监',
authorized_person varchar(500) comment '授权人',
file varchar(500) comment '附件',
create_by varchar(36) comment '创建人',
create_time datetime comment '创建时间',
update_by varchar(36) comment '更新人',
update_time datetime comment '更新时间',
org_code varchar(64) comment '所属部门',
del_flag varchar(4) comment '删除状态(0-正常,1-删除)',
primary key (id)
);
alter table process_plan_change
comment '企标计划变更流程';
create table process_plan_change_link
(
id varchar(36) not null comment '主键id'
primary key,
process_id varchar(36) null comment '流程主表id',
revision_type varchar(50) null comment '制修订类别',
plan_id varchar(36) null comment '企标计划id',
standard_id varchar(50) null comment '标准id',
standard_number varchar(200) null comment '标准编号',
standard_name varchar(200) null comment '标准名称',
main_drafting_user varchar(50) null comment '起草人',
drafting_user_new varchar(50) null comment '新起草人',
depart_id varchar(50) null comment '所在部门id',
depart_id_new varchar(50) null comment '新所在部门id',
professional_module varchar(30) null comment '专业模块',
draft_complete_date datetime null comment '初稿完成日期',
plan_archiving_date datetime null comment '计划归档日期',
draft_complete_date_change datetime null comment '初稿完成日期变更后',
plan_archiving_date_change datetime null comment '计划归档日期变更后',
have_english_version varchar(50) null comment '是否有英文版',
committee varchar(500) null comment '所属技术委员会',
change_reason varchar(500) null comment '变更原因',
create_by varchar(36) null comment '创建人',
create_time datetime null comment '创建时间',
update_by varchar(36) null comment '更新人',
update_time datetime null comment '更新时间',
org_code varchar(64) null comment '所属部门',
del_flag tinyint null comment '删除状态(0-正常,1-删除)'
);
alter table process_plan_change_link
comment '企标计划变更流程关联标准';
create table process_standard_solicit_opinions
(
id varchar(36) not null comment '主键id',
standard_id varchar(50) comment '标准id',
standard_number varchar(200) comment '标准编号',
standard_name varchar(200) comment '标准名称',
standard_text varchar(50) comment '标准文本',
applicable_market varchar(4) comment '适用市场',
end_time datetime comment '截止日期',
create_by varchar(36) comment '创建人',
create_time datetime comment '创建时间',
update_by varchar(36) comment '更新人',
update_time datetime comment '更新时间',
org_code varchar(64) comment '所属部门',
del_flag varchar(4) comment '删除状态(0-正常,1-删除)',
primary key (id)
);
alter table process_standard_solicit_opinions
comment '标准征求意见流程';
create table process_standard_solicit_opinions_term
(
id varchar(36) not null comment '主键id',
process_id varchar(36) comment '流程主表id',
professional_module varchar(30) comment '专业模块',
term_id varchar(36) comment '条款id',
term_num varchar(200) comment '标准编号/条款号',
term_name varchar(200) comment '标准名称/条款内容',
create_by varchar(36) comment '创建人',
create_time datetime comment '创建时间',
update_by varchar(36) comment '更新人',
update_time datetime comment '更新时间',
org_code varchar(64) comment '所属部门',
del_flag varchar(4) comment '删除状态(0-正常,1-删除)',
primary key (id)
);
alter table process_standard_solicit_opinions_term
comment '标准征求意见流程关联条款';
create table process_standard_solicit_opinions_user
(
id varchar(36) not null comment '主键id',
process_id varchar(36) comment '流程主表id',
term_id varchar(36) comment '流程条款表id',
parent_execution_id varchar(36) comment '父执行实例流id',
standard_professional_person varchar(36) comment '法规专业负责人',
depart_manager varchar(36) comment '部门经理',
depart_senior_manager varchar(36) comment '部门高级经理',
before_modify varchar(500) comment '修改前',
after_modify varchar(500) comment '修改后',
reason varchar(500) comment '修改理由',
feedback_opinion varchar(10) comment '反馈意见',
create_by varchar(36) comment '创建人',
create_time datetime comment '创建时间',
update_by varchar(36) comment '更新人',
update_time datetime comment '更新时间',
org_code varchar(64) comment '所属部门',
del_flag varchar(4) comment '删除状态(0-正常,1-删除)',
primary key (id)
);
alter table process_standard_solicit_opinions_user
comment '标准征求意见流程关联用户';
-- 企标计划-计划状态
INSERT INTO sys_dict (id, dict_name, dict_code, description, del_flag, create_by, create_time, is_tag_dict,
is_read_only)
VALUES ('1836301517254893569', '企标计划-计划状态', 'esp_plan_status',
'新增:新增计划入库 延期:初稿完成日期和计划归档日期延期 取消:计划取消 如走到初稿、征求意见流程了,计划不允许取消', 0, 'cheryrsm', '2024-09-18 15:09:33', 0, 0);
INSERT INTO sys_dict_item (id, dict_id, item_text, item_value, description, sort_order, `status`, create_by,
create_time, is_tag_dict, is_read_only, del_flag)
VALUES ('1836301610292944898', '1836301517254893569', '新增', '1', '', 1, 1, 'cheryrsm', '2024-09-18 15:09:55', 0, 0, 0);
INSERT INTO sys_dict_item (id, dict_id, item_text, item_value, description, sort_order, `status`, create_by,
create_time, is_tag_dict, is_read_only, del_flag)
VALUES ('1836301637493006338', '1836301517254893569', '延期', '2', '', 2, 1, 'cheryrsm', '2024-09-18 15:10:01', 0, 0, 0);
INSERT INTO sys_dict_item (id, dict_id, item_text, item_value, description, sort_order, `status`, create_by,
create_time, is_tag_dict, is_read_only, del_flag)
VALUES ('1836301659982864385', '1836301517254893569', '取消', '3', '', 3, 1, 'cheryrsm', '2024-09-18 15:10:07', 0, 0, 0);
-- 企标状态增加 征求意见 --
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `parent_id`, `item_text`, `en_name`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `stat_node`, `en_base`) VALUES ('1696811980113661954', '1696811542077329409', NULL, '征求意见', 'Seek For Opinions', '2', '征求意见', 2, 1, 'admin', '2023-08-30 17:07:56', NULL, NULL, 1, 1, NULL, '0', NULL, NULL);
-- 企标计划变更-变更类型
INSERT INTO sys_dict (id, dict_name, dict_code, description, del_flag, create_by, create_time, is_tag_dict,
is_read_only)
VALUES ('1843464136587796482', '企标计划变更-变更类型', 'espc_change_type', '新增,取消,延期,人员变更', 0, 'cheryrsm', '2024-10-08 09:31:14',
0, 0);
INSERT INTO sys_dict_item (id, dict_id, item_text, en_name, item_value, description, sort_order, `status`, create_by,
create_time, is_tag_dict, is_read_only, del_flag)
VALUES ('1843464372399955969', '1843464136587796482', '新增', 'add', '1', '', 1, 1, 'cheryrsm', '2024-10-08 09:32:10', 0,
0, 0);
INSERT INTO sys_dict_item (id, dict_id, item_text, en_name, item_value, description, sort_order, `status`, create_by,
create_time, is_tag_dict, is_read_only, del_flag)
VALUES ('1843464482533990401', '1843464136587796482', '取消', 'cancel', '2', '', 2, 1, 'cheryrsm', '2024-10-08 09:32:37',
0, 0, 0);
INSERT INTO sys_dict_item (id, dict_id, item_text, en_name, item_value, description, sort_order, `status`, create_by,
create_time, is_tag_dict, is_read_only, del_flag)
VALUES ('1843464553690357761', '1843464136587796482', '延期', 'delay', '3', '', 3, 1, 'cheryrsm', '2024-10-08 09:32:54',
0, 0, 0);
INSERT INTO sys_dict_item (id, dict_id, item_text, en_name, item_value, description, sort_order, `status`, create_by,
create_time, is_tag_dict, is_read_only, del_flag)
VALUES ('1843464714877460481', '1843464136587796482', '人员变更', 'Person change', '4', '', 4, 1, 'cheryrsm',
'2024-10-08 09:33:32', 0, 0, 0);
-- 部署模板后 需要更新顺序
update process_model_node set sort = 1 where process_key = 'process-plan-change' and xml_node_id = 'qcrfq';
update process_model_node set sort = 2 where process_key = 'process-plan-change' and xml_node_id = 'bmjlsp';
update process_model_node set sort = 3 where process_key = 'process-plan-change' and xml_node_id = 'fgbmclrsp';
update process_model_node set sort = 4 where process_key = 'process-plan-change' and xml_node_id = 'fgbmjlsp';
update process_model_node set sort = 5 where process_key = 'process-plan-change' and xml_node_id = 'gjjlsp';
update process_model_node set sort = 6 where process_key = 'process-plan-change' and xml_node_id = 'zjsp';
update process_model_node set sort = 7 where process_key = 'process-plan-change' and xml_node_id = 'sqrsp';
update process_model_node set sort = 1 where process_key = 'process-annual-init' and xml_node_id = 'qcrfq';
update process_model_node set sort = 2 where process_key = 'process-annual-init' and xml_node_id = 'bmjlsp';
update process_model_node set sort = 3 where process_key = 'process-annual-init' and xml_node_id = 'fgbmclrsp';
update process_model_node set sort = 4 where process_key = 'process-annual-init' and xml_node_id = 'fgbmjlsp';
update process_model_node set sort = 5 where process_key = 'process-annual-init' and xml_node_id = 'gjjlsp';
update process_model_node set sort = 6 where process_key = 'process-annual-init' and xml_node_id = 'zjsp';
update process_model_node set sort = 7 where process_key = 'process-annual-init' and xml_node_id = 'sqrsp';
-- 文件表新增字段
ALTER TABLE `oss_file`
ADD COLUMN `onl_id` varchar(36) NULL COMMENT 'onlyOffice关联Id 每次在线编辑生成一个 历史版本均用' AFTER `bind_id`;
-- 添加查看征求意见按钮权限
INSERT INTO sys_permission (id, parent_id, name, menu_en, perms, perms_type, sort_no, menu_type, is_leaf, is_route, keep_alive, create_by, del_flag, hidden, create_time, status, always_show, internal_or_external) VALUES ('8989f8bc927fe66001927fe660fb0000', '1700076061557874690', '查看征求意见', 'View for comments', 'enterpriseStandard:adviceList', '1', 3.0, 2, true, true, false, 'chh', 0, false, '2024-10-12 16:44:17', '1', false, false);
-- 修改修订类型字典
UPDATE `laws_chery_dev`.`sys_dict` SET `dict_name` = '企标计划-制修订类型', `dict_en_name` = NULL, `dict_code` = 'esp_revision_type', `description` = '', `del_flag` = 0, `create_by` = 'ldq', `create_time` = '2024-09-05 09:32:49', `update_by` = NULL, `update_time` = NULL, `type` = NULL, `is_tag_dict` = 1, `is_read_only` = 0, `attribute_type` = '1', `order_num` = 35 WHERE `id` = '1831505732815413250';
-- 企标新增制修订类型字段
INSERT INTO `laws_tag` (`id`, `table_name`, `db_field_name`, `db_field_en_name`, `db_field_txt`, `order_num`, `db_field_name_old`, `db_is_key`, `db_is_null`, `db_type`, `db_length`, `db_point_length`, `db_default_val`, `dict_field`, `dict_table`, `dict_text`, `field_show_type`, `field_href`, `field_length`, `field_valid_type`, `field_must_input`, `field_extend_json`, `field_default_value`, `is_show_form_create`, `is_query`, `is_show_form`, `is_show_list`, `is_read_only`, `query_mode`, `main_table`, `main_field`, `update_by`, `update_time`, `create_time`, `create_by`, `converter`, `query_def_val`, `query_dict_text`, `query_dict_field`, `query_dict_table`, `query_show_type`, `query_config_flag`, `query_valid_type`, `query_must_input`, `sort_flag`, `show_area`, `is_show_laws_list`, `is_show_search`, `del_flag`, `is_model`, `dict_id`, `home_search_context_order`, `home_search_file_order`, `dict_field_search`, `dict_table_search`, `dict_text_search`, `usable_range`, `tree_first_href`, `import_sort`) VALUES ('1845652446329446401', 'laws_enterprise_standard', 'zhi4_xiu1_ding4_lei4_xing2', 'Revision Type', '制修订类型', 29, 'zhi4_xiu1_ding4_lei4_xing2', 0, 1, 'String', 100, NULL, NULL, 'esp_revision_type', NULL, NULL, '10', NULL, NULL, NULL, '0', NULL, NULL, 0, 0, 1, 0, 0, NULL, NULL, NULL, NULL, NULL, '2024-10-14 10:26:48', 'chh', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '1694631025451048961', NULL, 0, 0, '3', '1831505732815413250', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);