SELECT * from Fwa_user_info; --User
SELECT * from Fwa_role_info A; --character
SELECT * from Fwa_menu_info A; --Menu
SELECT * from Fwa_role_user; --User and Role Association
SELECT * from Fwa_role_menu; --Roles and menu associations
/**
The System User table and the role table Id_role associated with the user and Role association tables, and one user corresponds to multiple roles.
The Role table and menu table Id_role Field Management based on the Role menu table, many-to-many relationships.
*/
-----Add a menu:
--user 1:n role 1:n Menu
SELECT * from Fwa_user_info; --User
SELECT * from Fwa_role_info A; --character
SELECT * from Fwa_menu_info A; --Menu
SELECT * from Fwa_role_user; --User and Role Association
SELECT * from Fwa_role_menu; --Roles and menu associations
--character
Warn_approver_role early warning examination and approval hillock
Warn_agent_role Early Warning Analysis hillock
Warn_audit_role Pre-warning review hillock
Warn_manage_role Early warning management gang
Settlement_manage_role Settlement Management Hillock
Settlement_analysis_role Settlement Analysis Hillock
--Monitoring Analysis 1
--Monitoring Analysis report 2
--Summary Of course 3 routes, CSS names
--Hierarchical relationship of menus
SELECT * from Fwa_menu_info a where A.parent_menu = ' 0 ' for Update;--id xxx 1a2b3c
SELECT * from Fwa_menu_info a where a.parent_menu = ' 1a2b3c ' for update;--menu chart requires Guyan provide ID yyy 1a2b3c4d
SELECT * from Fwa_menu_info a where a.parent_menu = ' 1a2b3c4d ' for update;--1a2b3c4d5e
SELECT * from Fwa_user_info f where f.id_user = ' fe1efdd57ba71190e043171d190a965e '
--User and Role Association
SELECT DISTINCT *
From Fwa_user_info F, fwa_role_info A, Fwa_role_user u
where F.id_user = U.id_user
and a.id_role = U.id_role
and F.id_user = ' fe1efdd57ba71190e043171d190a965e '
--Roles and menu associations
SELECT * from Fwa_role_info R where r.id_role= ' Fde749b8c4867f54e043171d190a91a8 ';
SELECT * from Fwa_menu_info m;
SELECT * FROM Fwa_role_menu rm where rm.id_role= ' fde749b8c4867f54e043171d190a91a8 ';
SELECT * from Fwa_menu_info m where m.parent_menu= ' 1f47f2360464b146e0531580140a2f39 ';
SELECT * from Fwa_menu_info m where m.parent_menu= ' 0 ';
----Insert Monitoring Analysis 1
INSERT INTO Fwa_menu_info
(Id_menu,
Menu_name,
Menu_href,
Menu_class,
Menu_desc,
Parent_menu,
Menu_order,
Menu_status,
Created_by,
Created_date,
Updated_by,
Updated_date,
Menu_statename,
Use_basic_data)
Values
(Sys_guid (),
' Surveillance Analysis 1 ',
‘‘,
' Jkfx1 ',
' Surveillance Analysis 1 ',
' 0 ',
' 1037 ',
' Y ',
' Fwadata ',
To_date (' 01-11-2015 15:56:18 ', ' dd-mm-yyyy hh24:mi:ss '),
' Fwadata ',
To_date (' 02-11-2015 15:56:18 ', ' dd-mm-yyyy hh24:mi:ss '),
‘‘,
NULL);
-----Inserting a Monitoring Analysis report 2
INSERT INTO Fwa_menu_info
(Id_menu,
Menu_name,
Menu_href,
Menu_class,
Menu_desc,
Parent_menu,
Menu_order,
Menu_status,
Created_by,
Created_date,
Updated_by,
Updated_date,
Menu_statename,
Use_basic_data)
Values
(Sys_guid (),
' Monitoring Analysis report 2 ',
‘‘,
' Jkfxbb ',
' Monitoring Analysis report 2 ',
' 238630faef6b9483e0531480140a2f4e ',
' 1037 ',
' Y ',
' Hcpmsdata ',
To_date (' 01-11-2015 15:56:18 ', ' dd-mm-yyyy hh24:mi:ss '),
' Fwadata ',
To_date (' 02-11-2015 15:56:18 ', ' dd-mm-yyyy hh24:mi:ss '),
‘‘,
NULL);
Summary of the course of-----insertion 3
INSERT INTO Fwa_menu_info
(Id_menu,
Menu_name,
Menu_href,
Menu_class,
Menu_desc,
Parent_menu,
Menu_order,
Menu_status,
Created_by,
Created_date,
Updated_by,
Updated_date,
Menu_statename,
Use_basic_data)
Values
(Sys_guid (),
' Summary of course 3 ',
‘‘,
' Bcqkhz ',
' Summary of course 3 ',
' 238630faef6c9483e0531480140a2f4e ',
' 1037 ',
' Y ',
' Hcpmsdata ',
To_date (' 01-11-2015 15:56:18 ', ' dd-mm-yyyy hh24:mi:ss '),
' Fwadata ',
To_date (' 02-11-2015 15:56:18 ', ' dd-mm-yyyy hh24:mi:ss '),
‘‘,
NULL);
--------Insert a management relationship
INSERT INTO Fwa_role_menu
(Id_relationship,
Id_role,
Id_menu,
Relationship_status,
Created_by,
Created_date,
Updated_by,
Updated_date)
Values
(Sys_guid (),
' Fde749b8c48d7f54e043171d130a91a8 ',
' 238630faef6c9483e0531480140a2f4e ',
' Y ',
' Fwadata ',
To_date (' 01-11-2015 11:15:30 ', ' dd-mm-yyyy hh24:mi:ss '),
' Fwadata ',
To_date (' 02-11-2015 11:15:30 ', ' dd-mm-yyyy hh24:mi:ss ');
--------Create an association relationship
Warn_approver_role Early warning approval post fde749b8c48d7f54e043171d130a91a8
Warn_agent_role Early warning analysis gang fde749b8c48d7f54e043171d110a91a8
Warn_audit_role Pre-warning review hillock fde749b8c48d7f54e043171d120a91a8
Warn_manage_role Early warning management gang 2001be9552ee611ae0531480140a73ee
SELECT * from Fwa_role_info a where a.role_name = ' warn_manage_role '; --character
Settlement_manage_role Settlement Management Gang 080b04b06c3408c8e0531580140ae008
Settlement_analysis_role Settlement Analysis Gang 080b04b06c3308c8e0531580140ae008
--------level menu monitoring analysis
SELECT * from Fwa_menu_info m where m.parent_menu= ' 0 '
SELECT * from Fwa_menu_info m where m.parent_menu= ' 238630faef6b9483e0531480140a2f4e '
SELECT * from Fwa_menu_info m where m.parent_menu= ' 238630faef6c9483e0531480140a2f4e '
SELECT * from Fwa_menu_info m where m.id_menu= ' 238630faef6d9483e0531480140a2f4e '
SELECT * FROM Fwa_role_menu rm where rm.id_menu= ' 238630faef6b9483e0531480140a2f4e '
--------------
----Level Menu Integrity Management
SELECT * from Fwa_menu_info m where m.parent_menu= ' 1f47f2360464b146e0531580140a2f39 '
----Level Two menu medical staff management
SELECT * from Fwa_menu_info m where m.parent_menu= ' 1f5cae6290109293e0531580140a02e0 '
----Level Three Menu Doctor integrity registration
SELECT * from Fwa_menu_info m where m.id_menu= ' 0eb4463d709ab733e0531580140a9fee '
SELECT * FROM Fwa_role_menu rm where rm.id_menu= ' 1f47f2360464b146e0531580140a2f39 '
----------------
SELECT * from Fwa_role_info a where a.id_role= ' fde749b8c4867f54e043171d190a91a8 '; --character
Select To_date (To_char (sysdate, ' dd-mm-yyyy hh24:mi:ss '), ' dd-mm-yyyy Hh24:mi:ss ') from dual;
SELECT * FROM Fwa_role_menu
SELECT * from Fwa_menu_info m where m.parent_menu= ' 0 '
Delete from Fwa_role_menu rm where rm.id_menu= ' 238630faef6d9483e0531480140a2f4e '
The relationship between safety and health insurance Rights management