Browse Source

完善日志管理生成操作日志记录接口

songxinlu 3 years ago
parent
commit
f6c4587c2a

+ 96 - 1
doc/048.20220506_v2.7.0_通用版_操作日志/qc_init_v2.7.0_通用版_操作日志.sql

@@ -4,6 +4,7 @@ use `qc`;
 -- 操作日志相关配置
 -- 注意
 
+SET @hospitalId =4;
 
 /**
 sys_login_log 系统登录日志表
@@ -62,4 +63,98 @@ sys_menu 添加操作日志相关菜单
 
 INSERT INTO `sys_menu` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `parent_id`, `code`, `show_status`, `maintain_status`, `order_no`, `remark`) VALUES ('130', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '日志管理', '-1', 'YH-RZGL', '1', '1', '17', '用户-日志管理');
 INSERT INTO `sys_menu` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `parent_id`, `code`, `show_status`, `maintain_status`, `order_no`, `remark`) VALUES ('131', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '操作日志', '130', 'YH-RZGL-CZRZ', '1', '1', '1', '用户-日志管理-操作日志');
-INSERT INTO `sys_menu` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `parent_id`, `code`, `show_status`, `maintain_status`, `order_no`, `remark`) VALUES ('132', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '登录日志', '130', 'YH-RZGL-DLRZ', '1', '1', '1', '用户-日志管理-登录日志');
+INSERT INTO `sys_menu` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `parent_id`, `code`, `show_status`, `maintain_status`, `order_no`, `remark`) VALUES ('132', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '登录日志', '130', 'YH-RZGL-DLRZ', '1', '1', '2', '用户-日志管理-登录日志');
+
+
+/**
+sys_role_menu 超级管理员添加操作日志想哥菜单
+ */
+INSERT INTO `sys_role_menu` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '130', '用户-日志管理');
+INSERT INTO `sys_role_menu` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '131', '用户-日志管理-操作日志');
+INSERT INTO `sys_role_menu` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '132', '用户-日志管理-登录日志');
+
+
+
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '修改模块分值', '/qc/cases/saveQcCases', '修改#name模块分值为#score_new分', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '修改条目提示信息', '/qc/casesEntryHospital/updataQcCasesEntry', '修改#name条目提示信息为#msg_new', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/medicalCheckExport', '导出{\"0\":\"运行病历稽查表\",\"1\":\"终末病历稽查表\",\"key\":\"isPlacefile\"}', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '禁用用户', '/sys/user/disable', '修改#linkman用户状态为禁用', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '启用用户', '/sys/user/enable', '修改#linkman用户状态为启用', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '修改条目提示信息', '/qc/casesEntryHospital/updataQcCasesEntry', '修改#name条目分值为#score_new分', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '修改条目提示信息', '/qc/casesEntryHospital/updataQcCasesEntry', '修改#name条目类型为#isReject_new', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '修改条目提示信息', '/qc/casesEntryHospital/updataQcCasesEntry', '修改#name条目启用状态为#isUsed_new', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '新增质控类型', '/qc/qcType/add', '新增#name质控类型', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '修改质控类型', '/qc/qcType/update', '修改#name质控类型', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '复制质控类型', '/qc/qcType/copy', '复制#name质控类型', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '删除质控类型', '/qc/qcType/delete', '删除#name质控类型', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '修改角色权限', '/sys/role/saveRoleMenu', '修改#name角色权限', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '修改用户角色', '/sys/user/editUserRoles', '修改#linkman所属角色为#roles', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '质控评分', '/qc/behospitalInfo/analyze', '人工手动评分', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/homePageLevelExport', '导出病案首页合格率占比', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/homePageLevelXYExport', '导出病案首页合格率占比', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/entryGroupByEntryExport', '导出条目缺陷占比', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/levelExport', '导出各科室缺陷占比', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/levelExport_TZ', '导出各科室缺陷占比-台州', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/getAverageDayNumExport', '导出按科室统计平均住院天数', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/getAverageFeeExport', '导出按科室统计平均住院费用', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/levelPercentGroupByDeptExport', '导出各科室甲级病历占比排行', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/entryCountGroupByEntryExport', '导出缺陷详情', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/entryCountGroupXYByEntryExport', '导出缺陷详情', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/entryCountGroupByCaseExport', '导出缺陷详情', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/entryStatisticsExport', '导出关键条目缺陷占比统计', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/qcResultShortPageExport', '导出缺陷详情质控评分页', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/qcResultShortXYPageExport', '导出缺陷详情质控评分页', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/leaveHosMrPageExport', '导出出院人数统计', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/qcCheckStatisticsExport', '导出质控核查统计', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/unModifyMRPageExport', '导出未整改病历详情页', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/medicalCheckInnerExport', '导出未整改病历详情页', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/unModifyMRStatisticsExport', '导出未整改病历统计', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/reHos31DaysPageExport', '导出31天再入院统计详情', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/hmImproveMRPageExport', '导出病案首页改善率评分病历导出', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/qcCheckMRPageExport', '导出质控核查病历导出', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/qualityControlExport', '导出病历质控报表详情页', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/print/export/homePageLevelExportByDept', '导出病案首页合格率占比', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/print/export/homePageLevelXYExportByDept', '导出病案首页合格率占比', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/print/export/entryCountGroupXYByExportDept', '导出缺陷详情', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/print/export/qcResultShortXYPageExportDept', '导出缺陷详情质控评分页', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/print/export/entryGroupExportByDeptPage', '导出缺陷详情', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/print/export/entryGroupExportByDeptCase', '导出各模块缺陷详情', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/print/export/entryGroupExportByDeptEntry', '导出条目缺陷占比详情', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/print/export/qcResultShortExportByDeptPage', '导出缺陷详情质控评分', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/print/export/levelExportByDept', '导出各科室缺陷占比-科室', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/print/export/entryStatisticsExportByDept', '导出关键条目缺陷占比统计导出', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/print/export/leaveHosMrPageExportByDept', '导出出院人数统计', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/print/export/qcCheckStaExportByDept', '导出质控核查统计', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/print/export/qcCheckMRPageExportByDept', '导出质控核查质控评分详情', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/print/export/improveMRExportByDept', '导出病案首页改善率质控评分详情', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/print/export/reHos31DaysPageExportByDept', '导出31天再入院统计详情', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/print/export/unModifyMRSExportByDept', '导出未整改病历统计', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/print/export/unModifyMRPageExportByDept', '导出未整改病历详情页', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/print/export/qualityControlExportByDept', '导出病历质控报表', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/qc/behospitalInfo/exportExcel', '导出mrqc', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/qc/behospitalInfo/exportQcresult', '导出抽查住院病历质量情况', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/qc/behospitalInfo/exportQcresultByDept', '导出抽查住院病历质量情况', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/qc/behospitalInfo/exportQcresultByPerson', '导出抽查住院病历质量情况', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/qc/behospitalInfo/exportQcresultByGroup', '导出抽查住院病历质量情况', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/qc/analysisDept/getEntryDefectImproveByDeptExport', '导出条目缺陷改善统计(科室)', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/qc/analysisDept/getDefectImproveInnerByDeptExport', '导出条目缺陷改善统计病历列表', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/qc/analysis/getQcClickByExport', '导出临床质控使用统计', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/qc/analysis/getQcClickInnerPageByExport', '导出临床质控使用统计内页', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/qc/analysis/getEntryDefectImproveByExport', '导出条目缺陷改善统计', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/qc/analysis/getDefectImproveInnerByExport', '导出条目缺陷改善统计病历列表', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/consoleByDoctor/doctorAverageStatisticsExport', '导出医生质控平均分', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/consoleByDoctor/doctorAverageLevelExport', '导出抽查住院病历质量情况', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/consoleByDoctor/getDoctorDetailPageExport', '导出医生缺陷列表', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/consoleByDoctor/getDetailRecordListPageExport', '导出缺陷病历信息', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/qc/appealExamineInfo/getComplaintRecordExport', '导出申诉记录', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/qc/appealExamineInfo/getAppealReviewExport', '导出申诉审核', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/print/export/badQualifiedLevelPageXYExportByDept', '导出病案首页合格数病历详情页', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/print/export/badUnQualifiedLevelPageXYExportByDept', '导出病案首页不合格数病历详情页', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/print/export/homeQualifiedPageOrLevelExportByDept', '导出病案首页合格数病历详情页', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/print/export/homeUnQualifiedPageOrLevelExportByDept', '导出病案首页不合格数病历详情页', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/badQualifiedLevelPagePageExport', '导出病案首页合格数病历详情页', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/badUnQualifiedLevelPagePageExport', '导出病案首页不合格数病历详情页', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '修改用户科室', '/sys/user/editUserDepts', '修改#linkman所属科室为#depts', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/badQualifiedLevelPageXYExport', '导出病案首页合格数病历详情页', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/console/export/badUnQualifiedLevelPageXYExport', '导出病案首页不合格数病历详情页', 'operationLog');
+INSERT INTO `sys_hospital_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalId, '导出', '/print/export/medicalCheckExportByDept', '导出{\"0\":\"运行病历稽查表\",\"1\":\"终末病历稽查表\",\"key\":\"isPlacefile\"}', 'operationLog');

+ 70 - 10
src/main/java/com/diagbot/aop/LogAspect.java

@@ -10,11 +10,14 @@ import com.diagbot.dto.QcCasesEntryHospitalDTO;
 import com.diagbot.dto.SysLoginLogDTO;
 import com.diagbot.dto.SysOperationLogDTO;
 import com.diagbot.dto.SysRoleDTO;
+import com.diagbot.dto.SysUserDeptDTO;
+import com.diagbot.entity.BasDeptInfo;
 import com.diagbot.entity.QcType;
 import com.diagbot.dto.SysUserRoleDTO;
 import com.diagbot.entity.SysHospitalSet;
 import com.diagbot.entity.SysRole;
 import com.diagbot.entity.SysUser;
+import com.diagbot.entity.SysUserDept;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.facade.LoginLogFacade;
@@ -31,6 +34,7 @@ import com.diagbot.vo.QcCasesEntryUpdataVO;
 import com.diagbot.vo.QcCasesSaveListVO;
 import com.diagbot.vo.SysRoleMenuSaveVO;
 import com.diagbot.vo.SysUserBaseVO;
+import com.diagbot.vo.SysUserDeptVO;
 import com.diagbot.vo.SysUserRoleVO;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import eu.bitwalker.useragentutils.UserAgent;
@@ -204,6 +208,25 @@ public class LogAspect {
                 value = value.replaceAll(key, outMap.get(key) + "");
             }
         }
+        //对通过入参的值为key获取value[针对统一url,根据入参的值不同,替换的内容也不同,把这些内容拼接到模板value中{"入参值1":"拼接结果1","入参值2":"拼接结果2","key":"入参名称"}]
+        try {
+            value = transformModeValue(value, outMap);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+        return value;
+    }
+
+    private String transformModeValue(String value, Map<String, Object> outMap) {
+        while (value.contains("{") && value.contains("}")) {
+            String strParam = value.substring(value.indexOf("{"), value.indexOf("}")+1);
+            JSONObject paramJSON = JSONObject.parseObject(strParam);
+            String temp = paramJSON.getString(outMap.get("#"+paramJSON.getString("key"))+"");
+            if(temp == null){
+                temp = "";
+            }
+            value = StringUtils.replace(value,strParam,temp);
+        }
         return value;
     }
 
@@ -368,25 +391,59 @@ public class LogAspect {
                             SysUserRoleDTO sysUserRoleDTO = operationLogFacade.editUserRoles(sysUserRoleVO.getUserId());
                             SysUser sysUser = operationLogFacade.getSysUser(sysUserRoleVO.getUserId());
                             compareTwoClass(sysUser, sysUserRoleVO.getUserId(), outMap);
-                            if(ListUtil.isNotEmpty(sysUserRoleDTO.getSelRoles())){
-                                if(ListUtil.isNotEmpty(sysUserRoleVO.getRoleIds())){
+                            if (ListUtil.isNotEmpty(sysUserRoleDTO.getSelRoles())) {
+                                if (ListUtil.isNotEmpty(sysUserRoleVO.getRoleIds())) {
                                     List<Long> oldRoleIds = sysUserRoleDTO.getSelRoles().stream().map(SysRoleDTO::getId).collect(Collectors.toList());
                                     List<Long> temp = new ArrayList<>(sysUserRoleVO.getRoleIds());
                                     temp.removeAll(oldRoleIds);
-                                    if(ListUtil.isNotEmpty(temp)){//角色被改动
+                                    if (ListUtil.isNotEmpty(temp)) {//角色被改动
+                                        List<SysRole> roles = operationLogFacade.getSysUserRoles(sysUserRoleVO.getRoleIds());
+                                        outMap.put("#roles", roles.stream().map(SysRole::getName).collect(Collectors.joining(",")));
+                                    } else if (sysUserRoleVO.getRoleIds().size() != oldRoleIds.size()) {//两次角色不一致
                                         List<SysRole> roles = operationLogFacade.getSysUserRoles(sysUserRoleVO.getRoleIds());
-                                        outMap.put("#roles",roles.stream().map(SysRole::getName).collect(Collectors.joining(",")));
+                                        outMap.put("#roles", roles.stream().map(SysRole::getName).collect(Collectors.joining(",")));
                                     }
-                                }else {
-                                    outMap.put("#roles","空");
+                                } else {
+                                    outMap.put("#roles", "空");
                                 }
-                            }else {
-                                if(ListUtil.isNotEmpty(sysUserRoleVO.getRoleIds())){//角色被改动
+                            } else {
+                                if (ListUtil.isNotEmpty(sysUserRoleVO.getRoleIds())) {//角色被改动
                                     List<SysRole> roles = operationLogFacade.getSysUserRoles(sysUserRoleVO.getRoleIds());
-                                    outMap.put("#roles",roles.stream().map(SysRole::getName).collect(Collectors.joining(",")));
+                                    outMap.put("#roles", roles.stream().map(SysRole::getName).collect(Collectors.joining(",")));
+                                }
+                            }
+                        }
+                    }
+                    break;
+                case "/sys/user/editUserDepts"://修改用户科室
+                    if (null != args && args.length >= 0) {
+                        //通过id获取角色信息
+                        if (args[0] instanceof SysUserDeptVO) {
+                            SysUserDeptVO sysUserDeptVO = (SysUserDeptVO) args[0];
+                            //获取用户现在的科室信息
+                            List<String> oldDeptIds = operationLogFacade.getUserDept(sysUserDeptVO.getUserId());
+                            SysUser sysUser = operationLogFacade.getSysUser(sysUserDeptVO.getUserId());
+                            compareTwoClass(sysUser, sysUserDeptVO.getUserId(), outMap);
+                            if (ListUtil.isNotEmpty(oldDeptIds)) {
+                                if (ListUtil.isNotEmpty(sysUserDeptVO.getDeptIds())) {
+                                    List<String> temp = new ArrayList<>(sysUserDeptVO.getDeptIds());
+                                    temp.removeAll(oldDeptIds);
+                                    if (ListUtil.isNotEmpty(temp)) {//科室被改动
+                                        List<BasDeptInfo> deptInfos = operationLogFacade.getSysDepts(sysUserDeptVO.getDeptIds());
+                                        outMap.put("#depts", deptInfos.stream().map(BasDeptInfo::getDeptName).collect(Collectors.joining(",")));
+                                    } else if (sysUserDeptVO.getDeptIds().size() != oldDeptIds.size()) {//两次科室不一致
+                                        List<BasDeptInfo> deptInfos = operationLogFacade.getSysDepts(sysUserDeptVO.getDeptIds());
+                                        outMap.put("#depts", deptInfos.stream().map(BasDeptInfo::getDeptName).collect(Collectors.joining(",")));
+                                    }
+                                } else {
+                                    outMap.put("#depts", "空");
+                                }
+                            } else {
+                                if (ListUtil.isNotEmpty(sysUserDeptVO.getDeptIds())) {//科室被改动
+                                    List<BasDeptInfo> deptInfos = operationLogFacade.getSysDepts(sysUserDeptVO.getDeptIds());
+                                    outMap.put("#depts", deptInfos.stream().map(BasDeptInfo::getDeptName).collect(Collectors.joining(",")));
                                 }
                             }
-                            compareTwoClass(sysUserRoleDTO, sysUserRoleVO, outMap);
                         }
                     }
                     break;
@@ -429,6 +486,9 @@ public class LogAspect {
                     }
                     break;
                 default:
+                    if (null != args && args.length >= 0) {
+                        compareTwoClass(args[0], new Object(), outMap);
+                    }
                     break;
             }
         } catch (Exception e) {

+ 22 - 0
src/main/java/com/diagbot/facade/OperationLogFacade.java

@@ -5,10 +5,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.dto.QcCasesDTO;
 import com.diagbot.dto.QcCasesEntryHospitalDTO;
 import com.diagbot.dto.SysOperationLogDTO;
+import com.diagbot.entity.BasDeptInfo;
 import com.diagbot.entity.QcType;
 import com.diagbot.dto.SysUserRoleDTO;
 import com.diagbot.entity.SysRole;
 import com.diagbot.entity.SysUser;
+import com.diagbot.entity.SysUserDept;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.service.impl.SysOperationLogServiceImpl;
 import com.diagbot.util.SysUserUtils;
@@ -18,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import java.util.List;
+import java.util.stream.Collectors;
 
 
 /**
@@ -36,6 +39,10 @@ public class OperationLogFacade extends SysOperationLogServiceImpl {
 
     @Autowired
     SysUserFacade sysUserFacade;
+    @Autowired
+    SysUserDeptFacade sysUserDeptFacade;
+    @Autowired
+    BasDeptInfoFacade basDeptInfoFacade;
 
     @Autowired
     SysRoleFacade sysRoleFacade;
@@ -77,4 +84,19 @@ public class OperationLogFacade extends SysOperationLogServiceImpl {
     public List<SysRole> getSysUserRoles(List<Long> roleIds) {
         return sysRoleFacade.list(new QueryWrapper<SysRole>().in("id",roleIds).eq("is_deleted", IsDeleteEnum.N.getKey()));
     }
+
+    public List<String> getUserDept(Long userId) {
+        return sysUserDeptFacade.list(new QueryWrapper<SysUserDept>()
+                .eq("user_id",userId)
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id",SysUserUtils.getCurrentHospitalID())
+        ).stream().map(SysUserDept::getDeptId).collect(Collectors.toList());
+    }
+
+    public List<BasDeptInfo> getSysDepts(List<String> deptIds) {
+        return basDeptInfoFacade.list(new QueryWrapper<BasDeptInfo>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id",SysUserUtils.getCurrentHospitalID())
+                .in("dept_id",deptIds));
+    }
 }