修改问题、添加监管数据报送模块
这个提交包含在:
+90
-1
@@ -1,5 +1,5 @@
|
||||
-- Fresh-install DM schema; target 8.4.4.80 Pack89.
|
||||
-- Source fingerprint: 7bfa7516946e6b5a507e14f1bb5faff0bea179ed17878151f95b8c102e5ee547
|
||||
-- Source fingerprint: 8247e55b7ab2e222036d2ba28674ee6956f95526a9ce7f71f18d1981f77802d2
|
||||
-- @statement sys_social
|
||||
CREATE TABLE sys_social (
|
||||
id bigint not null comment '主键',
|
||||
@@ -20560,3 +20560,92 @@ CREATE TRIGGER dg_ut_bc6344924fde92eb BEFORE UPDATE ON ing_original_file FOR EAC
|
||||
IF NOT UPDATING('UPDATE_TIME') THEN :NEW.update_time := LOCALTIMESTAMP; END IF;
|
||||
END;
|
||||
/
|
||||
|
||||
-- @statement dg_reporting_config
|
||||
CREATE TABLE dg_reporting_config (
|
||||
config_id VARCHAR(36 CHAR) NOT NULL,
|
||||
organization_id BIGINT NOT NULL,
|
||||
config_kind VARCHAR(16 CHAR) NOT NULL,
|
||||
config_code VARCHAR(64 CHAR) NOT NULL,
|
||||
config_name VARCHAR(160 CHAR) NOT NULL,
|
||||
parent_id VARCHAR(36 CHAR) NULL,
|
||||
root_id VARCHAR(36 CHAR) NOT NULL,
|
||||
enabled INT NOT NULL DEFAULT 0,
|
||||
state_json CLOB NOT NULL,
|
||||
credential_ref VARCHAR(512 CHAR) NULL,
|
||||
version BIGINT NOT NULL DEFAULT 0,
|
||||
command_sha256 CHAR(64 CHAR) NOT NULL,
|
||||
create_dept BIGINT NOT NULL,
|
||||
create_by BIGINT NOT NULL,
|
||||
create_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
update_by BIGINT NOT NULL,
|
||||
update_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
PRIMARY KEY (organization_id,config_id),
|
||||
CONSTRAINT ck_reporting_kind CHECK (config_kind IN ('DEPARTMENT','SYSTEM','TOPIC')),
|
||||
CONSTRAINT ck_reporting_enabled CHECK (enabled IN (0,1)),
|
||||
CONSTRAINT ck_reporting_version CHECK (version>=0)
|
||||
);
|
||||
|
||||
-- @statement dg_reporting_config
|
||||
CREATE UNIQUE INDEX uk_reporting_code ON dg_reporting_config(organization_id,config_kind,config_code);
|
||||
|
||||
-- @statement dg_reporting_config
|
||||
CREATE INDEX idx_reporting_parent ON dg_reporting_config(organization_id,parent_id,enabled);
|
||||
|
||||
-- @statement dg_reporting_config
|
||||
CREATE INDEX idx_reporting_root ON dg_reporting_config(organization_id,root_id);
|
||||
|
||||
-- @statement dg_reporting_audit
|
||||
CREATE TABLE dg_reporting_audit (
|
||||
audit_id VARCHAR(36 CHAR) NOT NULL,
|
||||
organization_id BIGINT NOT NULL,
|
||||
object_id VARCHAR(36 CHAR) NOT NULL,
|
||||
action_name VARCHAR(40 CHAR) NOT NULL,
|
||||
actor_id BIGINT NOT NULL,
|
||||
object_version BIGINT NOT NULL,
|
||||
reason VARCHAR(1000 CHAR) NULL,
|
||||
create_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
PRIMARY KEY (audit_id)
|
||||
);
|
||||
|
||||
-- @statement dg_reporting_audit
|
||||
CREATE INDEX idx_reporting_audit ON dg_reporting_audit(organization_id,object_id,create_time);
|
||||
|
||||
-- @statement dg_reporting_template
|
||||
CREATE TABLE dg_reporting_template (
|
||||
template_id VARCHAR(36 CHAR) NOT NULL,
|
||||
organization_id BIGINT NOT NULL,
|
||||
file_sha256 CHAR(64 CHAR) NOT NULL,
|
||||
record_element VARCHAR(128 CHAR) NOT NULL,
|
||||
fields_json CLOB NOT NULL,
|
||||
create_by BIGINT NOT NULL,
|
||||
create_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
PRIMARY KEY (organization_id,template_id)
|
||||
);
|
||||
|
||||
-- @statement dg_reporting_template
|
||||
CREATE UNIQUE INDEX uk_reporting_template ON dg_reporting_template(organization_id,file_sha256,record_element);
|
||||
|
||||
-- @statement dg_reporting_standard
|
||||
CREATE TABLE dg_reporting_standard (
|
||||
standard_id VARCHAR(36 CHAR) NOT NULL,
|
||||
organization_id BIGINT NOT NULL,
|
||||
standard_code VARCHAR(128 CHAR) NOT NULL,
|
||||
standard_name VARCHAR(160 CHAR) NOT NULL,
|
||||
version_label VARCHAR(64 CHAR) NOT NULL,
|
||||
standard_status VARCHAR(16 CHAR) NOT NULL,
|
||||
definition_json CLOB NOT NULL,
|
||||
difference_confirmation VARCHAR(1000 CHAR) NULL,
|
||||
command_sha256 CHAR(64 CHAR) NOT NULL,
|
||||
version BIGINT NOT NULL DEFAULT 0,
|
||||
create_by BIGINT NOT NULL,
|
||||
create_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
update_by BIGINT NOT NULL,
|
||||
update_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
PRIMARY KEY (organization_id,standard_id),
|
||||
CONSTRAINT ck_reporting_standard_status CHECK (standard_status IN ('DRAFT','PUBLISHED','DISABLED')),
|
||||
CONSTRAINT ck_reporting_standard_version CHECK (version>=0)
|
||||
);
|
||||
|
||||
-- @statement dg_reporting_standard
|
||||
CREATE UNIQUE INDEX uk_reporting_standard ON dg_reporting_standard(organization_id,standard_code,version_label);
|
||||
|
||||
+252
@@ -17178,6 +17178,222 @@
|
||||
null,
|
||||
null,
|
||||
"模型与算法知识参考库;不执行训练或推理"
|
||||
],
|
||||
[
|
||||
1761700000000000800,
|
||||
"监管数据报送",
|
||||
0,
|
||||
15,
|
||||
"/datagov-regulatory-reporting",
|
||||
"",
|
||||
"",
|
||||
"N",
|
||||
"N",
|
||||
"M",
|
||||
"0",
|
||||
"0",
|
||||
"",
|
||||
"documentation",
|
||||
"",
|
||||
"",
|
||||
1761000000000000103,
|
||||
1761100000000000001,
|
||||
"2000-01-01 00:00:00",
|
||||
null,
|
||||
null,
|
||||
"监管报送独立业务入口"
|
||||
],
|
||||
[
|
||||
1761700000000000801,
|
||||
"报送总览",
|
||||
1761700000000000800,
|
||||
1,
|
||||
"/regulatory-reporting-overview",
|
||||
"datagov/regulatory-reporting/overview/index",
|
||||
"",
|
||||
"N",
|
||||
"N",
|
||||
"C",
|
||||
"0",
|
||||
"0",
|
||||
"aixun:integration:regulatory-reporting:view",
|
||||
"dashboard",
|
||||
"",
|
||||
"",
|
||||
1761000000000000103,
|
||||
1761100000000000001,
|
||||
"2000-01-01 00:00:00",
|
||||
null,
|
||||
null,
|
||||
"当前组织真实配置统计"
|
||||
],
|
||||
[
|
||||
1761700000000000802,
|
||||
"上报部门",
|
||||
1761700000000000800,
|
||||
2,
|
||||
"/regulatory-reporting-departments",
|
||||
"datagov/regulatory-reporting/departments/index",
|
||||
"",
|
||||
"N",
|
||||
"N",
|
||||
"C",
|
||||
"0",
|
||||
"0",
|
||||
"aixun:integration:regulatory-reporting:view",
|
||||
"tree-table",
|
||||
"",
|
||||
"",
|
||||
1761000000000000103,
|
||||
1761100000000000001,
|
||||
"2000-01-01 00:00:00",
|
||||
null,
|
||||
null,
|
||||
"监管部门管理"
|
||||
],
|
||||
[
|
||||
1761700000000000803,
|
||||
"上报系统",
|
||||
1761700000000000800,
|
||||
3,
|
||||
"/regulatory-reporting-systems",
|
||||
"datagov/regulatory-reporting/systems/index",
|
||||
"",
|
||||
"N",
|
||||
"N",
|
||||
"C",
|
||||
"0",
|
||||
"0",
|
||||
"aixun:integration:regulatory-reporting:view",
|
||||
"server",
|
||||
"",
|
||||
"",
|
||||
1761000000000000103,
|
||||
1761100000000000001,
|
||||
"2000-01-01 00:00:00",
|
||||
null,
|
||||
null,
|
||||
"上报系统管理"
|
||||
],
|
||||
[
|
||||
1761700000000000804,
|
||||
"报送主题",
|
||||
1761700000000000800,
|
||||
4,
|
||||
"/regulatory-reporting-topics",
|
||||
"datagov/regulatory-reporting/topics/index",
|
||||
"",
|
||||
"N",
|
||||
"N",
|
||||
"C",
|
||||
"0",
|
||||
"0",
|
||||
"aixun:integration:regulatory-reporting:view",
|
||||
"table",
|
||||
"",
|
||||
"",
|
||||
1761000000000000103,
|
||||
1761100000000000001,
|
||||
"2000-01-01 00:00:00",
|
||||
null,
|
||||
null,
|
||||
"报送主题管理"
|
||||
],
|
||||
[
|
||||
1761700000000000805,
|
||||
"报送标准",
|
||||
1761700000000000800,
|
||||
5,
|
||||
"/regulatory-reporting-standards",
|
||||
"datagov/regulatory-reporting/standards/index",
|
||||
"",
|
||||
"N",
|
||||
"N",
|
||||
"C",
|
||||
"0",
|
||||
"0",
|
||||
"aixun:integration:regulatory-reporting:view",
|
||||
"documentation",
|
||||
"",
|
||||
"",
|
||||
1761000000000000103,
|
||||
1761100000000000001,
|
||||
"2000-01-01 00:00:00",
|
||||
null,
|
||||
null,
|
||||
"标准版本及目标模板"
|
||||
],
|
||||
[
|
||||
1761700000000000806,
|
||||
"编辑报送配置",
|
||||
1761700000000000802,
|
||||
1,
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"N",
|
||||
"N",
|
||||
"F",
|
||||
"0",
|
||||
"0",
|
||||
"aixun:integration:regulatory-reporting:edit",
|
||||
"#",
|
||||
"",
|
||||
"",
|
||||
1761000000000000103,
|
||||
1761100000000000001,
|
||||
"2000-01-01 00:00:00",
|
||||
null,
|
||||
null,
|
||||
"创建修改停用部门系统主题"
|
||||
],
|
||||
[
|
||||
1761700000000000807,
|
||||
"绑定报送凭据",
|
||||
1761700000000000803,
|
||||
1,
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"N",
|
||||
"N",
|
||||
"F",
|
||||
"0",
|
||||
"0",
|
||||
"aixun:integration:regulatory-reporting:credential",
|
||||
"#",
|
||||
"",
|
||||
"",
|
||||
1761000000000000103,
|
||||
1761100000000000001,
|
||||
"2000-01-01 00:00:00",
|
||||
null,
|
||||
null,
|
||||
"只绑定受管引用"
|
||||
],
|
||||
[
|
||||
1761700000000000808,
|
||||
"管理报送标准",
|
||||
1761700000000000805,
|
||||
1,
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"N",
|
||||
"N",
|
||||
"F",
|
||||
"0",
|
||||
"0",
|
||||
"aixun:integration:regulatory-reporting:standard",
|
||||
"#",
|
||||
"",
|
||||
"",
|
||||
1761000000000000103,
|
||||
1761100000000000001,
|
||||
"2000-01-01 00:00:00",
|
||||
null,
|
||||
null,
|
||||
"创建标准导入模板及确认发布"
|
||||
]
|
||||
]
|
||||
},
|
||||
@@ -19754,6 +19970,42 @@
|
||||
[
|
||||
1761300000000000001,
|
||||
1761400000000000108
|
||||
],
|
||||
[
|
||||
1761300000000000001,
|
||||
1761700000000000800
|
||||
],
|
||||
[
|
||||
1761300000000000001,
|
||||
1761700000000000801
|
||||
],
|
||||
[
|
||||
1761300000000000001,
|
||||
1761700000000000802
|
||||
],
|
||||
[
|
||||
1761300000000000001,
|
||||
1761700000000000803
|
||||
],
|
||||
[
|
||||
1761300000000000001,
|
||||
1761700000000000804
|
||||
],
|
||||
[
|
||||
1761300000000000001,
|
||||
1761700000000000805
|
||||
],
|
||||
[
|
||||
1761300000000000001,
|
||||
1761700000000000806
|
||||
],
|
||||
[
|
||||
1761300000000000001,
|
||||
1761700000000000807
|
||||
],
|
||||
[
|
||||
1761300000000000001,
|
||||
1761700000000000808
|
||||
]
|
||||
]
|
||||
},
|
||||
|
||||
@@ -1078,3 +1078,11 @@ migrations:
|
||||
ownerUnit: system
|
||||
path: db/migration/system/V20261112.276__combine_log_management_tabs.sql
|
||||
sha256: 3df45717e655d1ed2e5795630b09feb9a3c805236a329c497f9965643288a8f0
|
||||
- version: '20261124.277'
|
||||
ownerUnit: integration
|
||||
path: db/migration/integration/V20261124.277__create_regulatory_reporting.sql
|
||||
sha256: 6cd233f9de3e71f0d276423bccd7e9543ba5766d53ba1e23f30822b53b6d8130
|
||||
- version: '20261124.278'
|
||||
ownerUnit: system
|
||||
path: db/migration/system/V20261124.278__register_regulatory_reporting.sql
|
||||
sha256: f1a7729b7f5a082442c967e125a83c7193b6c921003679222db3d504bfed0f05
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
-- Reporting configuration is scoped to the authenticated organization. No target data is seeded.
|
||||
CREATE TABLE dg_reporting_config (
|
||||
config_id VARCHAR(36) NOT NULL,
|
||||
organization_id BIGINT NOT NULL,
|
||||
config_kind VARCHAR(16) NOT NULL,
|
||||
config_code VARCHAR(64) NOT NULL,
|
||||
config_name VARCHAR(160) NOT NULL,
|
||||
parent_id VARCHAR(36) NULL,
|
||||
root_id VARCHAR(36) NOT NULL,
|
||||
enabled INT NOT NULL DEFAULT 0,
|
||||
state_json LONGTEXT NOT NULL,
|
||||
credential_ref VARCHAR(512) NULL,
|
||||
version BIGINT NOT NULL DEFAULT 0,
|
||||
command_sha256 CHAR(64) NOT NULL,
|
||||
create_dept BIGINT NOT NULL,
|
||||
create_by BIGINT NOT NULL,
|
||||
create_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
update_by BIGINT NOT NULL,
|
||||
update_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
PRIMARY KEY (organization_id,config_id),
|
||||
UNIQUE KEY uk_reporting_code (organization_id,config_kind,config_code),
|
||||
KEY idx_reporting_parent (organization_id,parent_id,enabled),
|
||||
KEY idx_reporting_root (organization_id,root_id),
|
||||
CONSTRAINT ck_reporting_kind CHECK (config_kind IN ('DEPARTMENT','SYSTEM','TOPIC')),
|
||||
CONSTRAINT ck_reporting_enabled CHECK (enabled IN (0,1)),
|
||||
CONSTRAINT ck_reporting_version CHECK (version>=0)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
||||
|
||||
CREATE TABLE dg_reporting_audit (
|
||||
audit_id VARCHAR(36) NOT NULL,
|
||||
organization_id BIGINT NOT NULL,
|
||||
object_id VARCHAR(36) NOT NULL,
|
||||
action_name VARCHAR(40) NOT NULL,
|
||||
actor_id BIGINT NOT NULL,
|
||||
object_version BIGINT NOT NULL,
|
||||
reason VARCHAR(1000) NULL,
|
||||
create_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
PRIMARY KEY (audit_id),
|
||||
KEY idx_reporting_audit (organization_id,object_id,create_time)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
||||
|
||||
CREATE TABLE dg_reporting_template (
|
||||
template_id VARCHAR(36) NOT NULL,
|
||||
organization_id BIGINT NOT NULL,
|
||||
file_sha256 CHAR(64) NOT NULL,
|
||||
record_element VARCHAR(128) NOT NULL,
|
||||
fields_json LONGTEXT NOT NULL,
|
||||
create_by BIGINT NOT NULL,
|
||||
create_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
PRIMARY KEY (organization_id,template_id),
|
||||
UNIQUE KEY uk_reporting_template (organization_id,file_sha256,record_element)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
||||
|
||||
CREATE TABLE dg_reporting_standard (
|
||||
standard_id VARCHAR(36) NOT NULL,
|
||||
organization_id BIGINT NOT NULL,
|
||||
standard_code VARCHAR(128) NOT NULL,
|
||||
standard_name VARCHAR(160) NOT NULL,
|
||||
version_label VARCHAR(64) NOT NULL,
|
||||
standard_status VARCHAR(16) NOT NULL,
|
||||
definition_json LONGTEXT NOT NULL,
|
||||
difference_confirmation VARCHAR(1000) NULL,
|
||||
command_sha256 CHAR(64) NOT NULL,
|
||||
version BIGINT NOT NULL DEFAULT 0,
|
||||
create_by BIGINT NOT NULL,
|
||||
create_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
update_by BIGINT NOT NULL,
|
||||
update_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
PRIMARY KEY (organization_id,standard_id),
|
||||
UNIQUE KEY uk_reporting_standard (organization_id,standard_code,version_label),
|
||||
CONSTRAINT ck_reporting_standard_status CHECK (standard_status IN ('DRAFT','PUBLISHED','DISABLED')),
|
||||
CONSTRAINT ck_reporting_standard_version CHECK (version>=0)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
||||
@@ -0,0 +1,23 @@
|
||||
-- Independent navigation; only the existing DataGov superadmin receives initial privileges.
|
||||
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
||||
START TRANSACTION;
|
||||
CREATE TEMPORARY TABLE tmp_reporting278_guard(id INT PRIMARY KEY);
|
||||
INSERT INTO tmp_reporting278_guard VALUES(1);
|
||||
INSERT INTO tmp_reporting278_guard SELECT 1 WHERE
|
||||
(SELECT COUNT(*) FROM sys_role WHERE role_id=1761300000000000001 AND role_key='superadmin' AND status='0' AND del_flag='0')<>1
|
||||
OR EXISTS(SELECT 1 FROM sys_menu WHERE menu_id BETWEEN 1761700000000000800 AND 1761700000000000808)
|
||||
OR EXISTS(SELECT 1 FROM sys_menu WHERE path='/datagov-regulatory-reporting' OR perms LIKE 'aixun:integration:regulatory-reporting:%');
|
||||
INSERT INTO sys_menu(menu_id,menu_name,parent_id,order_num,path,component,query_param,is_frame,is_cache,menu_type,visible,status,perms,icon,active_menu,ext,create_dept,create_by,create_time,remark) VALUES
|
||||
(1761700000000000800,'监管数据报送',0,15,'/datagov-regulatory-reporting','','','N','N','M','0','0','','documentation','','',1761000000000000103,1761100000000000001,NOW(),'监管报送独立业务入口'),
|
||||
(1761700000000000801,'报送总览',1761700000000000800,1,'/regulatory-reporting-overview','datagov/regulatory-reporting/overview/index','','N','N','C','0','0','aixun:integration:regulatory-reporting:view','dashboard','','',1761000000000000103,1761100000000000001,NOW(),'当前组织真实配置统计'),
|
||||
(1761700000000000802,'上报部门',1761700000000000800,2,'/regulatory-reporting-departments','datagov/regulatory-reporting/departments/index','','N','N','C','0','0','aixun:integration:regulatory-reporting:view','tree-table','','',1761000000000000103,1761100000000000001,NOW(),'监管部门管理'),
|
||||
(1761700000000000803,'上报系统',1761700000000000800,3,'/regulatory-reporting-systems','datagov/regulatory-reporting/systems/index','','N','N','C','0','0','aixun:integration:regulatory-reporting:view','server','','',1761000000000000103,1761100000000000001,NOW(),'上报系统管理'),
|
||||
(1761700000000000804,'报送主题',1761700000000000800,4,'/regulatory-reporting-topics','datagov/regulatory-reporting/topics/index','','N','N','C','0','0','aixun:integration:regulatory-reporting:view','table','','',1761000000000000103,1761100000000000001,NOW(),'报送主题管理'),
|
||||
(1761700000000000805,'报送标准',1761700000000000800,5,'/regulatory-reporting-standards','datagov/regulatory-reporting/standards/index','','N','N','C','0','0','aixun:integration:regulatory-reporting:view','documentation','','',1761000000000000103,1761100000000000001,NOW(),'标准版本及目标模板'),
|
||||
(1761700000000000806,'编辑报送配置',1761700000000000802,1,'','','','N','N','F','0','0','aixun:integration:regulatory-reporting:edit','#','','',1761000000000000103,1761100000000000001,NOW(),'创建修改停用部门系统主题'),
|
||||
(1761700000000000807,'绑定报送凭据',1761700000000000803,1,'','','','N','N','F','0','0','aixun:integration:regulatory-reporting:credential','#','','',1761000000000000103,1761100000000000001,NOW(),'只绑定受管引用'),
|
||||
(1761700000000000808,'管理报送标准',1761700000000000805,1,'','','','N','N','F','0','0','aixun:integration:regulatory-reporting:standard','#','','',1761000000000000103,1761100000000000001,NOW(),'创建标准导入模板及确认发布');
|
||||
INSERT INTO sys_role_menu(role_id,menu_id)
|
||||
SELECT 1761300000000000001,menu_id FROM sys_menu WHERE menu_id BETWEEN 1761700000000000800 AND 1761700000000000808;
|
||||
COMMIT;
|
||||
DROP TEMPORARY TABLE tmp_reporting278_guard;
|
||||
在新工单中引用
屏蔽一个用户