Procházet zdrojové kódy

Merge branch 'dev/20200426_2nd' into test

gaodm před 5 roky
rodič
revize
7cf79ece94
100 změnil soubory, kde provedl 4505 přidání a 328 odebrání
  1. 433 0
      doc/002.20200426第二版/qc_init.sql
  2. 1 1
      src/main/java/com/diagbot/config/MybatisPlusConfigurer.java
  3. 2 1
      src/main/java/com/diagbot/config/ResourceServerConfigurer.java
  4. 2 1
      src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
  5. 23 0
      src/main/java/com/diagbot/dto/BasDeptInfoDTO.java
  6. 3 0
      src/main/java/com/diagbot/dto/BehospitalInfoDTO.java
  7. 29 0
      src/main/java/com/diagbot/dto/GetModuleInfoOneDTO.java
  8. 3 1
      src/main/java/com/diagbot/dto/MsgDTO.java
  9. 32 0
      src/main/java/com/diagbot/dto/QcModuleDetailDTO.java
  10. 33 0
      src/main/java/com/diagbot/dto/QuestionDTO.java
  11. 17 0
      src/main/java/com/diagbot/dto/QuestionEntryDTO.java
  12. 21 0
      src/main/java/com/diagbot/dto/SysMenuPermissionDTO.java
  13. 18 0
      src/main/java/com/diagbot/dto/SysPermissionDTO.java
  14. 55 0
      src/main/java/com/diagbot/dto/SysRoleDTO.java
  15. 24 0
      src/main/java/com/diagbot/dto/SysRoleMenuDTO.java
  16. 19 0
      src/main/java/com/diagbot/dto/SysUserDeptDTO.java
  17. 33 0
      src/main/java/com/diagbot/dto/SysUserPermissionDTO.java
  18. 27 0
      src/main/java/com/diagbot/dto/SysUserQueryDTO.java
  19. 19 0
      src/main/java/com/diagbot/dto/SysUserRoleDTO.java
  20. 177 0
      src/main/java/com/diagbot/entity/BasDeptInfo.java
  21. 275 3
      src/main/java/com/diagbot/entity/BehospitalInfo.java
  22. 78 0
      src/main/java/com/diagbot/entity/QcModuleDetail.java
  23. 73 0
      src/main/java/com/diagbot/entity/QcModuleInfo.java
  24. 118 0
      src/main/java/com/diagbot/entity/QcQuestionInfo.java
  25. 73 0
      src/main/java/com/diagbot/entity/QcQuestionMapping.java
  26. 7 140
      src/main/java/com/diagbot/entity/QcresultDetail.java
  27. 15 104
      src/main/java/com/diagbot/entity/SysMenu.java
  28. 12 14
      src/main/java/com/diagbot/entity/SysPermission.java
  29. 185 0
      src/main/java/com/diagbot/entity/SysRole.java
  30. 153 0
      src/main/java/com/diagbot/entity/SysRoleMenu.java
  31. 153 0
      src/main/java/com/diagbot/entity/SysRolePermission.java
  32. 27 17
      src/main/java/com/diagbot/entity/SysTaskCron.java
  33. 35 12
      src/main/java/com/diagbot/entity/SysUser.java
  34. 167 0
      src/main/java/com/diagbot/entity/SysUserDept.java
  35. 153 0
      src/main/java/com/diagbot/entity/SysUserHospital.java
  36. 153 0
      src/main/java/com/diagbot/entity/SysUserRole.java
  37. 21 0
      src/main/java/com/diagbot/entity/wrapper/QuestionInfoWrapper.java
  38. 42 0
      src/main/java/com/diagbot/entity/wrapper/QuestionMappingWrapper.java
  39. 35 0
      src/main/java/com/diagbot/entity/wrapper/QuestionWrapper.java
  40. 2 1
      src/main/java/com/diagbot/entity/wrapper/SysMenuWrapper.java
  41. 50 0
      src/main/java/com/diagbot/enums/StatusEnum.java
  42. 44 0
      src/main/java/com/diagbot/facade/BasDeptInfoFacade.java
  43. 105 18
      src/main/java/com/diagbot/facade/BehospitalInfoFacade.java
  44. 4 4
      src/main/java/com/diagbot/facade/ConsoleFacade.java
  45. 14 0
      src/main/java/com/diagbot/facade/QcModuleDetailFacade.java
  46. 103 0
      src/main/java/com/diagbot/facade/QcModuleInfoFacade.java
  47. 117 0
      src/main/java/com/diagbot/facade/QcQuestionFacade.java
  48. 14 0
      src/main/java/com/diagbot/facade/QcQuestionMappingFacade.java
  49. 15 0
      src/main/java/com/diagbot/facade/QuestionVO.java
  50. 206 0
      src/main/java/com/diagbot/facade/SysRoleFacade.java
  51. 13 0
      src/main/java/com/diagbot/facade/SysUserDeptFacade.java
  52. 296 4
      src/main/java/com/diagbot/facade/SysUserFacade.java
  53. 13 0
      src/main/java/com/diagbot/facade/SysUserHospitalFacade.java
  54. 13 0
      src/main/java/com/diagbot/facade/SysUserRoleFacade.java
  55. 22 0
      src/main/java/com/diagbot/mapper/BasDeptInfoMapper.java
  56. 4 0
      src/main/java/com/diagbot/mapper/BehospitalInfoMapper.java
  57. 16 0
      src/main/java/com/diagbot/mapper/QcModuleDetailMapper.java
  58. 19 0
      src/main/java/com/diagbot/mapper/QcModuleInfoMapper.java
  59. 25 0
      src/main/java/com/diagbot/mapper/QcQuestionInfoMapper.java
  60. 16 0
      src/main/java/com/diagbot/mapper/QcQuestionMappingMapper.java
  61. 3 0
      src/main/java/com/diagbot/mapper/SysMenuMapper.java
  62. 21 0
      src/main/java/com/diagbot/mapper/SysRoleMapper.java
  63. 16 0
      src/main/java/com/diagbot/mapper/SysRoleMenuMapper.java
  64. 16 0
      src/main/java/com/diagbot/mapper/SysRolePermissionMapper.java
  65. 16 0
      src/main/java/com/diagbot/mapper/SysUserDeptMapper.java
  66. 16 0
      src/main/java/com/diagbot/mapper/SysUserHospitalMapper.java
  67. 5 2
      src/main/java/com/diagbot/mapper/SysUserMapper.java
  68. 16 0
      src/main/java/com/diagbot/mapper/SysUserRoleMapper.java
  69. 22 0
      src/main/java/com/diagbot/service/BasDeptInfoService.java
  70. 3 0
      src/main/java/com/diagbot/service/BehospitalInfoService.java
  71. 16 0
      src/main/java/com/diagbot/service/QcModuleDetailService.java
  72. 19 0
      src/main/java/com/diagbot/service/QcModuleInfoService.java
  73. 30 0
      src/main/java/com/diagbot/service/QcQuestionInfoService.java
  74. 16 0
      src/main/java/com/diagbot/service/QcQuestionMappingService.java
  75. 3 0
      src/main/java/com/diagbot/service/SysMenuService.java
  76. 16 0
      src/main/java/com/diagbot/service/SysRoleMenuService.java
  77. 16 0
      src/main/java/com/diagbot/service/SysRolePermissionService.java
  78. 20 0
      src/main/java/com/diagbot/service/SysRoleService.java
  79. 12 1
      src/main/java/com/diagbot/service/SysTokenService.java
  80. 16 0
      src/main/java/com/diagbot/service/SysUserDeptService.java
  81. 16 0
      src/main/java/com/diagbot/service/SysUserHospitalService.java
  82. 16 0
      src/main/java/com/diagbot/service/SysUserRoleService.java
  83. 4 1
      src/main/java/com/diagbot/service/SysUserService.java
  84. 33 0
      src/main/java/com/diagbot/service/impl/BasDeptInfoServiceImpl.java
  85. 9 0
      src/main/java/com/diagbot/service/impl/BehospitalInfoServiceImpl.java
  86. 22 0
      src/main/java/com/diagbot/service/impl/QcModuleDetailServiceImpl.java
  87. 26 0
      src/main/java/com/diagbot/service/impl/QcModuleInfoServiceImpl.java
  88. 34 0
      src/main/java/com/diagbot/service/impl/QcQuestionInfoServiceImpl.java
  89. 22 0
      src/main/java/com/diagbot/service/impl/QcQuestionMappingServiceImpl.java
  90. 6 0
      src/main/java/com/diagbot/service/impl/SysMenuServiceImpl.java
  91. 20 0
      src/main/java/com/diagbot/service/impl/SysRoleMenuServiceImpl.java
  92. 20 0
      src/main/java/com/diagbot/service/impl/SysRolePermissionServiceImpl.java
  93. 27 0
      src/main/java/com/diagbot/service/impl/SysRoleServiceImpl.java
  94. 26 0
      src/main/java/com/diagbot/service/impl/SysTokenServiceImpl.java
  95. 20 0
      src/main/java/com/diagbot/service/impl/SysUserDeptServiceImpl.java
  96. 20 0
      src/main/java/com/diagbot/service/impl/SysUserHospitalServiceImpl.java
  97. 20 0
      src/main/java/com/diagbot/service/impl/SysUserRoleServiceImpl.java
  98. 8 2
      src/main/java/com/diagbot/service/impl/SysUserServiceImpl.java
  99. 1 1
      src/main/java/com/diagbot/util/EncrypDES.java
  100. 0 0
      src/main/java/com/diagbot/vo/BasDeptInfoVO.java

+ 433 - 0
doc/002.20200426第二版/qc_init.sql

@@ -0,0 +1,433 @@
+use `qc`;
+
+ALTER TABLE `med_behospital_info` MODIFY COLUMN `doctor_id` varchar(16) DEFAULT NULL COMMENT '医生ID' AFTER `diagnose`;
+
+ALTER TABLE `sys_menu` ADD  COLUMN `show_status` int(11) NOT NULL DEFAULT '0' COMMENT '是否在右侧菜单显示(0:不显示,1:显示)' AFTER `code`;
+ALTER TABLE `sys_menu` ADD  COLUMN `maintain_status` int(11) NOT NULL DEFAULT '0' COMMENT '是否可以维护(0:不可维护,1:可以维护)' AFTER `show_status`;
+
+ALTER TABLE `sys_permission` ADD  COLUMN `code` varchar(10) NOT NULL DEFAULT '' COMMENT '资源编码' AFTER `name`;
+
+ALTER TABLE `sys_user` ADD  COLUMN `status` int(11) NOT NULL DEFAULT '1' COMMENT '是否启用(0:停用,1:启用)' AFTER `linkman`;
+
+alter table `med_qcresult_detail` add  column `info` varchar(500) DEFAULT '' COMMENT '质控返回提示信息' AFTER `msg`;
+ALTER TABLE `med_behospital_info` MODIFY COLUMN `doctor_id` varchar(16) DEFAULT '' COMMENT '主治医生ID';
+ALTER TABLE `med_behospital_info` MODIFY COLUMN `doctor_name` varchar(50) DEFAULT '' COMMENT '主治医生姓名';
+alter table `med_behospital_info` add  column  `beh_doctor_id` varchar(16) DEFAULT '' COMMENT '住院医生ID' AFTER `doctor_name`;
+alter table `med_behospital_info` add  column `beh_doctor_name` varchar(50) DEFAULT '' COMMENT '住院医生姓名' AFTER `beh_doctor_id`;
+alter table `med_behospital_info` add  column `director_doctor_id` varchar(16) DEFAULT '' COMMENT '主任医生ID' AFTER `beh_doctor_name`;
+alter table `med_behospital_info` add  column `director_doctor_name` varchar(50) DEFAULT '' COMMENT '主任医生姓名' AFTER `director_doctor_id`;
+
+-- ----------------------------
+-- Table structure for qc_question_info
+-- ----------------------------
+DROP TABLE IF EXISTS `qc_question_info`;
+CREATE TABLE `qc_question_info` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院ID',
+  `mode_id` bigint(20) DEFAULT NULL COMMENT '数据模块ID',
+  `tag_name` varchar(100) NOT NULL DEFAULT '' COMMENT '标签名',
+  `name` varchar(100) NOT NULL DEFAULT '' COMMENT 'key',
+  `val` varchar(100) NOT NULL DEFAULT '' COMMENT 'value',
+  `tag_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '标签标识(1:单标签 4:组合标签)',
+  `control_type` tinyint(4) DEFAULT '0' COMMENT '控件类型(0:无类型)',
+  `retract` tinyint(4) DEFAULT '0' COMMENT '缩进(0:不缩进 1:缩进)',
+  `add_line` tinyint(4) DEFAULT '0' COMMENT '换行(0:不换行,1:换行)',
+  `bold` tinyint(4) DEFAULT '0' COMMENT '换行(0:不换行,1:加粗)',
+  `position` tinyint(4) DEFAULT '0' COMMENT '显示位置(1:靠右显示)',
+  `cases_entry_ids` varchar(1000) NOT NULL DEFAULT '' COMMENT '质控条目id列表',
+  `remark` varchar(300) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='标签基础表';
+
+-- ----------------------------
+-- Table structure for qc_question_mapping
+-- ----------------------------
+DROP TABLE IF EXISTS `qc_question_mapping`;
+CREATE TABLE `qc_question_mapping` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `parent_question` bigint(20) DEFAULT NULL COMMENT '上级question',
+  `son_question` bigint(20) DEFAULT NULL COMMENT '下级question',
+  `order_no` int(11) NOT NULL DEFAULT '0' COMMENT '排序号',
+  `remark` varchar(300) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`),
+  KEY `parent_question` (`parent_question`),
+  KEY `son_question` (`son_question`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='标签映射表';
+
+-- ----------------------------
+-- Table structure for qc_module_info
+-- ----------------------------
+DROP TABLE IF EXISTS `qc_module_info`;
+CREATE TABLE `qc_module_info` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `name` varchar(100) NOT NULL DEFAULT '' COMMENT '模板名称',
+  `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院ID',
+  `mode_id` bigint(20) DEFAULT NULL COMMENT '数据模块ID',
+  `record_module_id` bigint(20) DEFAULT NULL COMMENT 'med_record_module的id',
+  `remark` varchar(300) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `INDEX_1` (`hospital_id`,`record_module_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='模型表';
+
+-- ----------------------------
+-- Table structure for qc_module_detail
+-- ----------------------------
+DROP TABLE IF EXISTS `qc_module_detail`;
+CREATE TABLE `qc_module_detail` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `module_id` bigint(20) NOT NULL DEFAULT '0' COMMENT 'module_id',
+  `group_id` int(11) NOT NULL DEFAULT '0' COMMENT '分组id',
+  `question_id` bigint(20) DEFAULT NULL COMMENT 'questionId',
+  `order_no` int(11) NOT NULL DEFAULT '0' COMMENT '排序号',
+  `remark` varchar(300) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`),
+  KEY `module_id` (`module_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='模型明细表';
+
+DROP TABLE IF EXISTS `sys_user_dept`;
+CREATE TABLE `sys_user_dept` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `user_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '用户主键',
+  `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院ID',
+  `dept_id` varchar(20) NOT NULL DEFAULT '' COMMENT '科室编码(HIS导入)',
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户-医院科室映射表';
+
+-- ----------------------------
+-- Table structure for sys_menu
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_menu`;
+CREATE TABLE `sys_menu` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '菜单名称',
+  `parent_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '-1:表示顶级,其他值表示上级菜单的id',
+  `code` varchar(255) NOT NULL DEFAULT '' COMMENT '编码,与前端对应',
+  `show_status` int(11) NOT NULL DEFAULT '0' COMMENT '是否在右侧菜单显示(0:不显示,1:显示)',
+  `maintain_status` int(11) NOT NULL DEFAULT '0' COMMENT '是否可以维护(0:不可维护,1:可以维护)',
+  `order_no` int(11) NOT NULL DEFAULT '0' COMMENT '排序,从小到大',
+  `remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COMMENT='系统菜单';
+
+-- ----------------------------
+-- Records of sys_menu
+-- ----------------------------
+INSERT INTO `sys_menu` VALUES ('1', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '控制台', '-1', 'YH-KZT', '1', '1', '1', '用户-控制台');
+INSERT INTO `sys_menu` VALUES ('2', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '基础数据维护', '-1', 'YH-JCSJWH', '1', '1', '2', '用户-基础数据维护');
+INSERT INTO `sys_menu` VALUES ('3', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '病案质控', '-1', 'YH-BLZK', '1', '1', '3', '用户-病历质控');
+INSERT INTO `sys_menu` VALUES ('4', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '统计分析', '-1', 'YH-TJFX', '1', '1', '4', '用户-统计分析');
+INSERT INTO `sys_menu` VALUES ('5', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '模块数据维护', '2', 'YH-JCSJWH-MKSJWH', '1', '1', '1', '用户-基础数据维护-模块数据维护');
+INSERT INTO `sys_menu` VALUES ('6', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '条目数据维护', '2', 'YH-JCSJWH-TMSJWH', '1', '1', '2', '用户-基础数据维护-条目数据维护');
+INSERT INTO `sys_menu` VALUES ('7', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '质控评分', '3', 'YH-BLZK-ZKPF', '1', '1', '1', '用户-病历质控-质控评分');
+INSERT INTO `sys_menu` VALUES ('8', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '基础功能', '-1', 'YH-QBYH-JCGN', '0', '1', '0', '用户-基础功能');
+INSERT INTO `sys_menu` VALUES ('9', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '质控评分(科室)', '3', 'YH-BLZK-ZKPFKS', '1', '1', '2', '用户-病历质控-质控评分(科室)');
+INSERT INTO `sys_menu` VALUES ('10', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '质控评分(个人)', '3', 'YH-BLZK-ZKPFGR', '1', '1', '3', '用户-病历质控-质控评分(个人)');
+INSERT INTO `sys_menu` VALUES ('12', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '权限管理', '-1', 'YH-QXGL', '1', '0', '5', '用户-权限管理');
+INSERT INTO `sys_menu` VALUES ('13', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '用户管理', '12', 'YH-QXGL-YHGL', '1', '0', '1', '用户-权限管理-用户管理');
+INSERT INTO `sys_menu` VALUES ('14', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '角色管理', '12', 'YH-QXGL-JSGL', '1', '0', '2', '用户-权限管理-角色管理');
+
+-- ----------------------------
+-- Table structure for sys_menu_permission
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_menu_permission`;
+CREATE TABLE `sys_menu_permission` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `menu_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '菜单id',
+  `permission_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '系统资源id',
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8 COMMENT='菜单和系统资源的映射表';
+
+-- ----------------------------
+-- Records of sys_menu_permission
+-- ----------------------------
+INSERT INTO `sys_menu_permission` VALUES ('1', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '1', '基础功能-获取用户、机构、菜单信息');
+INSERT INTO `sys_menu_permission` VALUES ('2', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '2', '基础功能-修改密码');
+INSERT INTO `sys_menu_permission` VALUES ('3', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '9', '控制台-病历相关统计');
+INSERT INTO `sys_menu_permission` VALUES ('4', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '15', '控制台-缺陷相关统计');
+INSERT INTO `sys_menu_permission` VALUES ('5', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '16', '控制台-医院运营相关统计');
+INSERT INTO `sys_menu_permission` VALUES ('6', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '5', '3', '用户-基础数据维护-获取医院模块数据信息');
+INSERT INTO `sys_menu_permission` VALUES ('7', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '5', '4', '用户-基础数据维护-批量更新模块数据');
+INSERT INTO `sys_menu_permission` VALUES ('8', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '6', '6', '用户-条目数据维护-分页获取医院条目数据信息');
+INSERT INTO `sys_menu_permission` VALUES ('9', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '6', '7', '用户-条目数据维护-修改医院条目数据信息');
+INSERT INTO `sys_menu_permission` VALUES ('10', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '6', '8', '用户-条目数据维护-获取医院模块数据下拉列表');
+INSERT INTO `sys_menu_permission` VALUES ('11', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '30', '用户-质控评分-获取病历质控一览下医院科室下拉列表信息');
+INSERT INTO `sys_menu_permission` VALUES ('12', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '17', '用户-质控评分-评分');
+INSERT INTO `sys_menu_permission` VALUES ('13', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '5', '用户-质控评分-分页');
+INSERT INTO `sys_menu_permission` VALUES ('14', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '11', '用户-质控评分-新增质控条目');
+INSERT INTO `sys_menu_permission` VALUES ('15', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '12', '用户-质控评分-删除质控条目');
+INSERT INTO `sys_menu_permission` VALUES ('16', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '13', '用户-质控评分-修改质控条目');
+INSERT INTO `sys_menu_permission` VALUES ('17', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '14', '用户-质控评分-获取详情');
+INSERT INTO `sys_menu_permission` VALUES ('18', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '9', '31', '用户-质控评分(科室)-获取病历质控一览下用户科室下拉列表信息');
+INSERT INTO `sys_menu_permission` VALUES ('19', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '9', '34', '用户-质控评分(科室)-评分');
+INSERT INTO `sys_menu_permission` VALUES ('20', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '9', '32', '用户-质控评分(科室)-分页');
+INSERT INTO `sys_menu_permission` VALUES ('21', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '9', '35', '用户-质控评分(科室)-新增质控条目');
+INSERT INTO `sys_menu_permission` VALUES ('22', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '9', '36', '用户-质控评分(科室)-删除质控条目');
+INSERT INTO `sys_menu_permission` VALUES ('23', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '9', '37', '用户-质控评分(科室)-修改质控条目');
+INSERT INTO `sys_menu_permission` VALUES ('24', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '9', '38', '用户-质控评分(科室)-获取详情');
+INSERT INTO `sys_menu_permission` VALUES ('25', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '10', '39', '用户-质控评分(个人)-获取病历质控一览下用户科室下拉列表信息');
+INSERT INTO `sys_menu_permission` VALUES ('26', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '10', '40', '用户-质控评分(个人)-评分');
+INSERT INTO `sys_menu_permission` VALUES ('27', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '10', '33', '用户-质控评分(个人)-分页');
+INSERT INTO `sys_menu_permission` VALUES ('28', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '10', '41', '用户-质控评分(个人)-新增质控条目');
+INSERT INTO `sys_menu_permission` VALUES ('29', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '10', '42', '用户-质控评分(个人)-删除质控条目');
+INSERT INTO `sys_menu_permission` VALUES ('30', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '10', '43', '用户-质控评分(个人)-修改质控条目');
+INSERT INTO `sys_menu_permission` VALUES ('31', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '10', '44', '用户-质控评分(个人)-获取详情');
+
+-- ----------------------------
+-- Table structure for sys_permission
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_permission`;
+CREATE TABLE `sys_permission` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '资源ID',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '资源名称',
+  `code` varchar(20) NOT NULL DEFAULT '' COMMENT '资源编码',
+  `permissionUrl` varchar(255) NOT NULL DEFAULT '' COMMENT '资源Url',
+  `method` varchar(255) NOT NULL DEFAULT 'ALL' COMMENT '资源允许的请求方式',
+  `descritpion` varchar(255) NOT NULL DEFAULT '' COMMENT '资源描述',
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8 COMMENT='系统资源表';
+
+-- ----------------------------
+-- Records of sys_permission
+-- ----------------------------
+INSERT INTO `sys_permission` VALUES ('1', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取用户、机构、菜单信息', 'FUNC000001', '/sys/user/getUserOrgMenu', 'ALL', '基础功能-获取用户、机构、菜单信息', null);
+INSERT INTO `sys_permission` VALUES ('2', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '修改密码', 'FUNC000002', '/sys/user/midifyPassword', 'ALL', '基础功能-修改密码', null);
+INSERT INTO `sys_permission` VALUES ('3', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取医院模块数据信息', 'FUNC000003', '/qc/cases/getQcCases', 'ALL', '用户-基础数据维护-获取医院模块数据信息', null);
+INSERT INTO `sys_permission` VALUES ('4', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '批量更新模块数据', 'FUNC000004', '/qc/cases/saveQcCases', 'ALL', '用户-基础数据维护-批量更新模块数据', null);
+INSERT INTO `sys_permission` VALUES ('5', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '分页查询', 'FUNC000005', '/qc/behospitalInfo/page', 'ALL', '用户-质控评分-分页', null);
+INSERT INTO `sys_permission` VALUES ('6', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '分页获取医院条目数据信息', 'FUNC000006', '/qc/casesEntryHospital/getQcCasesEntryAll', 'ALL', '用户-条目数据维护-分页获取医院条目数据信息', null);
+INSERT INTO `sys_permission` VALUES ('7', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '修改医院条目数据信息', 'FUNC000007', '/qc/casesEntryHospital/updataQcCasesEntry', 'ALL', '用户-条目数据维护-修改医院条目数据信息', null);
+INSERT INTO `sys_permission` VALUES ('8', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取医院模块下拉数据列表', 'FUNC000008', '/qc/casesEntryHospital/getQcCasesAll', 'ALL', '获取医院模块数据列表', null);
+INSERT INTO `sys_permission` VALUES ('9', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '病历相关统计', 'FUNC000009', '/console/mrStatistics', 'ALL', '控制台-病历相关统计', null);
+INSERT INTO `sys_permission` VALUES ('10', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '模糊查询医院模块条目列表', 'FUNC000010', '/qc/casesEntryHospital/findQcCasesEntry', 'ALL', '用户-条目数据维护-模糊查询医院模块条目列表', null);
+INSERT INTO `sys_permission` VALUES ('11', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '新增质控条目', 'FUNC000011', '/qc/behospitalInfo/addCase', 'ALL', '用户-质控评分-新增质控条目', null);
+INSERT INTO `sys_permission` VALUES ('12', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '删除质控条目', 'FUNC000012', '/qc/behospitalInfo/delCase', 'ALL', '用户-质控评分-删除质控条目', null);
+INSERT INTO `sys_permission` VALUES ('13', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '修改质控条目', 'FUNC000013', '/qc/behospitalInfo/updCase', 'ALL', '用户-质控评分-修改质控条目', null);
+INSERT INTO `sys_permission` VALUES ('14', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取质控评分详情', 'FUNC000014', '/qc/behospitalInfo/getByBehospitalCode', 'ALL', '用户-质控评分-获取详情', null);
+INSERT INTO `sys_permission` VALUES ('15', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '缺陷相关统计', 'FUNC000015', '/console/resultStatistics', 'ALL', '控制台-缺陷相关统计', null);
+INSERT INTO `sys_permission` VALUES ('16', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '医院运营相关统计', 'FUNC000016', '/console/averageStatistics', 'ALL', '控制台-医院运营相关统计', null);
+INSERT INTO `sys_permission` VALUES ('17', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '质控评分', 'FUNC000017', '/qc/behospitalInfo/analyze', 'ALL', '用户-质控评分-评分', null);
+INSERT INTO `sys_permission` VALUES ('18', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取角色列表信息', 'FUNC000018', '/sys/role/list', 'ALL', '用户-权限管理-角色管理-获取角色列表信息', null);
+INSERT INTO `sys_permission` VALUES ('19', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取角色菜权限单等数据', 'FUNC000019', '/sys/role/getRoleMenu', 'ALL', '用户-权限管理-角色管理-获取角色菜权限单等数据', null);
+INSERT INTO `sys_permission` VALUES ('20', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '修改角色菜单权限数据', 'FUNC000020', '/sys/role/saveRoleMenu', 'ALL', '用户-权限管理-角色管理-修改角色菜单权限数据', null);
+INSERT INTO `sys_permission` VALUES ('21', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取医院科室下拉列表信息', 'FUNC000021', '/bas/dept/listForUser', 'ALL', '用户-权限管理-用户管理-获取用户管理下医院科室下拉列表信息', null);
+INSERT INTO `sys_permission` VALUES ('22', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取角色下拉列表信息', 'FUNC000022', '/sys/role/listForUser', 'ALL', '用户-权限管理-用户管理-获取角色下拉列表信息', null);
+INSERT INTO `sys_permission` VALUES ('23', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '用户列表翻页信息查询', 'FUNC000023', '/sys/user/userPage', 'ALL', '用户-权限管理-用户管理-用户列表翻页信息查询', null);
+INSERT INTO `sys_permission` VALUES ('24', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取用户科室', 'FUNC000024', '/sys/user/getUserDepts', 'ALL', '用户-权限管理-用户管理-获取用户科室', null);
+INSERT INTO `sys_permission` VALUES ('25', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取用户角色', 'FUNC000025', '/sys/user/getUserRoles', 'ALL', '用户-权限管理-用户管理-获取用户角色', null);
+INSERT INTO `sys_permission` VALUES ('26', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '用户启用', 'FUNC000026', '/sys/user/enable', 'ALL', '用户-权限管理-用户管理-用户启用', null);
+INSERT INTO `sys_permission` VALUES ('27', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '用户停用', 'FUNC000027', '/sys/user/disable', 'ALL', '用户-权限管理-用户管理-用户停用', null);
+INSERT INTO `sys_permission` VALUES ('28', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '编辑用户科室', 'FUNC000028', '/sys/user/editUserDepts', 'ALL', '用户-权限管理-用户管理-编辑用户科室', null);
+INSERT INTO `sys_permission` VALUES ('29', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '编辑用户角色', 'FUNC000029', '/sys/user/editUserRoles', 'ALL', '用户-权限管理-用户管理-编辑用户角色', null);
+INSERT INTO `sys_permission` VALUES ('30', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取医院科室下拉列表信息', 'FUNC000030', '/bas/dept/getList', 'ALL', '用户-质控评分-获取病历质控一览下医院科室下拉列表信息', null);
+INSERT INTO `sys_permission` VALUES ('31', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取用户科室下拉列表信息', 'FUNC000031', '/bas/dept/getListUser', 'ALL', '用户-质控评分(科室)-获取病历质控一览下用户科室下拉列表信息', null);
+INSERT INTO `sys_permission` VALUES ('32', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '分页查询', 'FUNC000032', '/qc/behospitalInfo/page_dept', 'ALL', '用户-质控评分(科室)-分页', null);
+INSERT INTO `sys_permission` VALUES ('33', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '分页查询', 'FUNC000033', '/qc/behospitalInfo/page_person', 'ALL', '用户-质控评分(个人)-分页', null);
+INSERT INTO `sys_permission` VALUES ('34', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '质控评分', 'FUNC000017', '/qc/behospitalInfo/analyze', 'ALL', '用户-质控评分(科室)-评分', null);
+INSERT INTO `sys_permission` VALUES ('35', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '新增质控条目', 'FUNC000011', '/qc/behospitalInfo/addCase', 'ALL', '用户-质控评分(科室)-新增质控条目', null);
+INSERT INTO `sys_permission` VALUES ('36', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '删除质控条目', 'FUNC000012', '/qc/behospitalInfo/delCase', 'ALL', '用户-质控评分(科室)-删除质控条目', null);
+INSERT INTO `sys_permission` VALUES ('37', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '修改质控条目', 'FUNC000013', '/qc/behospitalInfo/updCase', 'ALL', '用户-质控评分(科室)-修改质控条目', null);
+INSERT INTO `sys_permission` VALUES ('38', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取质控评分详情', 'FUNC000014', '/qc/behospitalInfo/getByBehospitalCode', 'ALL', '用户-质控评分(科室)-获取详情', null);
+INSERT INTO `sys_permission` VALUES ('39', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取用户科室下拉列表信息', 'FUNC000031', '/bas/dept/getListUser', 'ALL', '用户-质控评分(个人)-获取病历质控一览下用户科室下拉列表信息', null);
+INSERT INTO `sys_permission` VALUES ('40', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '质控评分', 'FUNC000017', '/qc/behospitalInfo/analyze', 'ALL', '用户-质控评分(科室)-评分', null);
+INSERT INTO `sys_permission` VALUES ('41', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '新增质控条目', 'FUNC000011', '/qc/behospitalInfo/addCase', 'ALL', '用户-质控评分(科室)-新增质控条目', null);
+INSERT INTO `sys_permission` VALUES ('42', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '删除质控条目', 'FUNC000012', '/qc/behospitalInfo/delCase', 'ALL', '用户-质控评分(科室)-删除质控条目', null);
+INSERT INTO `sys_permission` VALUES ('43', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '修改质控条目', 'FUNC000013', '/qc/behospitalInfo/updCase', 'ALL', '用户-质控评分(科室)-修改质控条目', null);
+INSERT INTO `sys_permission` VALUES ('44', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取质控评分详情', 'FUNC000014', '/qc/behospitalInfo/getByBehospitalCode', 'ALL', '用户-质控评分(科室)-获取详情', null);
+
+-- ----------------------------
+-- Table structure for sys_role
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_role`;
+CREATE TABLE `sys_role` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '角色ID',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '角色名称',
+  `roleLevel` int(11) NOT NULL DEFAULT '0' COMMENT '角色等级',
+  `descritpion` varchar(255) NOT NULL DEFAULT '' COMMENT '角色描述',
+  `menuItems` varchar(255) NOT NULL DEFAULT '' COMMENT '菜单ID:对应角色ID(暂无用处)',
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='系统角色表';
+
+-- ----------------------------
+-- Records of sys_role
+-- ----------------------------
+INSERT INTO `sys_role` VALUES ('-1', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '超级管理员', '0', '', '', '');
+INSERT INTO `sys_role` VALUES ('1', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '医院人员(全局)', '0', '', '', '');
+INSERT INTO `sys_role` VALUES ('2', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '医院人员(科室)', '0', '', '', null);
+INSERT INTO `sys_role` VALUES ('3', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '医院人员(个人)', '0', '', '', null);
+
+-- ----------------------------
+-- Table structure for sys_role_menu
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_role_menu`;
+CREATE TABLE `sys_role_menu` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `role_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '角色id',
+  `menu_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '菜单id',
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COMMENT='角色和菜单的映射表';
+
+-- ----------------------------
+-- Records of sys_role_menu
+-- ----------------------------
+INSERT INTO `sys_role_menu` VALUES ('1', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '1', null);
+INSERT INTO `sys_role_menu` VALUES ('2', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '2', null);
+INSERT INTO `sys_role_menu` VALUES ('3', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '3', null);
+INSERT INTO `sys_role_menu` VALUES ('4', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '4', null);
+INSERT INTO `sys_role_menu` VALUES ('5', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '5', null);
+INSERT INTO `sys_role_menu` VALUES ('6', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '6', null);
+INSERT INTO `sys_role_menu` VALUES ('7', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '7', null);
+INSERT INTO `sys_role_menu` VALUES ('8', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '8', null);
+INSERT INTO `sys_role_menu` VALUES ('10', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', null);
+INSERT INTO `sys_role_menu` VALUES ('11', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '2', null);
+INSERT INTO `sys_role_menu` VALUES ('12', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '3', null);
+INSERT INTO `sys_role_menu` VALUES ('13', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '4', null);
+INSERT INTO `sys_role_menu` VALUES ('14', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '5', null);
+INSERT INTO `sys_role_menu` VALUES ('15', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '6', null);
+INSERT INTO `sys_role_menu` VALUES ('16', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '7', null);
+INSERT INTO `sys_role_menu` VALUES ('17', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '8', null);
+INSERT INTO `sys_role_menu` VALUES ('18', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '9', null);
+INSERT INTO `sys_role_menu` VALUES ('19', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '10', null);
+INSERT INTO `sys_role_menu` VALUES ('20', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '12', null);
+INSERT INTO `sys_role_menu` VALUES ('21', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '13', null);
+INSERT INTO `sys_role_menu` VALUES ('22', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '14', null);
+
+-- ----------------------------
+-- Table structure for sys_role_permission
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_role_permission`;
+CREATE TABLE `sys_role_permission` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `role_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '角色id',
+  `permission_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '资源id',
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8 COMMENT='角色和资源的映射表';
+
+-- ----------------------------
+-- Records of sys_role_permission
+-- ----------------------------
+INSERT INTO `sys_role_permission` VALUES ('1', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '1', '基础功能-获取用户、机构、菜单信息');
+INSERT INTO `sys_role_permission` VALUES ('2', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '2', '基础功能-修改密码');
+INSERT INTO `sys_role_permission` VALUES ('3', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '3', '用户-基础数据维护-获取医院模块数据信息');
+INSERT INTO `sys_role_permission` VALUES ('4', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '4', '用户-基础数据维护-批量更新模块数据');
+INSERT INTO `sys_role_permission` VALUES ('5', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '基础功能-获取用户、机构、菜单信息');
+INSERT INTO `sys_role_permission` VALUES ('6', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '2', '基础功能-修改密码');
+INSERT INTO `sys_role_permission` VALUES ('7', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '5', '用户-质控评分-分页');
+INSERT INTO `sys_role_permission` VALUES ('8', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '6', '用户-条目数据维护-分页获取医院条目数据信息');
+INSERT INTO `sys_role_permission` VALUES ('9', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '7', '用户-条目数据维护-修改医院条目数据信息');
+INSERT INTO `sys_role_permission` VALUES ('10', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '8', '用户-条目数据维护-获取医院模块数据列表');
+INSERT INTO `sys_role_permission` VALUES ('11', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '9', '控制台-病历相关统计');
+INSERT INTO `sys_role_permission` VALUES ('12', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '10', '用户-条目数据维护-模糊查询医院模块条目列表');
+INSERT INTO `sys_role_permission` VALUES ('13', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '11', '用户-质控评分-新增质控条目');
+INSERT INTO `sys_role_permission` VALUES ('14', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '12', '用户-质控评分-删除质控条目');
+INSERT INTO `sys_role_permission` VALUES ('15', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '13', '用户-质控评分-修改质控条目');
+INSERT INTO `sys_role_permission` VALUES ('16', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '14', '用户-质控评分-获取详情');
+INSERT INTO `sys_role_permission` VALUES ('17', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '15', '控制台-缺陷相关统计');
+INSERT INTO `sys_role_permission` VALUES ('18', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '16', '控制台-医院运营相关统计');
+INSERT INTO `sys_role_permission` VALUES ('19', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '17', '用户-质控评分-评分');
+INSERT INTO `sys_role_permission` VALUES ('20', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '3', '用户-基础数据维护-获取医院模块数据信息');
+INSERT INTO `sys_role_permission` VALUES ('21', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '4', '用户-基础数据维护-批量更新模块数据');
+INSERT INTO `sys_role_permission` VALUES ('22', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '5', '用户-质控评分-分页');
+INSERT INTO `sys_role_permission` VALUES ('23', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '6', '用户-条目数据维护-分页获取医院条目数据信息');
+INSERT INTO `sys_role_permission` VALUES ('24', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '7', '用户-条目数据维护-修改医院条目数据信息');
+INSERT INTO `sys_role_permission` VALUES ('25', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '8', '用户-条目数据维护-获取医院模块数据列表');
+INSERT INTO `sys_role_permission` VALUES ('26', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '9', '控制台-病历相关统计');
+INSERT INTO `sys_role_permission` VALUES ('27', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '10', '用户-条目数据维护-模糊查询医院模块条目列表');
+INSERT INTO `sys_role_permission` VALUES ('28', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '11', '用户-质控评分-新增质控条目');
+INSERT INTO `sys_role_permission` VALUES ('29', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '12', '用户-质控评分-删除质控条目');
+INSERT INTO `sys_role_permission` VALUES ('30', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '13', '用户-质控评分-修改质控条目');
+INSERT INTO `sys_role_permission` VALUES ('31', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '14', '用户-质控评分-获取详情');
+INSERT INTO `sys_role_permission` VALUES ('32', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '15', '控制台-缺陷相关统计');
+INSERT INTO `sys_role_permission` VALUES ('33', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '16', '控制台-医院运营相关统计');
+INSERT INTO `sys_role_permission` VALUES ('34', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '17', '用户-质控评分-评分');
+INSERT INTO `sys_role_permission` VALUES ('35', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '18', '用户-权限管理-角色管理-获取角色列表信息');
+INSERT INTO `sys_role_permission` VALUES ('36', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '19', '用户-权限管理-角色管理-获取角色菜权限单等数据');
+INSERT INTO `sys_role_permission` VALUES ('37', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '20', '用户-权限管理-角色管理-修改角色菜单权限数据');
+INSERT INTO `sys_role_permission` VALUES ('38', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '21', '用户-权限管理-用户管理-获取医院科室下拉列表信息');
+INSERT INTO `sys_role_permission` VALUES ('39', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '22', '用户-权限管理-用户管理-获取角色下拉列表信息');
+INSERT INTO `sys_role_permission` VALUES ('40', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '23', '用户-权限管理-用户管理-用户列表翻页信息查询');
+INSERT INTO `sys_role_permission` VALUES ('41', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '24', '用户-权限管理-用户管理-获取用户科室');
+INSERT INTO `sys_role_permission` VALUES ('42', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '25', '用户-权限管理-用户管理-获取用户角色');
+INSERT INTO `sys_role_permission` VALUES ('43', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '26', '用户-权限管理-用户管理-用户启用');
+INSERT INTO `sys_role_permission` VALUES ('44', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '27', '用户-权限管理-用户管理-用户停用');
+INSERT INTO `sys_role_permission` VALUES ('45', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '28', '用户-权限管理-用户管理-编辑用户科室');
+INSERT INTO `sys_role_permission` VALUES ('46', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '29', '用户-权限管理-用户管理-编辑用户角色');
+INSERT INTO `sys_role_permission` VALUES ('47', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '30', '用户-质控评分-获取病历质控一览下医院科室下拉列表信息');
+INSERT INTO `sys_role_permission` VALUES ('48', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '31', '用户-质控评分-获取病历质控一览下用户科室下拉列表信息');
+INSERT INTO `sys_role_permission` VALUES ('49', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '30', '用户-质控评分-获取病历质控一览下医院科室下拉列表信息');
+INSERT INTO `sys_role_permission` VALUES ('50', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '32', '用户-质控评分(科室)-分页');
+INSERT INTO `sys_role_permission` VALUES ('51', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '33', '用户-质控评分(个人)-分页');
+INSERT INTO `sys_role_permission` VALUES ('52', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '34', '用户-质控评分(科室)-评分');
+INSERT INTO `sys_role_permission` VALUES ('53', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '35', '用户-质控评分(科室)-新增质控条目');
+INSERT INTO `sys_role_permission` VALUES ('54', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '36', '用户-质控评分(科室)-删除质控条目');
+INSERT INTO `sys_role_permission` VALUES ('55', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '37', '用户-质控评分(科室)-修改质控条目');
+INSERT INTO `sys_role_permission` VALUES ('56', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '38', '用户-质控评分(科室)-获取详情');
+INSERT INTO `sys_role_permission` VALUES ('57', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '39', '用户-质控评分(个人)-获取病历质控一览下用户科室下拉列表信息');
+INSERT INTO `sys_role_permission` VALUES ('58', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '40', '用户-质控评分(科室)-评分');
+INSERT INTO `sys_role_permission` VALUES ('59', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '41', '用户-质控评分(科室)-新增质控条目');
+INSERT INTO `sys_role_permission` VALUES ('60', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '42', '用户-质控评分(科室)-删除质控条目');
+INSERT INTO `sys_role_permission` VALUES ('61', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '43', '用户-质控评分(科室)-修改质控条目');
+INSERT INTO `sys_role_permission` VALUES ('62', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '44', '用户-质控评分(科室)-获取详情');
+
+
+

+ 1 - 1
src/main/java/com/diagbot/config/MybatisPlusConfigurer.java

@@ -26,7 +26,7 @@ public class MybatisPlusConfigurer {
         // 设置请求的页面大于最大页后操作,true调回到首页,false继续请求,默认false
         //paginationInterceptor.setOverflow(false);
         // 设置最大单页限制数量,默认500条,-1不受限制
-        paginationInterceptor.setLimit(500L);
+        paginationInterceptor.setLimit(-1L);
         return paginationInterceptor;
     }
 

+ 2 - 1
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -46,8 +46,9 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/cache/clear").permitAll()
                 .antMatchers("/qc/behospitalInfo/execule").permitAll()
                 .antMatchers("/qc/behospitalInfo/analyze_rpc").permitAll()
-                .antMatchers("/qc/behospitalInfo/analyze").permitAll()
                 .antMatchers("/qc/behospitalInfo/analyze_api").permitAll()
+                .antMatchers("/qc/module/getById").permitAll()
+                .antMatchers("/qc/module/getModuleMap").permitAll()
                 .antMatchers("/**").authenticated();
 //                .antMatchers("/**").permitAll();
     }

+ 2 - 1
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -89,8 +89,9 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/cache/clear", request)
                 || matchers("/qc/behospitalInfo/execule", request)
                 || matchers("/qc/behospitalInfo/analyze_rpc", request)
-                || matchers("/qc/behospitalInfo/analyze", request)
                 || matchers("/qc/behospitalInfo/analyze_api", request)
+                || matchers("/qc/module/getById", request)
+                || matchers("/qc/module/getModuleMap", request)
                 || matchers("/", request)) {
             return true;
         }

+ 23 - 0
src/main/java/com/diagbot/dto/BasDeptInfoDTO.java

@@ -0,0 +1,23 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/4/27 18:56
+ */
+@Getter
+@Setter
+public class BasDeptInfoDTO {
+    /**
+     * 科室编码(HIS导入)
+     */
+    private String deptId;
+
+    /**
+     * 科室名称
+     */
+    private String deptName;
+}

+ 3 - 0
src/main/java/com/diagbot/dto/BehospitalInfoDTO.java

@@ -103,4 +103,7 @@ public class BehospitalInfoDTO implements Serializable {
      */
     private Date gradeTime;
 
+    private String directorDoctorName ;
+
+    private String behDoctorName;
 }

+ 29 - 0
src/main/java/com/diagbot/dto/GetModuleInfoOneDTO.java

@@ -0,0 +1,29 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @author: wangyu
+ * @time: 2018/12/28 17:11
+ */
+@Setter
+@Getter
+public class GetModuleInfoOneDTO {
+    //模板id
+    private Long id;
+    //模板名称
+    private String name;
+    //医院ID
+    private Long hospitalId;
+    //数据模块ID
+    private Long modeId;
+    //数据模块名称
+    private String modeName;
+    //模板明细
+    private Map<Integer, List<QcModuleDetailDTO>> moduleDetail;
+}

+ 3 - 1
src/main/java/com/diagbot/dto/MsgDTO.java

@@ -21,6 +21,8 @@ public class MsgDTO {
     private BigDecimal score;
     //提示信息
     private String msg;
+    //提示信息
+    private String info;
     //标准提示信息
     private String standardMsg;
     //单项否决
@@ -36,5 +38,5 @@ public class MsgDTO {
     // 条目ID
     private Long casesEntryId;
     // 条目id对应页面数据的key值
-    private List<String> pageKeyList = new ArrayList<>();
+    private List<Long> pageKeyList = new ArrayList<>();
 }

+ 32 - 0
src/main/java/com/diagbot/dto/QcModuleDetailDTO.java

@@ -0,0 +1,32 @@
+package com.diagbot.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 模型明细表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-27
+ */
+@Data
+public class QcModuleDetailDTO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 分组Id
+     */
+    private Integer groupId;
+
+    /**
+     * questionId
+     */
+    private Long questionId;
+
+    private QuestionDTO questionDTO;
+
+}

+ 33 - 0
src/main/java/com/diagbot/dto/QuestionDTO.java

@@ -0,0 +1,33 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Description: 返回标签内容
+ * @Author: ztg
+ * @Date: 2018/10/24 16:11
+ */
+@Getter
+@Setter
+public class QuestionDTO {
+
+    private Long id;// id
+    private String name;//key
+    private String val;//value
+    private String tagName;//标签名称
+    private Integer controlType; //控件类型
+    private Integer tagType; //标签标识
+    private Long hospitalId; //医院ID
+    private Long modeId; //数据模块ID
+    private Integer retract; //缩进(0:不缩进 1:缩进)
+    private Integer addLine; //换行(0:不换行,1:换行)
+    private Integer bold;//换行(0:不换行,1:加粗)
+    private Integer position; //显示位置(1:靠右显示)
+    private String casesEntryIds;//质控条目id列表
+    private List<QuestionDTO> questionMapping = new ArrayList<>();     //下级标签
+//    private String remark;//备注
+}

+ 17 - 0
src/main/java/com/diagbot/dto/QuestionEntryDTO.java

@@ -0,0 +1,17 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description: 返回标签和质控条目的映射内容
+ * @Author: ztg
+ * @Date: 2018/10/24 16:11
+ */
+@Getter
+@Setter
+public class QuestionEntryDTO {
+
+    private Long id;// id
+    private Long casesEntryId;//casesEntryId
+}

+ 21 - 0
src/main/java/com/diagbot/dto/SysMenuPermissionDTO.java

@@ -0,0 +1,21 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/4/27 13:40
+ */
+@Getter
+@Setter
+public class SysMenuPermissionDTO {
+    private Long menuId;
+    private String menuName;
+    private Long parentId;
+    private Integer haveMenu;
+    private Long permissionId;
+    private String permissionName;
+    private Integer havePermission;
+}

+ 18 - 0
src/main/java/com/diagbot/dto/SysPermissionDTO.java

@@ -0,0 +1,18 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/4/27 13:40
+ */
+@Getter
+@Setter
+public class SysPermissionDTO {
+    private Long permissionId;
+    private String permissionName;
+    private Integer havePermission;
+    private Long parentId;
+}

+ 55 - 0
src/main/java/com/diagbot/dto/SysRoleDTO.java

@@ -0,0 +1,55 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/4/27 10:59
+ */
+@Getter
+@Setter
+public class SysRoleDTO {
+    /**
+     * 角色ID
+     */
+    private Long id;
+
+//    /**
+//     * 是否删除,N:未删除,Y:删除
+//     */
+//    private String isDeleted;
+//
+//    /**
+//     * 记录创建时间
+//     */
+//    private Date gmtCreate;
+//
+//    /**
+//     * 记录修改时间,如果时间是1970年则表示纪录未修改
+//     */
+//    private Date gmtModified;
+//
+//    /**
+//     * 创建人,0表示无创建人值
+//     */
+//    private String creator;
+//
+//    /**
+//     * 修改人,如果为0则表示纪录未修改
+//     */
+//    private String modifier;
+
+    /**
+     * 角色名称
+     */
+    private String name;
+
+    /**
+     * 角色描述
+     */
+    private String descritpion;
+}

+ 24 - 0
src/main/java/com/diagbot/dto/SysRoleMenuDTO.java

@@ -0,0 +1,24 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/4/27 11:06
+ */
+@Getter
+@Setter
+public class SysRoleMenuDTO {
+    private Long menuId;
+    private String menuName;
+    private Long parentId;
+    private Integer haveMenu;
+    //权限
+    private List<SysPermissionDTO> sysPermissionDTOList;
+    //子菜单
+    private List<SysRoleMenuDTO> sonMenuDTOList;
+}

+ 19 - 0
src/main/java/com/diagbot/dto/SysUserDeptDTO.java

@@ -0,0 +1,19 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/4/28 9:26
+ */
+@Getter
+@Setter
+public class SysUserDeptDTO {
+    private Long userId;
+    private List<BasDeptInfoDTO> notSelDepts;
+    private List<BasDeptInfoDTO> selDepts;
+}

+ 33 - 0
src/main/java/com/diagbot/dto/SysUserPermissionDTO.java

@@ -0,0 +1,33 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/4/27 17:14
+ */
+@Getter
+@Setter
+public class SysUserPermissionDTO {
+    /**
+     * 菜单ID
+     */
+    private Long menuId;
+
+    /**
+     * 权限ID
+     */
+    private Long permissionId;
+
+    /**
+     * 资源名称
+     */
+    private String name;
+
+    /**
+     * 资源编码
+     */
+    private String code;
+}

+ 27 - 0
src/main/java/com/diagbot/dto/SysUserQueryDTO.java

@@ -0,0 +1,27 @@
+package com.diagbot.dto;
+
+import com.diagbot.enums.StatusEnum;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/4/28 9:17
+ */
+@Getter
+@Setter
+public class SysUserQueryDTO {
+    private Long userId;
+    private String userName;
+    private String linkman;
+    private String deptName;
+    private String roleName;
+    private Integer status;
+    private String statusName;
+
+
+    public String getStatusName() {
+        return StatusEnum.getName(this.status);
+    }
+}

+ 19 - 0
src/main/java/com/diagbot/dto/SysUserRoleDTO.java

@@ -0,0 +1,19 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/4/28 9:26
+ */
+@Getter
+@Setter
+public class SysUserRoleDTO {
+    private Long userId;
+    private List<SysRoleDTO> notSelRoles;
+    private List<SysRoleDTO> selRoles;
+}

+ 177 - 0
src/main/java/com/diagbot/entity/BasDeptInfo.java

@@ -0,0 +1,177 @@
+package com.diagbot.entity;
+
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 医院科室信息
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-27
+ */
+public class BasDeptInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 科室编码(HIS导入)
+     */
+    private String deptId;
+
+    /**
+     * 医院ID
+     */
+    private Long hospitalId;
+
+    private String parentDeptId;
+
+    /**
+     * 科室名称
+     */
+    private String deptName;
+
+    /**
+     * 科室类别
+     */
+    private String deptType;
+
+    /**
+     * 首字母拼音
+     */
+    private String spell;
+
+    /**
+     * 区域类别(门诊、工作站、住院等)
+     */
+    private String station;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    public String getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(String deptId) {
+        this.deptId = deptId;
+    }
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public String getParentDeptId() {
+        return parentDeptId;
+    }
+
+    public void setParentDeptId(String parentDeptId) {
+        this.parentDeptId = parentDeptId;
+    }
+    public String getDeptName() {
+        return deptName;
+    }
+
+    public void setDeptName(String deptName) {
+        this.deptName = deptName;
+    }
+    public String getDeptType() {
+        return deptType;
+    }
+
+    public void setDeptType(String deptType) {
+        this.deptType = deptType;
+    }
+    public String getSpell() {
+        return spell;
+    }
+
+    public void setSpell(String spell) {
+        this.spell = spell;
+    }
+    public String getStation() {
+        return station;
+    }
+
+    public void setStation(String station) {
+        this.station = station;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public LocalDateTime getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(LocalDateTime gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public LocalDateTime getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(LocalDateTime gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    @Override
+    public String toString() {
+        return "BasDeptInfo{" +
+            "deptId=" + deptId +
+            ", hospitalId=" + hospitalId +
+            ", parentDeptId=" + parentDeptId +
+            ", deptName=" + deptName +
+            ", deptType=" + deptType +
+            ", spell=" + spell +
+            ", station=" + station +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+        "}";
+    }
+}

+ 275 - 3
src/main/java/com/diagbot/entity/BehospitalInfo.java

@@ -36,7 +36,7 @@ public class BehospitalInfo implements Serializable {
     private String name;
 
     /**
-     * 性别
+     * 性别(男,女)
      */
     private String sex;
 
@@ -50,6 +50,11 @@ public class BehospitalInfo implements Serializable {
      */
     private String fileCode;
 
+    /**
+     * 质控类型
+     */
+    private Long qcTypeId;
+
     /**
      * 病区编码
      */
@@ -111,15 +116,35 @@ public class BehospitalInfo implements Serializable {
     private String diagnose;
 
     /**
-     * 医生ID
+     * 住院医生ID
+     */
+    private String behDoctorId;
+
+    /**
+     * 住院医生姓名
+     */
+    private String behDoctorName;
+
+    /**
+     * 主治医生ID
      */
     private String doctorId;
 
     /**
-     * 医生姓名
+     * 主治医生姓名
      */
     private String doctorName;
 
+    /**
+     * 主任医生ID
+     */
+    private String directorDoctorId;
+
+    /**
+     * 主任医生姓名
+     */
+    private String directorDoctorName;
+
     /**
      * 是否删除,N:未删除,Y:删除
      */
@@ -144,4 +169,251 @@ public class BehospitalInfo implements Serializable {
      * 修改人,如果为0则表示纪录未修改
      */
     private String modifier;
+
+    public String getBehospitalCode() {
+        return behospitalCode;
+    }
+
+    public void setBehospitalCode(String behospitalCode) {
+        this.behospitalCode = behospitalCode;
+    }
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+    public String getSex() {
+        return sex;
+    }
+
+    public void setSex(String sex) {
+        this.sex = sex;
+    }
+    public Date getBirthday() {
+        return birthday;
+    }
+
+    public void setBirthday(Date birthday) {
+        this.birthday = birthday;
+    }
+    public String getFileCode() {
+        return fileCode;
+    }
+
+    public void setFileCode(String fileCode) {
+        this.fileCode = fileCode;
+    }
+    public Long getQcTypeId() {
+        return qcTypeId;
+    }
+
+    public void setQcTypeId(Long qcTypeId) {
+        this.qcTypeId = qcTypeId;
+    }
+    public String getWardCode() {
+        return wardCode;
+    }
+
+    public void setWardCode(String wardCode) {
+        this.wardCode = wardCode;
+    }
+    public String getWardName() {
+        return wardName;
+    }
+
+    public void setWardName(String wardName) {
+        this.wardName = wardName;
+    }
+    public String getBehDeptId() {
+        return behDeptId;
+    }
+
+    public void setBehDeptId(String behDeptId) {
+        this.behDeptId = behDeptId;
+    }
+    public String getBehDeptName() {
+        return behDeptName;
+    }
+
+    public void setBehDeptName(String behDeptName) {
+        this.behDeptName = behDeptName;
+    }
+    public String getBedCode() {
+        return bedCode;
+    }
+
+    public void setBedCode(String bedCode) {
+        this.bedCode = bedCode;
+    }
+    public String getBedName() {
+        return bedName;
+    }
+
+    public void setBedName(String bedName) {
+        this.bedName = bedName;
+    }
+    public String getInsuranceName() {
+        return insuranceName;
+    }
+
+    public void setInsuranceName(String insuranceName) {
+        this.insuranceName = insuranceName;
+    }
+    public String getJobType() {
+        return jobType;
+    }
+
+    public void setJobType(String jobType) {
+        this.jobType = jobType;
+    }
+    public Date getBehospitalDate() {
+        return behospitalDate;
+    }
+
+    public void setBehospitalDate(Date behospitalDate) {
+        this.behospitalDate = behospitalDate;
+    }
+    public Date getLeaveHospitalDate() {
+        return leaveHospitalDate;
+    }
+
+    public void setLeaveHospitalDate(Date leaveHospitalDate) {
+        this.leaveHospitalDate = leaveHospitalDate;
+    }
+    public String getDiagnoseIcd() {
+        return diagnoseIcd;
+    }
+
+    public void setDiagnoseIcd(String diagnoseIcd) {
+        this.diagnoseIcd = diagnoseIcd;
+    }
+    public String getDiagnose() {
+        return diagnose;
+    }
+
+    public void setDiagnose(String diagnose) {
+        this.diagnose = diagnose;
+    }
+    public String getBehDoctorId() {
+        return behDoctorId;
+    }
+
+    public void setBehDoctorId(String behDoctorId) {
+        this.behDoctorId = behDoctorId;
+    }
+    public String getBehDoctorName() {
+        return behDoctorName;
+    }
+
+    public void setBehDoctorName(String behDoctorName) {
+        this.behDoctorName = behDoctorName;
+    }
+    public String getDoctorId() {
+        return doctorId;
+    }
+
+    public void setDoctorId(String doctorId) {
+        this.doctorId = doctorId;
+    }
+    public String getDoctorName() {
+        return doctorName;
+    }
+
+    public void setDoctorName(String doctorName) {
+        this.doctorName = doctorName;
+    }
+    public String getDirectorDoctorId() {
+        return directorDoctorId;
+    }
+
+    public void setDirectorDoctorId(String directorDoctorId) {
+        this.directorDoctorId = directorDoctorId;
+    }
+    public String getDirectorDoctorName() {
+        return directorDoctorName;
+    }
+
+    public void setDirectorDoctorName(String directorDoctorName) {
+        this.directorDoctorName = directorDoctorName;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    @Override
+    public String toString() {
+        return "MedBehospitalInfo{" +
+                "behospitalCode=" + behospitalCode +
+                ", hospitalId=" + hospitalId +
+                ", name=" + name +
+                ", sex=" + sex +
+                ", birthday=" + birthday +
+                ", fileCode=" + fileCode +
+                ", qcTypeId=" + qcTypeId +
+                ", wardCode=" + wardCode +
+                ", wardName=" + wardName +
+                ", behDeptId=" + behDeptId +
+                ", behDeptName=" + behDeptName +
+                ", bedCode=" + bedCode +
+                ", bedName=" + bedName +
+                ", insuranceName=" + insuranceName +
+                ", jobType=" + jobType +
+                ", behospitalDate=" + behospitalDate +
+                ", leaveHospitalDate=" + leaveHospitalDate +
+                ", diagnoseIcd=" + diagnoseIcd +
+                ", diagnose=" + diagnose +
+                ", behDoctorId=" + behDoctorId +
+                ", behDoctorName=" + behDoctorName +
+                ", doctorId=" + doctorId +
+                ", doctorName=" + doctorName +
+                ", directorDoctorId=" + directorDoctorId +
+                ", directorDoctorName=" + directorDoctorName +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                "}";
+    }
 }

+ 78 - 0
src/main/java/com/diagbot/entity/QcModuleDetail.java

@@ -0,0 +1,78 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 模型明细表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-27
+ */
+@Data
+public class QcModuleDetail implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * module_id
+     */
+    private Long moduleId;
+
+    /**
+     * 分组Id
+     */
+    private Integer groupId;
+
+    /**
+     * questionId
+     */
+    private Long questionId;
+
+    /**
+     * 排序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 备注
+     */
+    private String remark;
+}

+ 73 - 0
src/main/java/com/diagbot/entity/QcModuleInfo.java

@@ -0,0 +1,73 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 模型表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-27
+ */
+@Data
+public class QcModuleInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 模板名称
+     */
+    private String name;
+
+    /**
+     * 医院ID
+     */
+    private Long hospitalId;
+
+    /**
+     * 数据模块ID
+     */
+    private Long modeId;
+
+    /**
+     * 备注
+     */
+    private String remark;
+}

+ 118 - 0
src/main/java/com/diagbot/entity/QcQuestionInfo.java

@@ -0,0 +1,118 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 标签基础表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-27
+ */
+@Data
+public class QcQuestionInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 医院ID
+     */
+    private Long hospitalId;
+
+    /**
+     * 数据模块ID
+     */
+    private Long modeId;
+
+    /**
+     * 标签名
+     */
+    private String tagName;
+
+    /**
+     * key
+     */
+    private String name;
+
+    /**
+     * value
+     */
+    private String val;
+
+    /**
+     * 标签标识(1:单标签 4:组合标签)
+     */
+    private Integer tagType;
+
+    /**
+     * 控件类型(0:无类型)
+     */
+    private Integer controlType;
+
+    /**
+     * 缩进(0:不缩进 1:缩进)
+     */
+    private Integer retract;
+
+    /**
+     * 换行(0:不换行,1:换行)
+     */
+    private Integer addLine;
+
+    /**
+     * 换行(0:不换行,1:加粗)
+     */
+    private Integer bold;
+
+    /**
+     * 显示位置(1:靠右显示)
+     */
+    private Integer position;
+
+    /**
+     * 质控条目id列表
+     */
+    private String casesEntryIds;
+
+    /**
+     * 备注
+     */
+    private String remark;
+}

+ 73 - 0
src/main/java/com/diagbot/entity/QcQuestionMapping.java

@@ -0,0 +1,73 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 标签映射表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-27
+ */
+@Data
+public class QcQuestionMapping implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 上级question
+     */
+    private Long parentQuestion;
+
+    /**
+     * 下级question
+     */
+    private Long sonQuestion;
+
+    /**
+     * 排序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 备注
+     */
+    private String remark;
+}

+ 7 - 140
src/main/java/com/diagbot/entity/QcresultDetail.java

@@ -3,6 +3,7 @@ package com.diagbot.entity;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
@@ -18,6 +19,7 @@ import java.util.Date;
  * @since 2020-04-14
  */
 @TableName("med_qcresult_detail")
+@Data
 public class QcresultDetail implements Serializable {
 
     private static final long serialVersionUID = 1L;
@@ -60,6 +62,11 @@ public class QcresultDetail implements Serializable {
      */
     private String msg;
 
+    /**
+     * 质控返回提示信息
+     */
+    private String info;
+
     /**
      * 单项否决(1-单项否决 0-非)
      */
@@ -94,144 +101,4 @@ public class QcresultDetail implements Serializable {
      * 备注
      */
     private String remark;
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public Long getHospitalId() {
-        return hospitalId;
-    }
-
-    public void setHospitalId(Long hospitalId) {
-        this.hospitalId = hospitalId;
-    }
-
-    public String getBehospitalCode() {
-        return behospitalCode;
-    }
-
-    public void setBehospitalCode(String behospitalCode) {
-        this.behospitalCode = behospitalCode;
-    }
-
-    public Long getCasesId() {
-        return casesId;
-    }
-
-    public void setCasesId(Long casesId) {
-        this.casesId = casesId;
-    }
-
-    public BigDecimal getCasesScore() {
-        return casesScore;
-    }
-
-    public void setCasesScore(BigDecimal casesScore) {
-        this.casesScore = casesScore;
-    }
-
-    public Long getCasesEntryId() {
-        return casesEntryId;
-    }
-
-    public void setCasesEntryId(Long casesEntryId) {
-        this.casesEntryId = casesEntryId;
-    }
-
-    public BigDecimal getScore() {
-        return score;
-    }
-
-    public void setScore(BigDecimal score) {
-        this.score = score;
-    }
-
-    public String getMsg() {
-        return msg;
-    }
-
-    public void setMsg(String msg) {
-        this.msg = msg;
-    }
-
-    public Integer getIsReject() {
-        return isReject;
-    }
-
-    public void setIsReject(Integer isReject) {
-        this.isReject = isReject;
-    }
-
-    public String getIsDeleted() {
-        return isDeleted;
-    }
-
-    public void setIsDeleted(String isDeleted) {
-        this.isDeleted = isDeleted;
-    }
-
-    public Date getGmtCreate() {
-        return gmtCreate;
-    }
-
-    public void setGmtCreate(Date gmtCreate) {
-        this.gmtCreate = gmtCreate;
-    }
-
-    public Date getGmtModified() {
-        return gmtModified;
-    }
-
-    public void setGmtModified(Date gmtModified) {
-        this.gmtModified = gmtModified;
-    }
-
-    public String getCreator() {
-        return creator;
-    }
-
-    public void setCreator(String creator) {
-        this.creator = creator;
-    }
-
-    public String getModifier() {
-        return modifier;
-    }
-
-    public void setModifier(String modifier) {
-        this.modifier = modifier;
-    }
-
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
-    @Override
-    public String toString() {
-        return "QcresultDetail{" +
-                "id=" + id +
-                ", hospitalId=" + hospitalId +
-                ", behospitalCode=" + behospitalCode +
-                ", casesId=" + casesId +
-                ", casesScore=" + casesScore +
-                ", casesEntryId=" + casesEntryId +
-                ", score=" + score +
-                ", isReject=" + isReject +
-                ", isDeleted=" + isDeleted +
-                ", gmtCreate=" + gmtCreate +
-                ", gmtModified=" + gmtModified +
-                ", creator=" + creator +
-                ", modifier=" + modifier +
-                ", remark=" + remark +
-                "}";
-    }
 }

+ 15 - 104
src/main/java/com/diagbot/entity/SysMenu.java

@@ -2,6 +2,8 @@ package com.diagbot.entity;
 
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Getter;
+import lombok.Setter;
 
 import java.io.Serializable;
 import java.util.Date;
@@ -14,6 +16,8 @@ import java.util.Date;
  * @author gaodm
  * @since 2020-04-12
  */
+@Getter
+@Setter
 public class SysMenu implements Serializable {
 
     private static final long serialVersionUID = 1L;
@@ -64,6 +68,17 @@ public class SysMenu implements Serializable {
      */
     private String code;
 
+    /**
+     * 是否在右侧菜单显示(0:不显示,1:显示)
+     */
+    private Integer showStatus;
+
+
+    /**
+     * 是否可以维护(0:不可维护,1:可以维护)
+     */
+    private Integer maintainStatus;
+
     /**
      * 排序,从小到大
      */
@@ -74,108 +89,4 @@ public class SysMenu implements Serializable {
      */
     private String remark;
 
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public String getIsDeleted() {
-        return isDeleted;
-    }
-
-    public void setIsDeleted(String isDeleted) {
-        this.isDeleted = isDeleted;
-    }
-
-    public Date getGmtCreate() {
-        return gmtCreate;
-    }
-
-    public void setGmtCreate(Date gmtCreate) {
-        this.gmtCreate = gmtCreate;
-    }
-
-    public Date getGmtModified() {
-        return gmtModified;
-    }
-
-    public void setGmtModified(Date gmtModified) {
-        this.gmtModified = gmtModified;
-    }
-
-    public String getCreator() {
-        return creator;
-    }
-
-    public void setCreator(String creator) {
-        this.creator = creator;
-    }
-
-    public String getModifier() {
-        return modifier;
-    }
-
-    public void setModifier(String modifier) {
-        this.modifier = modifier;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public Long getParentId() {
-        return parentId;
-    }
-
-    public void setParentId(Long parentId) {
-        this.parentId = parentId;
-    }
-
-    public String getCode() {
-        return code;
-    }
-
-    public void setCode(String code) {
-        this.code = code;
-    }
-
-    public Integer getOrderNo() {
-        return orderNo;
-    }
-
-    public void setOrderNo(Integer orderNo) {
-        this.orderNo = orderNo;
-    }
-
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
-    @Override
-    public String toString() {
-        return "SysMenu{" +
-                "id=" + id +
-                ", isDeleted=" + isDeleted +
-                ", gmtCreate=" + gmtCreate +
-                ", gmtModified=" + gmtModified +
-                ", creator=" + creator +
-                ", modifier=" + modifier +
-                ", name=" + name +
-                ", parentId=" + parentId +
-                ", code=" + code +
-                ", orderNo=" + orderNo +
-                ", remark=" + remark +
-                "}";
-    }
 }

+ 12 - 14
src/main/java/com/diagbot/entity/SysPermission.java

@@ -57,6 +57,11 @@ public class SysPermission implements Serializable {
      */
     private String name;
 
+    /**
+     * 资源编码
+     */
+    private String code;
+
     /**
      * 资源Url
      */
@@ -154,19 +159,12 @@ public class SysPermission implements Serializable {
         this.descritpion = descritpion;
     }
 
-    @Override
-    public String toString() {
-        return "Permission{" +
-                "id=" + id +
-                ", isDeleted=" + isDeleted +
-                ", gmtCreate=" + gmtCreate +
-                ", gmtModified=" + gmtModified +
-                ", creator=" + creator +
-                ", modifier=" + modifier +
-                ", name=" + name +
-                ", permissionUrl=" + permissionUrl +
-                ", method=" + method +
-                ", descritpion=" + descritpion +
-                "}";
+    public String getCode() {
+        return code;
     }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
 }

+ 185 - 0
src/main/java/com/diagbot/entity/SysRole.java

@@ -0,0 +1,185 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 系统角色表
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-27
+ */
+public class SysRole implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 角色ID
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 角色名称
+     */
+    private String name;
+
+    /**
+     * 角色等级
+     */
+    @TableField("roleLevel")
+    private Integer roleLevel;
+
+    /**
+     * 角色描述
+     */
+    private String descritpion;
+
+    /**
+     * 菜单ID:对应角色ID(暂无用处)
+     */
+    @TableField("menuItems")
+    private String menuItems;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Integer getRoleLevel() {
+        return roleLevel;
+    }
+
+    public void setRoleLevel(Integer roleLevel) {
+        this.roleLevel = roleLevel;
+    }
+
+    public String getDescritpion() {
+        return descritpion;
+    }
+
+    public void setDescritpion(String descritpion) {
+        this.descritpion = descritpion;
+    }
+
+    public String getMenuItems() {
+        return menuItems;
+    }
+
+    public void setMenuItems(String menuItems) {
+        this.menuItems = menuItems;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "SysRole{" +
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", name=" + name +
+                ", roleLevel=" + roleLevel +
+                ", descritpion=" + descritpion +
+                ", menuItems=" + menuItems +
+                ", remark=" + remark +
+                "}";
+    }
+}

+ 153 - 0
src/main/java/com/diagbot/entity/SysRoleMenu.java

@@ -0,0 +1,153 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 角色和菜单的映射表
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-27
+ */
+public class SysRoleMenu implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 角色id
+     */
+    private Long roleId;
+
+    /**
+     * 菜单id
+     */
+    private Long menuId;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    public Long getRoleId() {
+        return roleId;
+    }
+
+    public void setRoleId(Long roleId) {
+        this.roleId = roleId;
+    }
+
+    public Long getMenuId() {
+        return menuId;
+    }
+
+    public void setMenuId(Long menuId) {
+        this.menuId = menuId;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "SysRoleMenu{" +
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", roleId=" + roleId +
+                ", menuId=" + menuId +
+                ", remark=" + remark +
+                "}";
+    }
+}

+ 153 - 0
src/main/java/com/diagbot/entity/SysRolePermission.java

@@ -0,0 +1,153 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 角色和资源的映射表
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-27
+ */
+public class SysRolePermission implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 角色id
+     */
+    private Long roleId;
+
+    /**
+     * 资源id
+     */
+    private Long permissionId;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    public Long getRoleId() {
+        return roleId;
+    }
+
+    public void setRoleId(Long roleId) {
+        this.roleId = roleId;
+    }
+
+    public Long getPermissionId() {
+        return permissionId;
+    }
+
+    public void setPermissionId(Long permissionId) {
+        this.permissionId = permissionId;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "SysRolePermission{" +
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", roleId=" + roleId +
+                ", permissionId=" + permissionId +
+                ", remark=" + remark +
+                "}";
+    }
+}

+ 27 - 17
src/main/java/com/diagbot/entity/SysTaskCron.java

@@ -2,8 +2,9 @@ package com.diagbot.entity;
 
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
-import java.time.LocalDateTime;
+
 import java.io.Serializable;
+import java.util.Date;
 
 /**
  * <p>
@@ -31,12 +32,12 @@ public class SysTaskCron implements Serializable {
     /**
      * 记录创建时间
      */
-    private LocalDateTime gmtCreate;
+    private Date gmtCreate;
 
     /**
      * 记录修改时间,如果时间是1970年则表示纪录未修改
      */
-    private LocalDateTime gmtModified;
+    private Date gmtModified;
 
     /**
      * 创建人,0表示无创建人值
@@ -75,6 +76,7 @@ public class SysTaskCron implements Serializable {
     public void setId(Long id) {
         this.id = id;
     }
+
     public String getIsDeleted() {
         return isDeleted;
     }
@@ -82,20 +84,23 @@ public class SysTaskCron implements Serializable {
     public void setIsDeleted(String isDeleted) {
         this.isDeleted = isDeleted;
     }
-    public LocalDateTime getGmtCreate() {
+
+    public Date getGmtCreate() {
         return gmtCreate;
     }
 
-    public void setGmtCreate(LocalDateTime gmtCreate) {
+    public void setGmtCreate(Date gmtCreate) {
         this.gmtCreate = gmtCreate;
     }
-    public LocalDateTime getGmtModified() {
+
+    public Date getGmtModified() {
         return gmtModified;
     }
 
-    public void setGmtModified(LocalDateTime gmtModified) {
+    public void setGmtModified(Date gmtModified) {
         this.gmtModified = gmtModified;
     }
+
     public String getCreator() {
         return creator;
     }
@@ -103,6 +108,7 @@ public class SysTaskCron implements Serializable {
     public void setCreator(String creator) {
         this.creator = creator;
     }
+
     public String getModifier() {
         return modifier;
     }
@@ -110,6 +116,7 @@ public class SysTaskCron implements Serializable {
     public void setModifier(String modifier) {
         this.modifier = modifier;
     }
+
     public String getCronCode() {
         return cronCode;
     }
@@ -117,6 +124,7 @@ public class SysTaskCron implements Serializable {
     public void setCronCode(String cronCode) {
         this.cronCode = cronCode;
     }
+
     public String getCron() {
         return cron;
     }
@@ -124,6 +132,7 @@ public class SysTaskCron implements Serializable {
     public void setCron(String cron) {
         this.cron = cron;
     }
+
     public Integer getIsUsed() {
         return isUsed;
     }
@@ -131,6 +140,7 @@ public class SysTaskCron implements Serializable {
     public void setIsUsed(Integer isUsed) {
         this.isUsed = isUsed;
     }
+
     public String getRemark() {
         return remark;
     }
@@ -142,15 +152,15 @@ public class SysTaskCron implements Serializable {
     @Override
     public String toString() {
         return "SysTaskCron{" +
-            "id=" + id +
-            ", isDeleted=" + isDeleted +
-            ", gmtCreate=" + gmtCreate +
-            ", gmtModified=" + gmtModified +
-            ", creator=" + creator +
-            ", modifier=" + modifier +
-            ", cronCode=" + cronCode +
-            ", cron=" + cron +
-            ", remark=" + remark +
-        "}";
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", cronCode=" + cronCode +
+                ", cron=" + cron +
+                ", remark=" + remark +
+                "}";
     }
 }

+ 35 - 12
src/main/java/com/diagbot/entity/SysUser.java

@@ -71,6 +71,11 @@ public class SysUser implements Serializable {
      */
     private Integer type;
 
+    /**
+     * 是否启用(0:停用,1:启用)
+     */
+    private Integer status;
+
     /**
      * 备注
      */
@@ -83,6 +88,7 @@ public class SysUser implements Serializable {
     public void setId(Long id) {
         this.id = id;
     }
+
     public String getIsDeleted() {
         return isDeleted;
     }
@@ -90,6 +96,7 @@ public class SysUser implements Serializable {
     public void setIsDeleted(String isDeleted) {
         this.isDeleted = isDeleted;
     }
+
     public Date getGmtCreate() {
         return gmtCreate;
     }
@@ -97,6 +104,7 @@ public class SysUser implements Serializable {
     public void setGmtCreate(Date gmtCreate) {
         this.gmtCreate = gmtCreate;
     }
+
     public Date getGmtModified() {
         return gmtModified;
     }
@@ -104,6 +112,7 @@ public class SysUser implements Serializable {
     public void setGmtModified(Date gmtModified) {
         this.gmtModified = gmtModified;
     }
+
     public String getCreator() {
         return creator;
     }
@@ -111,6 +120,7 @@ public class SysUser implements Serializable {
     public void setCreator(String creator) {
         this.creator = creator;
     }
+
     public String getModifier() {
         return modifier;
     }
@@ -118,6 +128,7 @@ public class SysUser implements Serializable {
     public void setModifier(String modifier) {
         this.modifier = modifier;
     }
+
     public String getUsername() {
         return username;
     }
@@ -125,6 +136,7 @@ public class SysUser implements Serializable {
     public void setUsername(String username) {
         this.username = username;
     }
+
     public String getPassword() {
         return password;
     }
@@ -132,6 +144,7 @@ public class SysUser implements Serializable {
     public void setPassword(String password) {
         this.password = password;
     }
+
     public String getLinkman() {
         return linkman;
     }
@@ -139,6 +152,7 @@ public class SysUser implements Serializable {
     public void setLinkman(String linkman) {
         this.linkman = linkman;
     }
+
     public Integer getType() {
         return type;
     }
@@ -146,6 +160,15 @@ public class SysUser implements Serializable {
     public void setType(Integer type) {
         this.type = type;
     }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
     public String getRemark() {
         return remark;
     }
@@ -157,17 +180,17 @@ public class SysUser implements Serializable {
     @Override
     public String toString() {
         return "User{" +
-            "id=" + id +
-            ", isDeleted=" + isDeleted +
-            ", gmtCreate=" + gmtCreate +
-            ", gmtModified=" + gmtModified +
-            ", creator=" + creator +
-            ", modifier=" + modifier +
-            ", username=" + username +
-            ", password=" + password +
-            ", linkman=" + linkman +
-            ", type=" + type +
-            ", remark=" + remark +
-        "}";
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", username=" + username +
+                ", password=" + password +
+                ", linkman=" + linkman +
+                ", type=" + type +
+                ", remark=" + remark +
+                "}";
     }
 }

+ 167 - 0
src/main/java/com/diagbot/entity/SysUserDept.java

@@ -0,0 +1,167 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 用户-医院科室映射表
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-28
+ */
+public class SysUserDept implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 用户主键
+     */
+    private Long userId;
+
+    /**
+     * 医院ID
+     */
+    private Long hospitalId;
+
+    /**
+     * 科室编码(HIS导入)
+     */
+    private String deptId;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+
+    public String getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(String deptId) {
+        this.deptId = deptId;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "SysUserDept{" +
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", userId=" + userId +
+                ", hospitalId=" + hospitalId +
+                ", deptId=" + deptId +
+                ", remark=" + remark +
+                "}";
+    }
+}

+ 153 - 0
src/main/java/com/diagbot/entity/SysUserHospital.java

@@ -0,0 +1,153 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 用户-机构表映射表
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-28
+ */
+public class SysUserHospital implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 用户主键
+     */
+    private Long userId;
+
+    /**
+     * 医院ID
+     */
+    private Long hospitalId;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "SysUserHospital{" +
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", userId=" + userId +
+                ", hospitalId=" + hospitalId +
+                ", remark=" + remark +
+                "}";
+    }
+}

+ 153 - 0
src/main/java/com/diagbot/entity/SysUserRole.java

@@ -0,0 +1,153 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 系统用户角色关联表
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-28
+ */
+public class SysUserRole implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 用户和角色关联ID
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 系统用户表.用户ID
+     */
+    private Long userId;
+
+    /**
+     * 系统角色表.角色ID
+     */
+    private Long roleId;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    public Long getRoleId() {
+        return roleId;
+    }
+
+    public void setRoleId(Long roleId) {
+        this.roleId = roleId;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "SysUserRole{" +
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", userId=" + userId +
+                ", roleId=" + roleId +
+                ", remark=" + remark +
+                "}";
+    }
+}

+ 21 - 0
src/main/java/com/diagbot/entity/wrapper/QuestionInfoWrapper.java

@@ -0,0 +1,21 @@
+package com.diagbot.entity.wrapper;
+
+import com.diagbot.entity.QcQuestionInfo;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 标签扩展表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-11-15
+ */
+@Getter
+@Setter
+public class QuestionInfoWrapper extends QcQuestionInfo {
+
+    private Long parentQuestion; //父级问题ID
+
+}

+ 42 - 0
src/main/java/com/diagbot/entity/wrapper/QuestionMappingWrapper.java

@@ -0,0 +1,42 @@
+package com.diagbot.entity.wrapper;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 标签映射表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-12-03
+ */
+@Getter
+@Setter
+public class QuestionMappingWrapper implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 上级question
+     */
+    private Long parentQuestion;
+
+    /**
+     * 下级question
+     */
+    private Long sonQuestion;
+
+    /**
+     * 排序号
+     */
+    private Integer orderNo;
+
+}

+ 35 - 0
src/main/java/com/diagbot/entity/wrapper/QuestionWrapper.java

@@ -0,0 +1,35 @@
+package com.diagbot.entity.wrapper;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * <p>
+ * 标签保存参数
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-12-03
+ */
+
+@Data
+public class QuestionWrapper implements Serializable {
+    private Long id; //主键
+    private Long hospitalId; //医院ID
+    private Long modeId; //数据模块ID
+    private String tagName; //标签名
+    private String name; //界面名称
+    private String val; // value
+    private Integer tagType; //标签显示类型
+    private Integer controlType; //控件类型
+    private Integer retract; // 缩进(0:不缩进 1:缩进)
+    private Integer addLine; // 换行(0:不换行,1:换行)
+    private Integer bold; //换行(0:不换行,1:加粗)
+    private Integer position; //显示位置(1:靠右显示)
+    private String casesEntryIds; //质控条目id列表
+    private String remark; //备注
+    private List<QuestionMappingWrapper> questionMappings = new ArrayList<>(); //映射关系
+}

+ 2 - 1
src/main/java/com/diagbot/entity/wrapper/SysMenuWrapper.java

@@ -1,5 +1,6 @@
 package com.diagbot.entity.wrapper;
 
+import com.diagbot.dto.SysUserPermissionDTO;
 import com.diagbot.entity.SysMenu;
 import lombok.Getter;
 import lombok.Setter;
@@ -15,6 +16,6 @@ import java.util.List;
 @Getter
 @Setter
 public class SysMenuWrapper extends SysMenu {
-
+    private List<SysUserPermissionDTO> sysUserPermissionDTOList = new ArrayList<>();
     private List<SysMenuWrapper> subMenuList = new ArrayList<>();
 }

+ 50 - 0
src/main/java/com/diagbot/enums/StatusEnum.java

@@ -0,0 +1,50 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2018年11月21日 下午2:31:42
+ */
+public enum StatusEnum implements KeyedNamed {
+    Disable(0, "禁用"),
+    Enable(1, "启用");
+
+    @Setter
+    private int key;
+
+    @Setter
+    private String name;
+
+    StatusEnum(int key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static StatusEnum getEnum(int key) {
+        for (StatusEnum item : StatusEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(int key) {
+        StatusEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}
+

+ 44 - 0
src/main/java/com/diagbot/facade/BasDeptInfoFacade.java

@@ -0,0 +1,44 @@
+package com.diagbot.facade;
+
+import com.diagbot.dto.BasDeptInfoDTO;
+import com.diagbot.service.impl.BasDeptInfoServiceImpl;
+import com.diagbot.util.SysUserUtils;
+import com.diagbot.vo.BasDeptInfoVO;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/4/27 18:58
+ */
+@Component
+public class BasDeptInfoFacade extends BasDeptInfoServiceImpl {
+
+    /**
+     * 获取医院科室下拉列表信息
+     *
+     * @param basDeptInfoVO 搜索参数
+     * @return 医院科室下拉列表信息
+     */
+    public List<BasDeptInfoDTO> listForUser(BasDeptInfoVO basDeptInfoVO) {
+        basDeptInfoVO.setHospitalId(Long.valueOf(SysUserUtils.getCurrentHospitalID()));
+        List<BasDeptInfoDTO> basDeptInfoDTOList = this.getList(basDeptInfoVO);
+        return basDeptInfoDTOList;
+    }
+
+
+    /**
+     * 获取医院用户下拉列表信息
+     *
+     * @param basDeptInfoVO 搜索参数
+     * @return 医院用户下拉列表信息
+     */
+    public List<BasDeptInfoDTO> getListUserFac(BasDeptInfoVO basDeptInfoVO) {
+        basDeptInfoVO.setUserId(Long.valueOf(SysUserUtils.getCurrentPrincipleID()));
+        basDeptInfoVO.setHospitalId(Long.valueOf(SysUserUtils.getCurrentHospitalID()));
+        List<BasDeptInfoDTO> basDeptInfoDTOList = this.getListUser(basDeptInfoVO);
+        return basDeptInfoDTOList;
+    }
+}

+ 105 - 18
src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

@@ -16,6 +16,7 @@ import com.diagbot.dto.QcCasesEntryDTO;
 import com.diagbot.dto.QcModeDTO;
 import com.diagbot.dto.QcResultApiDTO;
 import com.diagbot.dto.QcResultDTO;
+import com.diagbot.dto.QuestionEntryDTO;
 import com.diagbot.dto.RecordContentDTO;
 import com.diagbot.dto.Response;
 import com.diagbot.entity.BehospitalInfo;
@@ -23,7 +24,6 @@ import com.diagbot.entity.DoctorAdvice;
 import com.diagbot.entity.HomeDiagnoseInfo;
 import com.diagbot.entity.HomeOperationInfo;
 import com.diagbot.entity.HomePage;
-import com.diagbot.entity.QcCasesEntryPagedata;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
@@ -34,6 +34,7 @@ import com.diagbot.util.EncrypDES;
 import com.diagbot.util.EntityUtil;
 import com.diagbot.util.ListUtil;
 import com.diagbot.util.MapUtil;
+import com.diagbot.util.StringUtil;
 import com.diagbot.util.SysUserUtils;
 import com.diagbot.vo.AlgorithmVO;
 import com.diagbot.vo.AnalyzeApiVO;
@@ -53,6 +54,7 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Date;
 import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -96,6 +98,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
     QcCasesEntryPagedataFacade qcCasesEntryPagedataFacade;
     @Value("${encrypt.enable}")
     Boolean encryptFlag;
+    @Autowired
+    QcQuestionFacade qcQuestionFacade;
 
     public IPage<BehospitalInfoDTO> pageFac(BehospitalPageVO behospitalPageVO) {
         //入参验证
@@ -168,22 +172,20 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             AnalyzeVO analyzeVO = new AnalyzeVO();
             BeanUtil.copyProperties(getDetailVO, analyzeVO);
             List<MsgDTO> msgDTOList = getMsg(analyzeVO);
-            List<Long> caseEntryId = msgDTOList.stream().map(r -> r.getCasesEntryId()).collect(Collectors.toList());
-            if (ListUtil.isNotEmpty(caseEntryId)) {
-                List<QcCasesEntryPagedata> qcCasesEntryPagedataList = qcCasesEntryPagedataFacade.list(new QueryWrapper<QcCasesEntryPagedata>()
-                        .eq("is_deleted", IsDeleteEnum.N.getKey())
-                        .eq("hospital_id", hospitalId)
-                        .in("cases_entry_id", caseEntryId)
-                );
-                Map<Long, List<QcCasesEntryPagedata>> pageKey = EntityUtil.makeEntityListMap(qcCasesEntryPagedataList, "casesEntryId");
+            if (ListUtil.isNotEmpty(msgDTOList)) {
+                // 从qc_question_info的cases_entry_ids获取
+                Map<String, Object> paramMap = new HashMap<>();
+                paramMap.put("hospitalId", hospitalId);
+                paramMap.put("casesEntryIds", msgDTOList.stream().map(r -> r.getCasesEntryId()).collect(Collectors.toList()));
+                Map<Long, List<QuestionEntryDTO>> quesEntryMap = qcQuestionFacade.getByCaseEntryIdsFac(paramMap);
                 for (MsgDTO msgDTO : msgDTOList) {
-                    List<QcCasesEntryPagedata> pagedata = pageKey.get(msgDTO.getCasesEntryId());
-                    if (ListUtil.isNotEmpty(pagedata)) {
-                        msgDTO.setPageKeyList(pagedata.stream().map(r -> r.getPageKey()).collect(Collectors.toList()));
+                    if (quesEntryMap.get(msgDTO.getCasesEntryId()) != null) {
+                        msgDTO.setPageKeyList(quesEntryMap.get(msgDTO.getCasesEntryId())
+                                .stream().map(r -> r.getId()).collect(Collectors.toList()));
                     }
                 }
             }
-
+            // 根据模块分组
             Map<String, List<MsgDTO>> msgMap = EntityUtil.makeEntityListMap(msgDTOList, "modelName");
             res.put("msg", msgMap);
         }
@@ -317,12 +319,28 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         //根据质控结果获取质控条目
         QcResultAlgQueryVO qcResultAlgQueryVO = new QcResultAlgQueryVO();
         List<String> codeList = new ArrayList<>();
-        for (Map.Entry<String, Map<String, String>> output : outputInfo.getResult().entrySet()) {
-            codeList.add(output.getKey());
+        // code和info的映射map
+        Map<String, String> codeToInfoMap = new LinkedHashMap<>();
+        Map<String, Map<String, String>> codeMap = outputInfo.getResult();
+        for (String key : codeMap.keySet()) {
+            codeList.add(key);
+            Map<String, String> mapInfo = codeMap.get(key);
+            if (mapInfo != null && StringUtil.isNotBlank(mapInfo.get("info"))) {
+                codeToInfoMap.put(key, mapInfo.get("info"));
+            }
         }
         qcResultAlgQueryVO.setCodeList(codeList);
         qcResultAlgQueryVO.setHospitalId(hospitalId);
         List<QcResultAlgVO> qcResultAlgVOList = qcCasesEntryFacade.getQcResultAlgVO(qcResultAlgQueryVO);
+
+        // 对info赋值
+        for(QcResultAlgVO bean : qcResultAlgVOList) {
+            String info = codeToInfoMap.get(bean.getCode());
+            if (StringUtil.isNotBlank(info)) {
+                bean.setInfo(info);
+            }
+        }
+
         // 评分
         AlgorithmVO algorithmVO = new AlgorithmVO();
         algorithmVO.setType(0);
@@ -338,9 +356,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         Date date = qcresultInfoFacade.saveQcResult(algorithmDTO, algorithmVO, analyzeVO, pageData, menuData, analyzeVO.getIsTask());
 
         // 返回提示信息
-        List<MsgDTO> msgDTOList = getMsg(analyzeVO);
-        Map<String, List<MsgDTO>> msgMap = EntityUtil.makeEntityListMap(msgDTOList, "modelName");
-
+//        List<MsgDTO> msgDTOList = getMsg(analyzeVO);
+//        Map<String, List<MsgDTO>> msgMap = EntityUtil.makeEntityListMap(msgDTOList, "modelName");
 
         //返回参数组装
         AnalyzeDTO analyzeDTO = new AnalyzeDTO();
@@ -681,4 +698,74 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         res.put("details", msgMap);
         return res;
     }
+
+    /**
+     *
+     * @param behospitalPageVO
+     * @return
+     */
+    public IPage<BehospitalInfoDTO> pagePerson(BehospitalPageVO behospitalPageVO) {
+        //入参验证
+        //入院时间
+        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateStart()) {
+            behospitalPageVO.setBehosDateStart(DateUtil.getFirstTimeOfDay(behospitalPageVO.getBehosDateStart()));
+        }
+        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateEnd()) {
+            behospitalPageVO.setBehosDateEnd(DateUtil.getLastTimeOfDay(behospitalPageVO.getBehosDateEnd()));
+        }
+        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateStart() && null != behospitalPageVO.getBehosDateEnd()) {
+            if (DateUtil.after(behospitalPageVO.getBehosDateStart(), behospitalPageVO.getBehosDateEnd())) {
+                throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "入院时间的开始时间必须小于结束时间!");
+            }
+        }
+        //出院时间
+        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateStart()) {
+            behospitalPageVO.setLeaveHosDateStart(DateUtil.getFirstTimeOfDay(behospitalPageVO.getLeaveHosDateStart()));
+        }
+        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateEnd()) {
+            behospitalPageVO.setLeaveHosDateEnd(DateUtil.getLastTimeOfDay(behospitalPageVO.getLeaveHosDateEnd()));
+        }
+        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateStart() && null != behospitalPageVO.getLeaveHosDateEnd()) {
+            if (DateUtil.after(behospitalPageVO.getLeaveHosDateStart(), behospitalPageVO.getLeaveHosDateEnd())) {
+                throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "出院时间的开始时间必须小于结束时间!");
+            }
+        }
+        behospitalPageVO.setHospitalId(Long.parseLong(SysUserUtils.getCurrentHospitalID()));
+        behospitalPageVO.setUserId(Long.parseLong(SysUserUtils.getCurrentPrincipleID()));
+        IPage<BehospitalInfoDTO> res = getPageByPerson(behospitalPageVO);
+        return res;
+    }
+
+    public IPage<BehospitalInfoDTO> pageDept(BehospitalPageVO behospitalPageVO) {
+        //入参验证
+        //入院时间
+        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateStart()) {
+            behospitalPageVO.setBehosDateStart(DateUtil.getFirstTimeOfDay(behospitalPageVO.getBehosDateStart()));
+        }
+        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateEnd()) {
+            behospitalPageVO.setBehosDateEnd(DateUtil.getLastTimeOfDay(behospitalPageVO.getBehosDateEnd()));
+        }
+        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateStart() && null != behospitalPageVO.getBehosDateEnd()) {
+            if (DateUtil.after(behospitalPageVO.getBehosDateStart(), behospitalPageVO.getBehosDateEnd())) {
+                throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "入院时间的开始时间必须小于结束时间!");
+            }
+        }
+        //出院时间
+        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateStart()) {
+            behospitalPageVO.setLeaveHosDateStart(DateUtil.getFirstTimeOfDay(behospitalPageVO.getLeaveHosDateStart()));
+        }
+        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateEnd()) {
+            behospitalPageVO.setLeaveHosDateEnd(DateUtil.getLastTimeOfDay(behospitalPageVO.getLeaveHosDateEnd()));
+        }
+        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateStart() && null != behospitalPageVO.getLeaveHosDateEnd()) {
+            if (DateUtil.after(behospitalPageVO.getLeaveHosDateStart(), behospitalPageVO.getLeaveHosDateEnd())) {
+                throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "出院时间的开始时间必须小于结束时间!");
+            }
+        }
+        behospitalPageVO.setHospitalId(Long.parseLong(SysUserUtils.getCurrentHospitalID()));
+        behospitalPageVO.setUserId(Long.parseLong(SysUserUtils.getCurrentPrincipleID()));
+        IPage<BehospitalInfoDTO> res = getPageByDept(behospitalPageVO);
+        return res;
+    }
+
 }

+ 4 - 4
src/main/java/com/diagbot/facade/ConsoleFacade.java

@@ -127,18 +127,18 @@ public class ConsoleFacade {
         qcresultFilterVO.setLevel("丙");
         int qcresultByGradeType2AndLevel3Count = qcresultInfoFacade.getQcresultSelectively(qcresultFilterVO);
         if (qcresultFilterVO.getType().equals(1)) {
-            retMap.put("本月不合格病历-人工", qcresultByGradeType2AndLevel3Count);
+            retMap.put("本月丙级病历-人工", qcresultByGradeType2AndLevel3Count);
         } else if (qcresultFilterVO.getType().equals(2)) {
-            retMap.put("本年不合格病历-人工", qcresultByGradeType2AndLevel3Count);
+            retMap.put("本年丙级病历-人工", qcresultByGradeType2AndLevel3Count);
         }
         //本月乙级病历-机器
         qcresultFilterVO.setGradeType(1);
         qcresultFilterVO.setLevel("丙");
         int qcresultByGradeType1AndLevel3Count = qcresultInfoFacade.getQcresultSelectively(qcresultFilterVO);
         if (filterVO.getType().equals(1)) {
-            retMap.put("本月不合格病历-机器", qcresultByGradeType1AndLevel3Count);
+            retMap.put("本月丙级病历-机器", qcresultByGradeType1AndLevel3Count);
         } else if (filterVO.getType().equals(2)) {
-            retMap.put("本年不合格病历-机器", qcresultByGradeType1AndLevel3Count);
+            retMap.put("本年丙级病历-机器", qcresultByGradeType1AndLevel3Count);
         }
         return retMap;
     }

+ 14 - 0
src/main/java/com/diagbot/facade/QcModuleDetailFacade.java

@@ -0,0 +1,14 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.QcModuleDetailServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @Author:zhoutg
+ * @time: 2018/11/23 11:37
+ */
+@Component
+public class QcModuleDetailFacade extends QcModuleDetailServiceImpl {
+
+}

+ 103 - 0
src/main/java/com/diagbot/facade/QcModuleInfoFacade.java

@@ -0,0 +1,103 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.dto.GetModuleInfoOneDTO;
+import com.diagbot.dto.QcModuleDetailDTO;
+import com.diagbot.dto.QuestionDTO;
+import com.diagbot.entity.QcModuleDetail;
+import com.diagbot.entity.QcModuleInfo;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.service.impl.QcModuleInfoServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.vo.GetModuleInfoOneVO;
+import com.diagbot.vo.GetModuleMapVO;
+import com.diagbot.vo.QuestionIdsVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @Author:zhoutg
+ * @time: 2018/11/23 11:37
+ */
+@Component
+public class QcModuleInfoFacade extends QcModuleInfoServiceImpl {
+
+    @Autowired
+    QcModuleDetailFacade qcModuleDetailFacade;
+    @Autowired
+    QcQuestionFacade qcQuestionFacade;
+
+    /**
+     * 根据id获取模板信息
+     *
+     * @param getModuleInfoOneVO
+     * @return
+     */
+    public GetModuleInfoOneDTO getByIdFac(GetModuleInfoOneVO getModuleInfoOneVO) {
+        //获取模板信息
+        GetModuleInfoOneDTO getModuleInfoOneDTO = this.getById(getModuleInfoOneVO);
+
+        if (null == getModuleInfoOneDTO) {
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
+                    "模板已删除【" + getModuleInfoOneVO.getModuleId() + "】");
+        }
+        List<QcModuleDetail> qcModuleDetailList = qcModuleDetailFacade.list(new QueryWrapper<QcModuleDetail>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("module_id", getModuleInfoOneDTO.getId())
+                .orderByAsc("order_no")
+        );
+        List<QcModuleDetailDTO> qcModuleDetailDTOList = BeanUtil.listCopyTo(qcModuleDetailList, QcModuleDetailDTO.class);
+
+        // 根据questionId获取所有的标签
+        List<Long> questionIds = qcModuleDetailList.stream().map(r -> r.getQuestionId()).collect(Collectors.toList());
+        QuestionIdsVO questionIdsVO = new QuestionIdsVO();
+        questionIdsVO.setIds(questionIds);
+        Map<Long, QuestionDTO> questionDTOMap = qcQuestionFacade.getByIds(questionIdsVO);
+        for (QcModuleDetailDTO bean : qcModuleDetailDTOList) {
+            QuestionDTO questionDTO = questionDTOMap.get(bean.getQuestionId());
+            if (questionDTO != null) {
+                bean.setQuestionDTO(questionDTO);
+            }
+        }
+        Map<Integer, List<QcModuleDetailDTO>> map = EntityUtil.makeEntityListMap(qcModuleDetailDTOList, "groupId");
+        getModuleInfoOneDTO.setModuleDetail(map);
+        return getModuleInfoOneDTO;
+    }
+
+    /**
+     * 根据模块获取模板信息
+     *
+     * @param getModuleMapVO
+     * @return
+     */
+//    @Cacheable(value = "cache", key = "'qcmodule'")
+    public Map<Long, GetModuleInfoOneDTO> getModuleMap(GetModuleMapVO getModuleMapVO) {
+        Map<Long, GetModuleInfoOneDTO> res = new LinkedHashMap<>();
+        List<QcModuleInfo> qcModuleInfoList = this.list(new QueryWrapper<QcModuleInfo>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq(getModuleMapVO.getModeId() != null, "mode_id", getModuleMapVO.getModeId())
+                .eq("hospital_id", getModuleMapVO.getHospitalId())
+        );
+        List<Long> ids = qcModuleInfoList.stream().map(r -> r.getId()).collect(Collectors.toList());
+        if (ListUtil.isEmpty(ids)) {
+            return new HashMap<>();
+        }
+        GetModuleInfoOneVO getModuleInfoOneVO = new GetModuleInfoOneVO();
+        for (Long id : ids) {
+            getModuleInfoOneVO.setModuleId(id);
+            res.put(id, getByIdFac(getModuleInfoOneVO));
+        }
+        return res;
+    }
+}

+ 117 - 0
src/main/java/com/diagbot/facade/QcQuestionFacade.java

@@ -0,0 +1,117 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.dto.QuestionDTO;
+import com.diagbot.dto.QuestionEntryDTO;
+import com.diagbot.entity.QcQuestionInfo;
+import com.diagbot.entity.wrapper.QuestionInfoWrapper;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.impl.QcQuestionInfoServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.vo.QuestionIdsVO;
+import org.springframework.stereotype.Component;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @Author:zhoutg
+ * @time: 2018/11/23 11:37
+ */
+@Component
+public class QcQuestionFacade extends QcQuestionInfoServiceImpl {
+
+    /**
+     * 根据参数返回标签内容
+     *
+     * @param questionVO 获取标签内容参数
+     * @return 标签内容
+     */
+    public QuestionDTO getById(QuestionVO questionVO) {
+        Map paramMap = new HashMap<>();
+        paramMap.put("id", questionVO.getId());
+
+        QcQuestionInfo questionInfo = this.getOne(new QueryWrapper<QcQuestionInfo>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("id", questionVO.getId()), false
+        );
+        if (questionInfo == null) { //无数据直接返回,不通过报错的形式返回
+            return new QuestionDTO();
+        }
+        QuestionDTO res = new QuestionDTO();
+        BeanUtil.copyProperties(questionInfo, res);
+
+        //获取子标签
+        List<QuestionInfoWrapper> questionMapping = this.getByQuestionMapping(paramMap);
+        List<QuestionDTO> sonQuestionList = BeanUtil.listCopyTo(questionMapping, QuestionDTO.class);
+        res.setQuestionMapping(sonQuestionList);
+        return res;
+    }
+
+
+//    /**
+//     * 查询多个id返回标签内容
+//     *
+//     * @param questionIdsVO 获取标签内容参数
+//     * @return 标签内容
+//     */
+//    public Map<Long, QuestionDTO> getByIds(QuestionIdsVO questionIdsVO) {
+//        Map<Long, QuestionDTO> data = new HashMap<>();
+//        if (StringUtil.isEmpty(questionIdsVO.getIds())) {
+//            return data;
+//        }
+//        String[] ids = questionIdsVO.getIds().split(",");
+//        for (String id : ids) {
+//            QuestionVO questionVO = new QuestionVO();
+//            questionVO.setId(Long.parseLong(id));
+//            QuestionDTO item = this.getById(questionVO);
+//            data.put(item.getId(), item);
+//        }
+//        return data;
+//    }
+
+
+    /**
+     * 查询多个id返回标签内容【优化版】
+     *
+     * @param questionIdsVO 获取标签内容参数
+     * @return 标签内容Fac
+     */
+    public Map<Long, QuestionDTO> getByIds(QuestionIdsVO questionIdsVO) {
+        List<Long> idList = questionIdsVO.getIds();
+        if (ListUtil.isEmpty(idList)) {
+            return new HashMap<>();
+        }
+        List<QcQuestionInfo> qcQuestionInfoList = this.list(new QueryWrapper<QcQuestionInfo>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .in("id", idList)
+        );
+        List<QuestionDTO> questionDTOList = BeanUtil.listCopyTo(qcQuestionInfoList, QuestionDTO.class);
+        if (ListUtil.isNotEmpty(questionDTOList)) {
+            List<Long> ids = questionDTOList.stream().map(r -> r.getId()).collect(Collectors.toList());
+            Map paramMap = new HashMap<>();
+            paramMap.put("ids", ids);
+            //获取子标签
+            List<QuestionInfoWrapper> questionMapping = this.getByQuestionMapping(paramMap);
+            Map<Long, List<QuestionInfoWrapper>> map = EntityUtil.makeEntityListMap(questionMapping, "parentQuestion");
+            for (QuestionDTO bean : questionDTOList) {
+                List<QuestionInfoWrapper> questionInfoWrapperList = map.get(bean.getId());
+                if (ListUtil.isNotEmpty(questionInfoWrapperList)) {
+                    bean.setQuestionMapping(BeanUtil.listCopyTo(questionInfoWrapperList, QuestionDTO.class));
+                }
+            }
+        }
+        return questionDTOList.stream().collect(Collectors.toMap(r -> r.getId(), r -> r));
+    }
+
+
+    public Map<Long, List<QuestionEntryDTO>> getByCaseEntryIdsFac(Map map) {
+        List<QuestionEntryDTO> questionEntryDTOList = this.getByCaseEntryIds(map);
+        return  EntityUtil.makeEntityListMap(questionEntryDTOList, "casesEntryId");
+    }
+}

+ 14 - 0
src/main/java/com/diagbot/facade/QcQuestionMappingFacade.java

@@ -0,0 +1,14 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.QcQuestionMappingServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author zhoutg
+ * @Description:
+ * @date 2020-03-10 16:32
+ */
+@Component
+public class QcQuestionMappingFacade extends QcQuestionMappingServiceImpl {
+
+}

+ 15 - 0
src/main/java/com/diagbot/facade/QuestionVO.java

@@ -0,0 +1,15 @@
+package com.diagbot.facade;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: zhoutg
+ * @time: 2018/8/6 10:16
+ */
+@Getter
+@Setter
+public class QuestionVO {
+    private Long id;
+}

+ 206 - 0
src/main/java/com/diagbot/facade/SysRoleFacade.java

@@ -0,0 +1,206 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.diagbot.dto.SysMenuPermissionDTO;
+import com.diagbot.dto.SysPermissionDTO;
+import com.diagbot.dto.SysRoleDTO;
+import com.diagbot.dto.SysRoleMenuDTO;
+import com.diagbot.entity.SysRole;
+import com.diagbot.entity.SysRoleMenu;
+import com.diagbot.entity.SysRolePermission;
+import com.diagbot.entity.SysUserRole;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.impl.SysRoleMenuServiceImpl;
+import com.diagbot.service.impl.SysRolePermissionServiceImpl;
+import com.diagbot.service.impl.SysRoleServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.SysUserUtils;
+import com.diagbot.vo.SysMenuSaveVO;
+import com.diagbot.vo.SysPermissionSaveVO;
+import com.diagbot.vo.SysRoleMenuQueryVO;
+import com.diagbot.vo.SysRoleMenuSaveVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/4/27 10:13
+ */
+@Component
+public class SysRoleFacade extends SysRoleServiceImpl {
+    @Autowired
+    @Qualifier("sysRoleMenuServiceImpl")
+    private SysRoleMenuServiceImpl sysRoleMenuService;
+
+    @Autowired
+    @Qualifier("sysRolePermissionServiceImpl")
+    private SysRolePermissionServiceImpl sysRolePermissionService;
+
+    @Autowired
+    private SysUserRoleFacade sysUserRoleFacade;
+
+    @Autowired
+    private TokenFacade tokenFacade;
+
+    /**
+     * 获取角色列表信息
+     *
+     * @return 角色列表信息
+     */
+    public List<SysRoleDTO> listFac() {
+        List<SysRole> sysRoleList = this.list(new QueryWrapper<SysRole>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .gt("id", -1L)
+        );
+        return BeanUtil.listCopyTo(sysRoleList, SysRoleDTO.class);
+    }
+
+    /**
+     * 获取角色下拉列表信息
+     *
+     * @return 角色下拉列表信息
+     */
+    public List<SysRoleDTO> listForUser() {
+        List<SysRole> sysRoleList = this.list(new QueryWrapper<SysRole>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+        );
+        return BeanUtil.listCopyTo(sysRoleList, SysRoleDTO.class);
+    }
+
+    /**
+     * 获取角色菜权限单等数据
+     *
+     * @param sysRoleMenuQueryVO 获取角色菜权限单入参
+     * @return 是否成功
+     */
+    public List<SysRoleMenuDTO> getRoleMenu(SysRoleMenuQueryVO sysRoleMenuQueryVO) {
+        List<SysMenuPermissionDTO> sysMenuPermissionDTOList = this.getMenuPermission(sysRoleMenuQueryVO);
+        List<SysRoleMenuDTO> sysRoleMenuDTOList = new ArrayList<>();
+        List<Long> menuId = new ArrayList<>();
+        for (SysMenuPermissionDTO sysMenuPermissionDTO : sysMenuPermissionDTOList) {
+            if (!menuId.contains(sysMenuPermissionDTO.getMenuId())) {
+                menuId.add(sysMenuPermissionDTO.getMenuId());
+                SysRoleMenuDTO sysRoleMenuDTO = new SysRoleMenuDTO();
+                BeanUtil.copyProperties(sysMenuPermissionDTO, sysRoleMenuDTO);
+                sysRoleMenuDTOList.add(sysRoleMenuDTO);
+            }
+        }
+        Map<Long, List<SysMenuPermissionDTO>> menuPermissionMap = EntityUtil.makeEntityListMap(sysMenuPermissionDTOList, "menuId");
+        Map<Long, List<SysRoleMenuDTO>> menuMap = EntityUtil.makeEntityListMap(sysRoleMenuDTOList, "parentId");
+        List<SysRoleMenuDTO> menuRes = menuMap.get(-1L);
+        for (SysRoleMenuDTO bean : menuRes) {
+            getSonMenu(bean, menuMap, menuPermissionMap);
+        }
+        return menuRes;
+    }
+
+    /**
+     * 递归获取菜单结构
+     *
+     * @param menu              当前菜单
+     * @param menuMap           菜单集
+     * @param menuPermissionMap 菜单权限集
+     * @return 菜单结构
+     */
+    public void getSonMenu(SysRoleMenuDTO menu,
+                           Map<Long, List<SysRoleMenuDTO>> menuMap,
+                           Map<Long, List<SysMenuPermissionDTO>> menuPermissionMap) {
+        List<SysRoleMenuDTO> list = menuMap.get(menu.getMenuId());
+        List<SysMenuPermissionDTO> listPermission = menuPermissionMap.get(menu.getMenuId());
+        if (ListUtil.isNotEmpty(listPermission)) {
+            List<SysPermissionDTO> sysPermissionDTOList = new ArrayList<>();
+            for (SysMenuPermissionDTO sysMenuPermissionDTO : listPermission) {
+                if (null != sysMenuPermissionDTO.getPermissionId()) {
+                    SysPermissionDTO sysPermissionDTO = new SysPermissionDTO();
+                    BeanUtil.copyProperties(sysMenuPermissionDTO, sysPermissionDTO);
+                    sysPermissionDTO.setParentId(menu.getMenuId());
+                    sysPermissionDTOList.add(sysPermissionDTO);
+                }
+            }
+            menu.setSysPermissionDTOList(sysPermissionDTOList);
+        }
+        if (ListUtil.isNotEmpty(list)) {
+            menu.setSonMenuDTOList(list);
+            for (SysRoleMenuDTO bean : list) {
+                getSonMenu(bean, menuMap, menuPermissionMap);
+            }
+        }
+    }
+
+    /**
+     * 修改角色菜单权限数据
+     *
+     * @param sysRoleMenuSaveVO 修改角色菜单权限数据入参
+     * @return 是否成功
+     */
+    public Boolean saveRoleMenu(SysRoleMenuSaveVO sysRoleMenuSaveVO) {
+        Date now = DateUtil.now();
+        String userId = SysUserUtils.getCurrentPrincipleID();
+        //查询该角色的所有用户
+        List<Long> userIds = sysUserRoleFacade.list(new QueryWrapper<SysUserRole>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("role_id", sysRoleMenuSaveVO.getRoleId())
+        ).stream().distinct().map(SysUserRole::getUserId).collect(Collectors.toList());
+        //删除角色菜单和角色权限
+        sysRoleMenuService.update(new UpdateWrapper<SysRoleMenu>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("role_id", sysRoleMenuSaveVO.getRoleId())
+                .set("is_deleted", IsDeleteEnum.Y.getKey())
+                .set("modifier", userId)
+                .set("gmt_modified", now)
+        );
+        sysRolePermissionService.update(new UpdateWrapper<SysRolePermission>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("role_id", sysRoleMenuSaveVO.getRoleId())
+                .set("is_deleted", IsDeleteEnum.Y.getKey())
+                .set("modifier", userId)
+                .set("gmt_modified", now)
+        );
+        //新增角色菜单和角色权限
+        if (ListUtil.isNotEmpty(sysRoleMenuSaveVO.getSysMenuSaveVOList())) {
+            List<SysRoleMenu> sysRoleMenuList = new ArrayList<>();
+            for (SysMenuSaveVO sysMenuSaveVO : sysRoleMenuSaveVO.getSysMenuSaveVOList()) {
+                SysRoleMenu sysRoleMenu = new SysRoleMenu();
+                sysRoleMenu.setCreator(userId);
+                sysRoleMenu.setModifier(userId);
+                sysRoleMenu.setGmtCreate(now);
+                sysRoleMenu.setGmtModified(now);
+                sysRoleMenu.setRoleId(sysRoleMenuSaveVO.getRoleId());
+                sysRoleMenu.setMenuId(sysMenuSaveVO.getMenuId());
+                sysRoleMenuList.add(sysRoleMenu);
+            }
+            sysRoleMenuService.saveBatch(sysRoleMenuList);
+        }
+        if (ListUtil.isNotEmpty(sysRoleMenuSaveVO.getSysPermissionSaveVOList())) {
+            List<SysRolePermission> sysRolePermissionList = new ArrayList<>();
+            for (SysPermissionSaveVO sysPermissionSaveVO : sysRoleMenuSaveVO.getSysPermissionSaveVOList()) {
+                SysRolePermission sysRolePermission = new SysRolePermission();
+                sysRolePermission.setCreator(userId);
+                sysRolePermission.setModifier(userId);
+                sysRolePermission.setGmtCreate(now);
+                sysRolePermission.setGmtModified(now);
+                sysRolePermission.setRoleId(sysRoleMenuSaveVO.getRoleId());
+                sysRolePermission.setPermissionId(sysPermissionSaveVO.getPermissionId());
+                sysRolePermissionList.add(sysRolePermission);
+            }
+            sysRolePermissionService.saveBatch(sysRolePermissionList);
+        }
+        //清除该角色的所有用户的token缓存
+        if (ListUtil.isNotEmpty(userIds)) {
+            tokenFacade.deleteBatchToken(userIds);
+        }
+        return true;
+    }
+}

+ 13 - 0
src/main/java/com/diagbot/facade/SysUserDeptFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.SysUserDeptServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/4/28 9:48
+ */
+@Component
+public class SysUserDeptFacade extends SysUserDeptServiceImpl {
+}

+ 296 - 4
src/main/java/com/diagbot/facade/SysUserFacade.java

@@ -1,21 +1,35 @@
 package com.diagbot.facade;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.client.AuthServiceClient;
+import com.diagbot.dto.BasDeptInfoDTO;
 import com.diagbot.dto.BasHospitalInfoDTO;
 import com.diagbot.dto.JwtDTO;
 import com.diagbot.dto.LoginDTO;
+import com.diagbot.dto.SysRoleDTO;
+import com.diagbot.dto.SysUserDeptDTO;
+import com.diagbot.dto.SysUserPermissionDTO;
+import com.diagbot.dto.SysUserQueryDTO;
+import com.diagbot.dto.SysUserRoleDTO;
 import com.diagbot.dto.UserLoginDTO;
 import com.diagbot.entity.BasHospitalInfo;
 import com.diagbot.entity.JWT;
 import com.diagbot.entity.JwtStore;
 import com.diagbot.entity.SysUser;
+import com.diagbot.entity.SysUserDept;
+import com.diagbot.entity.SysUserHospital;
+import com.diagbot.entity.SysUserRole;
 import com.diagbot.entity.wrapper.SysMenuWrapper;
 import com.diagbot.enums.ConstantEnum;
 import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.enums.StatusEnum;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.exception.ServiceErrorCode;
+import com.diagbot.service.impl.SysUserDeptServiceImpl;
+import com.diagbot.service.impl.SysUserRoleServiceImpl;
 import com.diagbot.service.impl.SysUserServiceImpl;
 import com.diagbot.util.BeanUtil;
 import com.diagbot.util.DateUtil;
@@ -23,15 +37,24 @@ import com.diagbot.util.EntityUtil;
 import com.diagbot.util.ListUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.util.SysUserUtils;
+import com.diagbot.vo.BasDeptInfoVO;
+import com.diagbot.vo.SysUserBaseVO;
+import com.diagbot.vo.SysUserDeptVO;
+import com.diagbot.vo.SysUserQueryVO;
+import com.diagbot.vo.SysUserRoleVO;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.security.crypto.factory.PasswordEncoderFactories;
 import org.springframework.security.crypto.password.PasswordEncoder;
 import org.springframework.security.oauth2.common.OAuth2AccessToken;
 import org.springframework.stereotype.Component;
 
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
 
 /**
  * @Description: 用户业务层
@@ -53,6 +76,23 @@ public class SysUserFacade extends SysUserServiceImpl {
     @Autowired
     private BasHospitalInfoFacade basHospitalInfoFacade;
 
+    @Autowired
+    @Qualifier("sysUserRoleServiceImpl")
+    private SysUserRoleServiceImpl sysUserRoleService;
+
+    @Autowired
+    @Qualifier("sysUserDeptServiceImpl")
+    private SysUserDeptServiceImpl sysUserDeptService;
+
+    @Autowired
+    private BasDeptInfoFacade basDeptInfoFacade;
+
+    @Autowired
+    private SysRoleFacade sysRoleFacade;
+
+    @Autowired
+    private SysUserHospitalFacade sysUserHospitalFacade;
+
     /**
      * 获取jwt
      *
@@ -72,6 +112,7 @@ public class SysUserFacade extends SysUserServiceImpl {
         }
         QueryWrapper<SysUser> userQueryWrapper = new QueryWrapper<>();
         userQueryWrapper.eq("username", username)
+                .eq("status", StatusEnum.Enable.getKey())
                 .eq("is_deleted", IsDeleteEnum.N.getKey());
         SysUser user = this.getOne(userQueryWrapper, false);
         if (null == user) {
@@ -176,6 +217,7 @@ public class SysUserFacade extends SysUserServiceImpl {
         String userId = SysUserUtils.getCurrentPrincipleID();
         SysUser user = this.getOne(new QueryWrapper<SysUser>()
                 .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("status", StatusEnum.Enable.getKey())
                 .eq("id", userId), false);
         if (null == user) {
             throw new CommonException(ServiceErrorCode.USER_NOT_FOUND);
@@ -204,7 +246,10 @@ public class SysUserFacade extends SysUserServiceImpl {
         LoginDTO data = new LoginDTO();
 
         Long userId = Long.parseLong(SysUserUtils.getCurrentPrincipleID());
-        SysUser user = this.getById(userId);
+        SysUser user = this.getOne(new QueryWrapper<SysUser>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("status", StatusEnum.Enable.getKey())
+                .eq("id", userId), false);
         if (user == null) {
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
                     "用户不存在【" + userId + "】");
@@ -227,10 +272,12 @@ public class SysUserFacade extends SysUserServiceImpl {
 
         //添加菜单信息
         List<SysMenuWrapper> menuList = sysMenuFacade.getByRole(user.getId());
+        List<SysUserPermissionDTO> sysUserPermissionDTOList = sysMenuFacade.getByRolePermission(user.getId());
         Map<Long, List<SysMenuWrapper>> menuMap = EntityUtil.makeEntityListMap(menuList, "parentId");
+        Map<Long, List<SysUserPermissionDTO>> menuPermissionMap = EntityUtil.makeEntityListMap(sysUserPermissionDTOList, "menuId");
         List<SysMenuWrapper> menuRes = menuMap.get(-1L);
         for (SysMenuWrapper bean : menuRes) {
-            getSonMenu(bean, menuMap);
+            getSonMenu(bean, menuMap, menuPermissionMap);
         }
         data.setMenuWrappers(menuRes);
         return data;
@@ -244,13 +291,19 @@ public class SysUserFacade extends SysUserServiceImpl {
      * @param menuMap 菜单集
      * @return 菜单结构
      */
-    public List<SysMenuWrapper> getSonMenu(SysMenuWrapper menu, Map<Long, List<SysMenuWrapper>> menuMap) {
+    public List<SysMenuWrapper> getSonMenu(SysMenuWrapper menu,
+                                           Map<Long, List<SysMenuWrapper>> menuMap,
+                                           Map<Long, List<SysUserPermissionDTO>> menuPermissionMap) {
         List<SysMenuWrapper> res = new ArrayList<>();
         List<SysMenuWrapper> list = menuMap.get(menu.getId());
+        List<SysUserPermissionDTO> listPermission = menuPermissionMap.get(menu.getId());
+        if (ListUtil.isNotEmpty(listPermission)) {
+            menu.setSysUserPermissionDTOList(listPermission);
+        }
         if (ListUtil.isNotEmpty(list)) {
             menu.setSubMenuList(list);
             for (SysMenuWrapper bean : list) {
-                getSonMenu(bean, menuMap);
+                getSonMenu(bean, menuMap, menuPermissionMap);
             }
         }
         return res;
@@ -282,5 +335,244 @@ public class SysUserFacade extends SysUserServiceImpl {
         return subMenu;
     }
 
+    //-------------用户维护BEGAIN------------------------
+
+    /**
+     * 用户列表翻页信息查询
+     *
+     * @param sysUserQueryVO 用户列表翻页信息入参
+     * @return 用户列表翻页信息
+     */
+    public IPage<SysUserQueryDTO> userPageFac(SysUserQueryVO sysUserQueryVO) {
+        sysUserQueryVO.setHospitalId(Long.valueOf(SysUserUtils.getCurrentHospitalID()));
+        return this.userPage(sysUserQueryVO);
+    }
+
+    /**
+     * 获取用户科室
+     *
+     * @param sysUserBaseVO 获取用户科室入参
+     * @return 用户科室信息
+     */
+    public SysUserDeptDTO getUserDepts(SysUserBaseVO sysUserBaseVO) {
+        checkUser(sysUserBaseVO.getUserId());
+        SysUserDeptDTO sysUserDeptDTO = new SysUserDeptDTO();
+        sysUserDeptDTO.setUserId(sysUserBaseVO.getUserId());
+        BasDeptInfoVO basDeptInfoVO = new BasDeptInfoVO();
+        List<BasDeptInfoDTO> basDeptInfoDTOList = basDeptInfoFacade.listForUser(basDeptInfoVO);
+        List<SysUserDept> sysUserDeptList
+                = sysUserDeptService.list(new QueryWrapper<SysUserDept>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("user_id", sysUserBaseVO.getUserId())
+        );
+
+        if (ListUtil.isNotEmpty(sysUserDeptList)) {
+            List<BasDeptInfoDTO> notSelDepts = new ArrayList<>();
+            List<BasDeptInfoDTO> selDepts = new ArrayList<>();
+            Set<String> selDeptIds = sysUserDeptList.stream()
+                    .map(SysUserDept::getDeptId)
+                    .collect(Collectors.toSet());
+            for (BasDeptInfoDTO basDeptInfoDTO : basDeptInfoDTOList) {
+                if (selDeptIds.contains(basDeptInfoDTO.getDeptId())) {
+                    selDepts.add(basDeptInfoDTO);
+                } else {
+                    notSelDepts.add(basDeptInfoDTO);
+                }
+            }
+            sysUserDeptDTO.setNotSelDepts(notSelDepts);
+            sysUserDeptDTO.setSelDepts(selDepts);
+
+        } else {
+            sysUserDeptDTO.setNotSelDepts(basDeptInfoDTOList);
+        }
+
+        return sysUserDeptDTO;
+    }
+
+    /**
+     * 获取用户角色
+     *
+     * @param sysUserBaseVO 获取用户角色入参
+     * @return 用户角色信息
+     */
+    public SysUserRoleDTO getUserRoles(SysUserBaseVO sysUserBaseVO) {
+        checkUser(sysUserBaseVO.getUserId());
+        SysUserRoleDTO sysUserRoleDTO = new SysUserRoleDTO();
+        sysUserRoleDTO.setUserId(sysUserBaseVO.getUserId());
+        List<SysRoleDTO> sysRoleDTOList = sysRoleFacade.listForUser();
+        List<SysUserRole> sysUserRoleList
+                = sysUserRoleService.list(new QueryWrapper<SysUserRole>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("user_id", sysUserBaseVO.getUserId())
+        );
+
+        if (ListUtil.isNotEmpty(sysUserRoleList)) {
+            List<SysRoleDTO> notSelRoles = new ArrayList<>();
+            List<SysRoleDTO> selRoles = new ArrayList<>();
+            Set<Long> selRoleIds = sysUserRoleList.stream()
+                    .map(SysUserRole::getRoleId)
+                    .collect(Collectors.toSet());
+            for (SysRoleDTO sysRoleDTO : sysRoleDTOList) {
+                if (selRoleIds.contains(sysRoleDTO.getId())) {
+                    selRoles.add(sysRoleDTO);
+                } else {
+                    notSelRoles.add(sysRoleDTO);
+                }
+            }
+            sysUserRoleDTO.setNotSelRoles(notSelRoles);
+            sysUserRoleDTO.setSelRoles(selRoles);
+
+        } else {
+            sysUserRoleDTO.setNotSelRoles(sysRoleDTOList);
+        }
+
+        return sysUserRoleDTO;
+    }
+
+    /**
+     * 用户启用
+     *
+     * @param sysUserBaseVO 用户启用入参
+     * @return 是否成功
+     */
+    public Boolean enable(SysUserBaseVO sysUserBaseVO) {
+        checkUser(sysUserBaseVO.getUserId());
+        Date now = DateUtil.now();
+        String userId = SysUserUtils.getCurrentPrincipleID();
+        return this.update(new UpdateWrapper<SysUser>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("id", sysUserBaseVO.getUserId())
+                .eq("status", StatusEnum.Disable.getKey())
+                .set("modifier", userId)
+                .set("gmt_modified", now)
+                .set("status", StatusEnum.Enable.getKey())
+        );
+    }
+
+    /**
+     * 用户停用
+     *
+     * @param sysUserBaseVO 用户停用入参
+     * @return 是否成功
+     */
+    public Boolean disable(SysUserBaseVO sysUserBaseVO) {
+        checkUser(sysUserBaseVO.getUserId());
+        Date now = DateUtil.now();
+        String userId = SysUserUtils.getCurrentPrincipleID();
+        return this.update(new UpdateWrapper<SysUser>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("id", sysUserBaseVO.getUserId())
+                .eq("status", StatusEnum.Enable.getKey())
+                .set("modifier", userId)
+                .set("gmt_modified", now)
+                .set("status", StatusEnum.Disable.getKey())
+        );
+    }
+
+    /**
+     * 编辑用户科室
+     *
+     * @param sysUserDeptVO 编辑用户科室入参
+     * @return 是否成功
+     */
+    public Boolean editUserDepts(SysUserDeptVO sysUserDeptVO) {
+        checkUser(sysUserDeptVO.getUserId());
+        Date now = DateUtil.now();
+        String userId = SysUserUtils.getCurrentPrincipleID();
+        //删除原科室
+        sysUserDeptService.update(new UpdateWrapper<SysUserDept>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("user_id", sysUserDeptVO.getUserId())
+                .set("is_deleted", IsDeleteEnum.Y.getKey())
+                .set("modifier", userId)
+                .set("gmt_modified", now)
+        );
+        //新增新科室
+        if (ListUtil.isNotEmpty(sysUserDeptVO.getDeptIds())) {
+            List<SysUserDept> sysUserDeptList = new ArrayList<>();
+            for (String deptId : sysUserDeptVO.getDeptIds()) {
+                SysUserDept sysUserDept = new SysUserDept();
+                sysUserDept.setUserId(sysUserDeptVO.getUserId());
+                sysUserDept.setHospitalId(Long.valueOf(SysUserUtils.getCurrentHospitalID()));
+                sysUserDept.setDeptId(deptId);
+                sysUserDept.setCreator(userId);
+                sysUserDept.setModifier(userId);
+                sysUserDept.setGmtCreate(now);
+                sysUserDept.setGmtModified(now);
+                sysUserDeptList.add(sysUserDept);
+            }
+            sysUserDeptService.saveBatch(sysUserDeptList);
+        }
+        //更新用户表
+        return this.update(new UpdateWrapper<SysUser>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("id", sysUserDeptVO.getUserId())
+                .set("modifier", userId)
+                .set("gmt_modified", now)
+        );
+    }
+
+    /**
+     * 编辑用户角色
+     *
+     * @param sysUserRoleVO 编辑用户角色入参
+     * @return 是否成功
+     */
+    public Boolean editUserRoles(SysUserRoleVO sysUserRoleVO) {
+        checkUser(sysUserRoleVO.getUserId());
+        Date now = DateUtil.now();
+        String userId = SysUserUtils.getCurrentPrincipleID();
+        //删除原角色
+        sysUserRoleService.update(new UpdateWrapper<SysUserRole>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("user_id", sysUserRoleVO.getUserId())
+                .set("is_deleted", IsDeleteEnum.Y.getKey())
+                .set("modifier", userId)
+                .set("gmt_modified", now)
+        );
+        //新增角色
+        if (ListUtil.isNotEmpty(sysUserRoleVO.getRoleIds())) {
+            List<SysUserRole> sysUserRoleList = new ArrayList<>();
+            for (Long roleId : sysUserRoleVO.getRoleIds()) {
+                SysUserRole sysUserRole = new SysUserRole();
+                sysUserRole.setUserId(sysUserRoleVO.getUserId());
+                sysUserRole.setRoleId(roleId);
+                sysUserRole.setCreator(userId);
+                sysUserRole.setModifier(userId);
+                sysUserRole.setGmtCreate(now);
+                sysUserRole.setGmtModified(now);
+                sysUserRoleList.add(sysUserRole);
+            }
+            sysUserRoleService.saveBatch(sysUserRoleList);
+        }
+        //更新用户表
+        this.update(new UpdateWrapper<SysUser>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("id", sysUserRoleVO.getUserId())
+                .set("modifier", userId)
+                .set("gmt_modified", now)
+        );
+        //删除Token
+        tokenFacade.deleteToken(sysUserRoleVO.getUserId().toString());
+        return true;
+    }
+
+    /**
+     * 确认用户是否是管理员下的用户
+     *
+     * @param userId 用户Id
+     */
+    private void checkUser(Long userId) {
+        //确认用户是否是管理员统一医院下的用户
+        Integer cnt = sysUserHospitalFacade.count(new QueryWrapper<SysUserHospital>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("user_id", userId)
+                .eq("hospital_id", SysUserUtils.getCurrentHospitalID())
+        );
+        if (cnt < 1) {
+            throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "该医院下无该用户");
+        }
+    }
+    //-------------用户维护END---------------------------
 
 }

+ 13 - 0
src/main/java/com/diagbot/facade/SysUserHospitalFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.SysUserHospitalServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/4/28 15:03
+ */
+@Component
+public class SysUserHospitalFacade extends SysUserHospitalServiceImpl {
+}

+ 13 - 0
src/main/java/com/diagbot/facade/SysUserRoleFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.SysUserRoleServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/4/28 9:48
+ */
+@Component
+public class SysUserRoleFacade extends SysUserRoleServiceImpl {
+}

+ 22 - 0
src/main/java/com/diagbot/mapper/BasDeptInfoMapper.java

@@ -0,0 +1,22 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.dto.BasDeptInfoDTO;
+import com.diagbot.entity.BasDeptInfo;
+import com.diagbot.vo.BasDeptInfoVO;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 医院科室信息 Mapper 接口
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-27
+ */
+public interface BasDeptInfoMapper extends BaseMapper<BasDeptInfo> {
+    List<BasDeptInfoDTO> getList(BasDeptInfoVO basDeptInfoVO);
+
+    List<BasDeptInfoDTO> getListUser(BasDeptInfoVO basDeptInfoVO);
+}

+ 4 - 0
src/main/java/com/diagbot/mapper/BehospitalInfoMapper.java

@@ -68,4 +68,8 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
 
 
     public List<BehospitalInfo> getNoGrade();
+
+    IPage<BehospitalInfoDTO> getPageByDept(BehospitalPageVO behospitalPageVO);
+
+    IPage<BehospitalInfoDTO> getPageByPerson(BehospitalPageVO behospitalPageVO);
 }

+ 16 - 0
src/main/java/com/diagbot/mapper/QcModuleDetailMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.QcModuleDetail;
+
+/**
+ * <p>
+ * 模型明细表 Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-27
+ */
+public interface QcModuleDetailMapper extends BaseMapper<QcModuleDetail> {
+
+}

+ 19 - 0
src/main/java/com/diagbot/mapper/QcModuleInfoMapper.java

@@ -0,0 +1,19 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.dto.GetModuleInfoOneDTO;
+import com.diagbot.entity.QcModuleInfo;
+import com.diagbot.vo.GetModuleInfoOneVO;
+
+/**
+ * <p>
+ * 模型表 Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-27
+ */
+public interface QcModuleInfoMapper extends BaseMapper<QcModuleInfo> {
+
+    public GetModuleInfoOneDTO getById(GetModuleInfoOneVO getModuleInfoOneVO);
+}

+ 25 - 0
src/main/java/com/diagbot/mapper/QcQuestionInfoMapper.java

@@ -0,0 +1,25 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.dto.QuestionEntryDTO;
+import com.diagbot.entity.QcQuestionInfo;
+import com.diagbot.entity.wrapper.QuestionInfoWrapper;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 标签基础表 Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-27
+ */
+public interface QcQuestionInfoMapper extends BaseMapper<QcQuestionInfo> {
+
+    public List<QuestionInfoWrapper> getByQuestionMapping(Map map);
+
+    public List<QuestionEntryDTO> getByCaseEntryIds(Map map);
+
+}

+ 16 - 0
src/main/java/com/diagbot/mapper/QcQuestionMappingMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.QcQuestionMapping;
+
+/**
+ * <p>
+ * 标签映射表 Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-27
+ */
+public interface QcQuestionMappingMapper extends BaseMapper<QcQuestionMapping> {
+
+}

+ 3 - 0
src/main/java/com/diagbot/mapper/SysMenuMapper.java

@@ -1,5 +1,6 @@
 package com.diagbot.mapper;
 
+import com.diagbot.dto.SysUserPermissionDTO;
 import com.diagbot.entity.SysMenu;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.diagbot.entity.wrapper.SysMenuWrapper;
@@ -29,4 +30,6 @@ public interface SysMenuMapper extends BaseMapper<SysMenu> {
      * @Date: 2018/9/14 13:59
      */
     public List<SysMenuWrapper> getSubMenuById(Long id);
+
+    public List<SysUserPermissionDTO> getByRolePermission(Long userId);
 }

+ 21 - 0
src/main/java/com/diagbot/mapper/SysRoleMapper.java

@@ -0,0 +1,21 @@
+package com.diagbot.mapper;
+
+import com.diagbot.dto.SysMenuPermissionDTO;
+import com.diagbot.dto.SysRoleMenuDTO;
+import com.diagbot.entity.SysRole;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.vo.SysRoleMenuQueryVO;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 系统角色表 Mapper 接口
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-27
+ */
+public interface SysRoleMapper extends BaseMapper<SysRole> {
+    List<SysMenuPermissionDTO> getMenuPermission(SysRoleMenuQueryVO sysRoleMenuQueryVO);
+}

+ 16 - 0
src/main/java/com/diagbot/mapper/SysRoleMenuMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.SysRoleMenu;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 角色和菜单的映射表 Mapper 接口
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-27
+ */
+public interface SysRoleMenuMapper extends BaseMapper<SysRoleMenu> {
+
+}

+ 16 - 0
src/main/java/com/diagbot/mapper/SysRolePermissionMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.SysRolePermission;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 角色和资源的映射表 Mapper 接口
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-27
+ */
+public interface SysRolePermissionMapper extends BaseMapper<SysRolePermission> {
+
+}

+ 16 - 0
src/main/java/com/diagbot/mapper/SysUserDeptMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.SysUserDept;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 用户-医院科室映射表 Mapper 接口
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-28
+ */
+public interface SysUserDeptMapper extends BaseMapper<SysUserDept> {
+
+}

+ 16 - 0
src/main/java/com/diagbot/mapper/SysUserHospitalMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.SysUserHospital;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 用户-机构表映射表 Mapper 接口
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-28
+ */
+public interface SysUserHospitalMapper extends BaseMapper<SysUserHospital> {
+
+}

+ 5 - 2
src/main/java/com/diagbot/mapper/SysUserMapper.java

@@ -1,7 +1,10 @@
 package com.diagbot.mapper;
 
-import com.diagbot.entity.SysUser;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.SysUserQueryDTO;
+import com.diagbot.entity.SysUser;
+import com.diagbot.vo.SysUserQueryVO;
 
 /**
  * <p>
@@ -12,5 +15,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  * @since 2020-04-09
  */
 public interface SysUserMapper extends BaseMapper<SysUser> {
-
+    IPage<SysUserQueryDTO> userPage(SysUserQueryVO sysUserQueryVO);
 }

+ 16 - 0
src/main/java/com/diagbot/mapper/SysUserRoleMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.SysUserRole;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 系统用户角色关联表 Mapper 接口
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-28
+ */
+public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
+
+}

+ 22 - 0
src/main/java/com/diagbot/service/BasDeptInfoService.java

@@ -0,0 +1,22 @@
+package com.diagbot.service;
+
+import com.diagbot.dto.BasDeptInfoDTO;
+import com.diagbot.entity.BasDeptInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.vo.BasDeptInfoVO;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 医院科室信息 服务类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-27
+ */
+public interface BasDeptInfoService extends IService<BasDeptInfo> {
+    List<BasDeptInfoDTO> getList(BasDeptInfoVO basDeptInfoVO);
+
+    List<BasDeptInfoDTO> getListUser(BasDeptInfoVO basDeptInfoVO);
+}

+ 3 - 0
src/main/java/com/diagbot/service/BehospitalInfoService.java

@@ -68,4 +68,7 @@ public interface BehospitalInfoService extends IService<BehospitalInfo> {
 
 
     public List<BehospitalInfo> getNoGrade();
+
+    IPage<BehospitalInfoDTO> getPageByDept(BehospitalPageVO behospitalPageVO);
+    IPage<BehospitalInfoDTO> getPageByPerson(BehospitalPageVO behospitalPageVO);
 }

+ 16 - 0
src/main/java/com/diagbot/service/QcModuleDetailService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.QcModuleDetail;
+
+/**
+ * <p>
+ * 模型明细表 服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-27
+ */
+public interface QcModuleDetailService extends IService<QcModuleDetail> {
+
+}

+ 19 - 0
src/main/java/com/diagbot/service/QcModuleInfoService.java

@@ -0,0 +1,19 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.dto.GetModuleInfoOneDTO;
+import com.diagbot.entity.QcModuleInfo;
+import com.diagbot.vo.GetModuleInfoOneVO;
+
+/**
+ * <p>
+ * 模型表 服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-27
+ */
+public interface QcModuleInfoService extends IService<QcModuleInfo> {
+
+    public GetModuleInfoOneDTO getById(GetModuleInfoOneVO getModuleInfoOneVO);
+}

+ 30 - 0
src/main/java/com/diagbot/service/QcQuestionInfoService.java

@@ -0,0 +1,30 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.dto.QuestionEntryDTO;
+import com.diagbot.entity.QcQuestionInfo;
+import com.diagbot.entity.wrapper.QuestionInfoWrapper;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 标签基础表 服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-27
+ */
+public interface QcQuestionInfoService extends IService<QcQuestionInfo> {
+
+    /**
+     * 根据questionMapping获取标签信息
+     *
+     * @param map 参数
+     * @return
+     */
+    public List<QuestionInfoWrapper> getByQuestionMapping(Map map);
+
+    public List<QuestionEntryDTO> getByCaseEntryIds(Map map);
+}

+ 16 - 0
src/main/java/com/diagbot/service/QcQuestionMappingService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.QcQuestionMapping;
+
+/**
+ * <p>
+ * 标签映射表 服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-27
+ */
+public interface QcQuestionMappingService extends IService<QcQuestionMapping> {
+
+}

+ 3 - 0
src/main/java/com/diagbot/service/SysMenuService.java

@@ -1,5 +1,6 @@
 package com.diagbot.service;
 
+import com.diagbot.dto.SysUserPermissionDTO;
 import com.diagbot.entity.SysMenu;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.diagbot.entity.wrapper.SysMenuWrapper;
@@ -30,4 +31,6 @@ public interface SysMenuService extends IService<SysMenu> {
      * @Date: 2018/9/17 15:44
      */
     public List<SysMenuWrapper> getSubMenuById(Long id);
+
+    public List<SysUserPermissionDTO> getByRolePermission(Long userId);
 }

+ 16 - 0
src/main/java/com/diagbot/service/SysRoleMenuService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.SysRoleMenu;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 角色和菜单的映射表 服务类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-27
+ */
+public interface SysRoleMenuService extends IService<SysRoleMenu> {
+
+}

+ 16 - 0
src/main/java/com/diagbot/service/SysRolePermissionService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.SysRolePermission;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 角色和资源的映射表 服务类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-27
+ */
+public interface SysRolePermissionService extends IService<SysRolePermission> {
+
+}

+ 20 - 0
src/main/java/com/diagbot/service/SysRoleService.java

@@ -0,0 +1,20 @@
+package com.diagbot.service;
+
+import com.diagbot.dto.SysMenuPermissionDTO;
+import com.diagbot.entity.SysRole;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.vo.SysRoleMenuQueryVO;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 系统角色表 服务类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-27
+ */
+public interface SysRoleService extends IService<SysRole> {
+    List<SysMenuPermissionDTO> getMenuPermission(SysRoleMenuQueryVO sysRoleMenuQueryVO);
+}

+ 12 - 1
src/main/java/com/diagbot/service/SysTokenService.java

@@ -2,6 +2,8 @@ package com.diagbot.service;
 
 import com.diagbot.entity.JwtStore;
 
+import java.util.List;
+
 /**
  * @Description: Token验证类
  * @author: gaodm
@@ -27,9 +29,18 @@ public interface SysTokenService {
     Boolean verifyToken(String token, Integer type);
 
     /**
-     *  删除用户token
+     * 删除用户token
+     *
      * @param userId 用户ID
      * @return 删除是否成功
      */
     Boolean deleteToken(String userId);
+
+    /**
+     * 批量删除用户token
+     *
+     * @param userIds 用户列表
+     * @return 删除是否成功
+     */
+    Boolean deleteBatchToken(List<Long> userIds);
 }

+ 16 - 0
src/main/java/com/diagbot/service/SysUserDeptService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.SysUserDept;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 用户-医院科室映射表 服务类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-28
+ */
+public interface SysUserDeptService extends IService<SysUserDept> {
+
+}

+ 16 - 0
src/main/java/com/diagbot/service/SysUserHospitalService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.SysUserHospital;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 用户-机构表映射表 服务类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-28
+ */
+public interface SysUserHospitalService extends IService<SysUserHospital> {
+
+}

+ 16 - 0
src/main/java/com/diagbot/service/SysUserRoleService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.SysUserRole;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 系统用户角色关联表 服务类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-28
+ */
+public interface SysUserRoleService extends IService<SysUserRole> {
+
+}

+ 4 - 1
src/main/java/com/diagbot/service/SysUserService.java

@@ -1,7 +1,10 @@
 package com.diagbot.service;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.SysUserQueryDTO;
 import com.diagbot.entity.SysUser;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.vo.SysUserQueryVO;
 
 /**
  * <p>
@@ -12,5 +15,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
  * @since 2020-04-09
  */
 public interface SysUserService extends IService<SysUser> {
-
+    IPage<SysUserQueryDTO> userPage(SysUserQueryVO sysUserQueryVO);
 }

+ 33 - 0
src/main/java/com/diagbot/service/impl/BasDeptInfoServiceImpl.java

@@ -0,0 +1,33 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.dto.BasDeptInfoDTO;
+import com.diagbot.entity.BasDeptInfo;
+import com.diagbot.mapper.BasDeptInfoMapper;
+import com.diagbot.service.BasDeptInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.vo.BasDeptInfoVO;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 医院科室信息 服务实现类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-27
+ */
+@Service
+public class BasDeptInfoServiceImpl extends ServiceImpl<BasDeptInfoMapper, BasDeptInfo> implements BasDeptInfoService {
+
+    @Override
+    public List<BasDeptInfoDTO> getList(BasDeptInfoVO basDeptInfoVO){
+        return baseMapper.getList(basDeptInfoVO);
+    }
+
+    @Override
+    public List<BasDeptInfoDTO> getListUser(BasDeptInfoVO basDeptInfoVO){
+        return baseMapper.getListUser(basDeptInfoVO);
+    }
+}

+ 9 - 0
src/main/java/com/diagbot/service/impl/BehospitalInfoServiceImpl.java

@@ -95,4 +95,13 @@ public class BehospitalInfoServiceImpl extends ServiceImpl<BehospitalInfoMapper,
     public List<BehospitalInfo> getNoGrade() {
         return baseMapper.getNoGrade();
     }
+
+    @Override
+    public IPage<BehospitalInfoDTO> getPageByDept(BehospitalPageVO behospitalPageVO){
+        return baseMapper.getPageByDept(behospitalPageVO);
+    }
+    @Override
+    public IPage<BehospitalInfoDTO> getPageByPerson(BehospitalPageVO behospitalPageVO) {
+        return baseMapper.getPageByPerson(behospitalPageVO);
+    }
 }

+ 22 - 0
src/main/java/com/diagbot/service/impl/QcModuleDetailServiceImpl.java

@@ -0,0 +1,22 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.entity.QcModuleDetail;
+import com.diagbot.mapper.QcModuleDetailMapper;
+import com.diagbot.service.QcModuleDetailService;
+import org.springframework.stereotype.Service;
+
+import java.util.Map;
+
+/**
+ * <p>
+ * 模型明细表 服务实现类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-27
+ */
+@Service
+public class QcModuleDetailServiceImpl extends ServiceImpl<QcModuleDetailMapper, QcModuleDetail> implements QcModuleDetailService {
+
+}

+ 26 - 0
src/main/java/com/diagbot/service/impl/QcModuleInfoServiceImpl.java

@@ -0,0 +1,26 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.dto.GetModuleInfoOneDTO;
+import com.diagbot.entity.QcModuleInfo;
+import com.diagbot.mapper.QcModuleInfoMapper;
+import com.diagbot.service.QcModuleInfoService;
+import com.diagbot.vo.GetModuleInfoOneVO;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 模型表 服务实现类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-27
+ */
+@Service
+public class QcModuleInfoServiceImpl extends ServiceImpl<QcModuleInfoMapper, QcModuleInfo> implements QcModuleInfoService {
+
+    @Override
+    public GetModuleInfoOneDTO getById(GetModuleInfoOneVO getModuleInfoOneVO) {
+        return baseMapper.getById(getModuleInfoOneVO);
+    }
+}

+ 34 - 0
src/main/java/com/diagbot/service/impl/QcQuestionInfoServiceImpl.java

@@ -0,0 +1,34 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.dto.QuestionEntryDTO;
+import com.diagbot.entity.QcQuestionInfo;
+import com.diagbot.entity.wrapper.QuestionInfoWrapper;
+import com.diagbot.mapper.QcQuestionInfoMapper;
+import com.diagbot.service.QcQuestionInfoService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 标签基础表 服务实现类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-27
+ */
+@Service
+public class QcQuestionInfoServiceImpl extends ServiceImpl<QcQuestionInfoMapper, QcQuestionInfo> implements QcQuestionInfoService {
+
+    @Override
+    public List<QuestionInfoWrapper> getByQuestionMapping(Map map) {
+        return baseMapper.getByQuestionMapping(map);
+    }
+
+    @Override
+    public List<QuestionEntryDTO> getByCaseEntryIds(Map map) {
+        return baseMapper.getByCaseEntryIds(map);
+    }
+}

+ 22 - 0
src/main/java/com/diagbot/service/impl/QcQuestionMappingServiceImpl.java

@@ -0,0 +1,22 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.entity.QcQuestionMapping;
+import com.diagbot.mapper.QcQuestionMappingMapper;
+import com.diagbot.service.QcQuestionMappingService;
+import org.springframework.stereotype.Service;
+
+import java.util.Map;
+
+/**
+ * <p>
+ * 标签映射表 服务实现类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-27
+ */
+@Service
+public class QcQuestionMappingServiceImpl extends ServiceImpl<QcQuestionMappingMapper, QcQuestionMapping> implements QcQuestionMappingService {
+
+}

+ 6 - 0
src/main/java/com/diagbot/service/impl/SysMenuServiceImpl.java

@@ -1,5 +1,6 @@
 package com.diagbot.service.impl;
 
+import com.diagbot.dto.SysUserPermissionDTO;
 import com.diagbot.entity.SysMenu;
 import com.diagbot.entity.wrapper.SysMenuWrapper;
 import com.diagbot.mapper.SysMenuMapper;
@@ -42,4 +43,9 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
     public List<SysMenuWrapper> getSubMenuById(Long id) {
         return baseMapper.getSubMenuById(id);
     }
+
+    @Override
+    public List<SysUserPermissionDTO> getByRolePermission(Long userId){
+        return baseMapper.getByRolePermission(userId);
+    }
 }

+ 20 - 0
src/main/java/com/diagbot/service/impl/SysRoleMenuServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.SysRoleMenu;
+import com.diagbot.mapper.SysRoleMenuMapper;
+import com.diagbot.service.SysRoleMenuService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 角色和菜单的映射表 服务实现类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-27
+ */
+@Service
+public class SysRoleMenuServiceImpl extends ServiceImpl<SysRoleMenuMapper, SysRoleMenu> implements SysRoleMenuService {
+
+}

+ 20 - 0
src/main/java/com/diagbot/service/impl/SysRolePermissionServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.SysRolePermission;
+import com.diagbot.mapper.SysRolePermissionMapper;
+import com.diagbot.service.SysRolePermissionService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 角色和资源的映射表 服务实现类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-27
+ */
+@Service
+public class SysRolePermissionServiceImpl extends ServiceImpl<SysRolePermissionMapper, SysRolePermission> implements SysRolePermissionService {
+
+}

+ 27 - 0
src/main/java/com/diagbot/service/impl/SysRoleServiceImpl.java

@@ -0,0 +1,27 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.dto.SysMenuPermissionDTO;
+import com.diagbot.entity.SysRole;
+import com.diagbot.mapper.SysRoleMapper;
+import com.diagbot.service.SysRoleService;
+import com.diagbot.vo.SysRoleMenuQueryVO;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 系统角色表 服务实现类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-27
+ */
+@Service
+public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements SysRoleService {
+    @Override
+    public List<SysMenuPermissionDTO> getMenuPermission(SysRoleMenuQueryVO sysRoleMenuQueryVO) {
+        return baseMapper.getMenuPermission(sysRoleMenuQueryVO);
+    }
+}

+ 26 - 0
src/main/java/com/diagbot/service/impl/SysTokenServiceImpl.java

@@ -16,6 +16,7 @@ import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Service;
 
 import java.util.Date;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -143,4 +144,29 @@ public class SysTokenServiceImpl implements SysTokenService {
         });
         return l > 0;
     }
+
+    /**
+     * 批量删除用户token
+     *
+     * @param userIds 用户列表
+     * @return 删除是否成功
+     */
+    @Override
+    public Boolean deleteBatchToken(List<Long> userIds) {
+        Long l = (Long) redisForToken.execute(new RedisCallback<Long>() {
+            @Override
+            public Long doInRedis(RedisConnection connection) throws DataAccessException {
+                connection.openPipeline();
+                Long cnt = 0L;
+                for (Long userId : userIds) {
+                    byte[] redis_key = getUserTokenKey(userId.toString());
+                    connection.del(redis_key);
+                    cnt++;
+                }
+                connection.closePipeline();
+                return cnt;
+            }
+        });
+        return l > 0;
+    }
 }

+ 20 - 0
src/main/java/com/diagbot/service/impl/SysUserDeptServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.SysUserDept;
+import com.diagbot.mapper.SysUserDeptMapper;
+import com.diagbot.service.SysUserDeptService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 用户-医院科室映射表 服务实现类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-28
+ */
+@Service
+public class SysUserDeptServiceImpl extends ServiceImpl<SysUserDeptMapper, SysUserDept> implements SysUserDeptService {
+
+}

+ 20 - 0
src/main/java/com/diagbot/service/impl/SysUserHospitalServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.SysUserHospital;
+import com.diagbot.mapper.SysUserHospitalMapper;
+import com.diagbot.service.SysUserHospitalService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 用户-机构表映射表 服务实现类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-28
+ */
+@Service
+public class SysUserHospitalServiceImpl extends ServiceImpl<SysUserHospitalMapper, SysUserHospital> implements SysUserHospitalService {
+
+}

+ 20 - 0
src/main/java/com/diagbot/service/impl/SysUserRoleServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.SysUserRole;
+import com.diagbot.mapper.SysUserRoleMapper;
+import com.diagbot.service.SysUserRoleService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 系统用户角色关联表 服务实现类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-28
+ */
+@Service
+public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUserRole> implements SysUserRoleService {
+
+}

+ 8 - 2
src/main/java/com/diagbot/service/impl/SysUserServiceImpl.java

@@ -1,9 +1,12 @@
 package com.diagbot.service.impl;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.dto.SysUserQueryDTO;
 import com.diagbot.entity.SysUser;
 import com.diagbot.mapper.SysUserMapper;
 import com.diagbot.service.SysUserService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.vo.SysUserQueryVO;
 import org.springframework.stereotype.Service;
 
 /**
@@ -16,5 +19,8 @@ import org.springframework.stereotype.Service;
  */
 @Service
 public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService {
-
+    @Override
+    public IPage<SysUserQueryDTO> userPage(SysUserQueryVO sysUserQueryVO) {
+        return baseMapper.userPage(sysUserQueryVO);
+    }
 }

+ 1 - 1
src/main/java/com/diagbot/util/EncrypDES.java

@@ -9,7 +9,7 @@ import java.security.InvalidKeyException;
 
 /**
  * @ClassName org.diagbot.pub.utils.security.EncrypDES
- * @Description TODO
+ * @Description
  * @Author fyeman
  * @Date 2019/2/22/022 14:44
  * @Version 1.0

+ 0 - 0
src/main/java/com/diagbot/vo/BasDeptInfoVO.java


Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů