Explorar o código

Initial commit

“wangdsYun hai 3 meses
achega
d835e4f707
Modificáronse 100 ficheiros con 10228 adicións e 0 borrados
  1. 25 0
      .gitignore
  2. 930 0
      doc/001.20200417第一版本/qc_init.sql
  3. BIN=BIN
      doc/002.20200426第二版/qc_init.zip
  4. 545 0
      doc/003.20200515第3期/qc_init.sql
  5. 29 0
      doc/004.20200527v.1.3.0/qc_init.sql
  6. 1059 0
      doc/005.20200528v1.2.x/qc_init.sql
  7. 5 0
      doc/006.20200602数据导入/qc_init.sql
  8. 34 0
      doc/006.20200604v1.3.1/qc_initv1.3.1.sql
  9. 3 0
      doc/007.20200608v1.2.3/qc_initv1.2.3.sql
  10. 8 0
      doc/008.20200610v1.3.3/qc_initv1.3.3.sql
  11. 59 0
      doc/009.20200612v1.3.4/qc_initv1.3.4.sql
  12. 34 0
      doc/010.20200617v1.3.5/qc_initv1.3.5.sql
  13. 28 0
      doc/010.20200618v1.3.6/qc_initv1.3.6.sql
  14. 8 0
      doc/011.20200619v1.3.6.1/qc_initv1.3.6.1.sql
  15. 85 0
      doc/011.20200628化验辅检危急值/qc_init.sql
  16. 21 0
      doc/012.20200706v1.3.6.4/qc_initv1.3.6.4.sql
  17. 372 0
      doc/013.20200706v1.3.7/qc_initv1.3.7.sql
  18. 18 0
      doc/014.20200708v1.3.6.5/qc_initv1.3.6.5.sql
  19. 9 0
      doc/015.20200706v1.3.7.1/qc_initv1.3.7.1.sql
  20. 15 0
      doc/015.20200714病案首页添加14个字段/qc_init_20200714.sql
  21. 9 0
      doc/016.20200715v1.3.7.2/qc_initv.1.3.7.2.sql
  22. 134 0
      doc/017.20200716v1.3.8/qc_inti_check.sql
  23. 3 0
      doc/017.20200717v1.3.7.3/qc_initv1.3.7.3.sql
  24. 10 0
      doc/019.20200727v2.0.0/qc_initv2.0.0.sql
  25. 12 0
      doc/020.20200805v1.4.0/qc_initv1.4.0.sql
  26. 9 0
      doc/021.20200812v1.4.2/qc_initv1.4.2.sql
  27. 18 0
      doc/022.20200911v1.4.5/qc_initv1.4.5.sql
  28. 1035 0
      doc/023.20200923v1.5.0/qc_initv1.5.0.sql
  29. 5 0
      doc/023.20200923v5.4.0云后台自用/qc_initv5.4.0.sql
  30. 26 0
      doc/024.20200923v1.4.6/qc_initv1.4.6.sql
  31. 26 0
      doc/024.20201009v1.4.6/qc_initv1.4.6.sql
  32. 2 0
      doc/025.20201021v1.4.7/qc_initv1.4.7.sql
  33. 36 0
      doc/026.20201123v1.4.8/qc_initv1.4.8.sql
  34. 2 0
      doc/027.20201130_5.4.1云平台/qc_initv20201130_5.4.1.sql
  35. 25 0
      doc/028.20201210v1.4.9/qc_initv1.4.9.sql
  36. 334 0
      doc/029.20201224v2.0.0/qc_initv2.0.0.sql
  37. 36 0
      doc/030.20201224v2.0.1/qc_initv2.0.1.sql
  38. 401 0
      doc/031.20210326v2.0.2/qc_initv2.0.2.sql
  39. 13 0
      doc/033.20210608v2.0.4/qc_initv2.0.4.sql
  40. 12 0
      doc/034.20210804_2.0.5/qc_initv2.0.5.sql
  41. 191 0
      doc/035.20211108_2.1.0/qc_initv2.1.0.sql
  42. 24 0
      doc/036.20211122_2.1.3/qc_initv2.1.3.sql
  43. 319 0
      pom.xml
  44. 33 0
      src/main/java/com/diagbot/IhqcSysApplication.java
  45. 318 0
      src/main/java/com/diagbot/aggregate/AverageStatisticsAggregate.java
  46. 116 0
      src/main/java/com/diagbot/aggregate/HomePageStatisticsAggregate.java
  47. 141 0
      src/main/java/com/diagbot/aggregate/LeaveHosStatisticsAggregate.java
  48. 170 0
      src/main/java/com/diagbot/aggregate/MrStatisticsAggregate.java
  49. 150 0
      src/main/java/com/diagbot/aggregate/ResultStatisticsAggregate.java
  50. 41 0
      src/main/java/com/diagbot/aop/SysLoggerAspect.java
  51. 42 0
      src/main/java/com/diagbot/client/AuthServiceClient.java
  52. 30 0
      src/main/java/com/diagbot/client/QcServiceClient.java
  53. 51 0
      src/main/java/com/diagbot/client/hystrix/AuthServiceHystrix.java
  54. 32 0
      src/main/java/com/diagbot/client/hystrix/QcServiceHystrix.java
  55. 37 0
      src/main/java/com/diagbot/config/AccessDeniedExceptionPoint.java
  56. 39 0
      src/main/java/com/diagbot/config/AuthExceptionEntryPoint.java
  57. 90 0
      src/main/java/com/diagbot/config/AuthenticationExceptionHandler.java
  58. 29 0
      src/main/java/com/diagbot/config/CacheDeleteInit.java
  59. 30 0
      src/main/java/com/diagbot/config/CorsConfiguer.java
  60. 19 0
      src/main/java/com/diagbot/config/CustomAccessTokenConverter.java
  61. 30 0
      src/main/java/com/diagbot/config/CustomTokenEnhancer.java
  62. 15 0
      src/main/java/com/diagbot/config/GlobalMethodSecurityConfigurer.java
  63. 220 0
      src/main/java/com/diagbot/config/MyJwtTokenStore.java
  64. 25 0
      src/main/java/com/diagbot/config/MyWebConfigurer.java
  65. 33 0
      src/main/java/com/diagbot/config/MybatisPlusConfigurer.java
  66. 103 0
      src/main/java/com/diagbot/config/OAuth2Configurer.java
  67. 202 0
      src/main/java/com/diagbot/config/RedisConfigurer.java
  68. 308 0
      src/main/java/com/diagbot/config/ResourceServerConfigurer.java
  69. 70 0
      src/main/java/com/diagbot/config/SwaggerConfigurer.java
  70. 69 0
      src/main/java/com/diagbot/config/WebSecurityConfigurer.java
  71. 368 0
      src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
  72. 30 0
      src/main/java/com/diagbot/config/security/UrlConfigAttribute.java
  73. 91 0
      src/main/java/com/diagbot/config/security/UrlFilterSecurityInterceptor.java
  74. 40 0
      src/main/java/com/diagbot/config/security/UrlMetadataSourceService.java
  75. 25 0
      src/main/java/com/diagbot/dto/AdmissionCountDTO.java
  76. 20 0
      src/main/java/com/diagbot/dto/AlgorithmDTO.java
  77. 38 0
      src/main/java/com/diagbot/dto/AnalyzeDTO.java
  78. 28 0
      src/main/java/com/diagbot/dto/AnalyzeRunDTO.java
  79. 31 0
      src/main/java/com/diagbot/dto/AverageStatisticsDTO.java
  80. 29 0
      src/main/java/com/diagbot/dto/AverageStatisticsFeeDTO.java
  81. 30 0
      src/main/java/com/diagbot/dto/AverageStatisticsFeeMonthDTO.java
  82. 30 0
      src/main/java/com/diagbot/dto/AverageStatisticsMonthDTO.java
  83. 23 0
      src/main/java/com/diagbot/dto/BasDeptInfoDTO.java
  84. 38 0
      src/main/java/com/diagbot/dto/BasHospitalInfoDTO.java
  85. 86 0
      src/main/java/com/diagbot/dto/BehosDTO.java
  86. 28 0
      src/main/java/com/diagbot/dto/BehospitalInfoAgeDTO.java
  87. 134 0
      src/main/java/com/diagbot/dto/BehospitalInfoDTO.java
  88. 139 0
      src/main/java/com/diagbot/dto/BehospitalInfoDeptDTO.java
  89. 18 0
      src/main/java/com/diagbot/dto/CaseAndDeptNumDTO.java
  90. 16 0
      src/main/java/com/diagbot/dto/CaseNumDTO.java
  91. 40 0
      src/main/java/com/diagbot/dto/CaseScoreDTO.java
  92. 23 0
      src/main/java/com/diagbot/dto/CheckDeptDTO.java
  93. 68 0
      src/main/java/com/diagbot/dto/CheckInfoDTO.java
  94. 55 0
      src/main/java/com/diagbot/dto/CheckJobDTO.java
  95. 23 0
      src/main/java/com/diagbot/dto/CheckMedoupDTO.java
  96. 40 0
      src/main/java/com/diagbot/dto/CheckUserDTO.java
  97. 23 0
      src/main/java/com/diagbot/dto/CheckWardDTO.java
  98. 144 0
      src/main/java/com/diagbot/dto/CheckWorkDTO.java
  99. 158 0
      src/main/java/com/diagbot/dto/CheckedRecordListDTO.java
  100. 0 0
      src/main/java/com/diagbot/dto/ColumnDTO.java

+ 25 - 0
.gitignore

@@ -0,0 +1,25 @@
+/target/
+!.mvn/wrapper/maven-wrapper.jar
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/build/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/

+ 930 - 0
doc/001.20200417第一版本/qc_init.sql

@@ -0,0 +1,930 @@
+CREATE DATABASE  `qc` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
+use `qc`;
+
+/*
+Navicat MySQL Data Transfer
+
+Source Server         : 朗通mysql 236联调服务器
+Source Server Version : 50725
+Source Host           : 192.168.2.236:3306
+Source Database       : qc
+
+Target Server Type    : MYSQL
+Target Server Version : 50725
+File Encoding         : 65001
+
+Date: 2020-04-17 13:49:32
+*/
+
+SET FOREIGN_KEY_CHECKS=0;
+
+-- ----------------------------
+-- Table structure for bas_dept_info
+-- ----------------------------
+DROP TABLE IF EXISTS `bas_dept_info`;
+CREATE TABLE `bas_dept_info` (
+  `dept_id` varchar(20) NOT NULL COMMENT '科室编码(HIS导入)',
+  `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院ID',
+  `dept_name` varchar(100) NOT NULL COMMENT '科室名称',
+  `dept_type` varchar(20) DEFAULT NULL COMMENT '科室类别',
+  `spell` varchar(10) DEFAULT NULL COMMENT '首字母拼音',
+  `station` varchar(64) DEFAULT NULL COMMENT '区域类别(门诊、工作站、住院等)',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  PRIMARY KEY (`dept_id`,`hospital_id`),
+  UNIQUE KEY `hospital_dept_unique` (`dept_id`,`hospital_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='医院科室信息';
+
+-- ----------------------------
+-- Table structure for bas_doctor_info
+-- ----------------------------
+DROP TABLE IF EXISTS `bas_doctor_info`;
+CREATE TABLE `bas_doctor_info` (
+  `doctor_id` varchar(16) NOT NULL COMMENT 'HIS导入的医生ID',
+  `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院ID',
+  `dept_id` varchar(16) NOT NULL COMMENT '医院导入科室ID',
+  `name` varchar(32) DEFAULT NULL COMMENT '姓名',
+  `professor` varchar(32) DEFAULT NULL COMMENT '职称',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  PRIMARY KEY (`doctor_id`,`hospital_id`),
+  UNIQUE KEY `bas_hospital_dept_unique` (`hospital_id`,`dept_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Table structure for bas_hospital_info
+-- ----------------------------
+DROP TABLE IF EXISTS `bas_hospital_info`;
+CREATE TABLE `bas_hospital_info` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `name` varchar(32) NOT NULL COMMENT '医院名称',
+  `code` varchar(16) NOT NULL COMMENT '组织机构代码',
+  `spell` varchar(32) DEFAULT NULL COMMENT '医院名称拼音',
+  `address` varchar(128) DEFAULT NULL COMMENT '医院地址',
+  `status` int(1) NOT NULL DEFAULT '1' COMMENT '状态:0.禁用1.启用',
+  `order_no` int(5) DEFAULT NULL COMMENT '排序号',
+  `connect` int(1) DEFAULT '0' COMMENT '是否对接(0-不对接,1-对接)',
+  `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则表示纪录未修改',
+  `remark` varchar(128) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='医院信息表';
+
+-- ----------------------------
+-- Table structure for hz_column
+-- ----------------------------
+DROP TABLE IF EXISTS `hz_column`;
+CREATE TABLE `hz_column` (
+  `hz_mc` varchar(128) DEFAULT NULL,
+  `hz_zj` varchar(128) DEFAULT NULL,
+  `hz_type` int(11) DEFAULT '0' COMMENT '1-病案首页',
+  UNIQUE KEY `HZ_MC_ZJ_INDEX` (`hz_mc`,`hz_zj`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Table structure for kl_clinic
+-- ----------------------------
+DROP TABLE IF EXISTS `kl_clinic`;
+CREATE TABLE `kl_clinic` (
+  `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 COMMENT '术语概念id',
+  `has_bodypart` bigint(20) DEFAULT NULL COMMENT '科室概念id',
+  `has_label` varchar(2) DEFAULT NULL,
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=38446 DEFAULT CHARSET=utf8 COMMENT='疾病表';
+
+-- ----------------------------
+-- Table structure for kl_disease
+-- ----------------------------
+DROP TABLE IF EXISTS `kl_disease`;
+CREATE TABLE `kl_disease` (
+  `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 COMMENT '术语概念id',
+  `icd10` varchar(255) DEFAULT NULL,
+  `dept_id` bigint(20) DEFAULT NULL COMMENT '科室概念id',
+  `classify` varchar(8) DEFAULT NULL COMMENT '疾病的分类,现在分为I、II类',
+  `is_chronic` varchar(2) DEFAULT '0' COMMENT '慢病标识',
+  `is_infections` varchar(2) DEFAULT '0' COMMENT '传染病标识',
+  `has_label` varchar(2) DEFAULT NULL,
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=87719 DEFAULT CHARSET=utf8 COMMENT='疾病表';
+
+-- ----------------------------
+-- Table structure for kl_relevant_feature
+-- ----------------------------
+DROP TABLE IF EXISTS `kl_relevant_feature`;
+CREATE TABLE `kl_relevant_feature` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `diagnose` varchar(100) DEFAULT NULL,
+  `feature` varchar(100) DEFAULT NULL,
+  `feature_type` int(2) DEFAULT NULL COMMENT '1:直接相关特征 2.程度词等非直接相关词 3.部位',
+  `value_type` int(2) DEFAULT NULL COMMENT '1:字符类型(二值属性:阳性/阴性)\r\n2:数值类型',
+  `find_suspect_diagnose` int(2) DEFAULT NULL,
+  PRIMARY KEY (`id`),
+  KEY `doc_rec_diagnose` (`diagnose`)
+) ENGINE=InnoDB AUTO_INCREMENT=47161 DEFAULT CHARSET=utf8 COMMENT='此表保存每种诊断所需的特征字段,用于后续学习分析';
+
+-- ----------------------------
+-- Table structure for lt_column
+-- ----------------------------
+DROP TABLE IF EXISTS `lt_column`;
+CREATE TABLE `lt_column` (
+  `lt_mc` varchar(128) DEFAULT NULL,
+  `lt_zj` varchar(128) DEFAULT NULL,
+  `lt_type` int(11) DEFAULT '0' COMMENT '1-病案首页',
+  UNIQUE KEY `LT_MC_ZJ_INDEX` (`lt_mc`,`lt_zj`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Table structure for lt_hz_columnmap
+-- ----------------------------
+DROP TABLE IF EXISTS `lt_hz_columnmap`;
+CREATE TABLE `lt_hz_columnmap` (
+  `lt_mc` varchar(128) DEFAULT NULL,
+  `lt_zj` varchar(128) DEFAULT NULL,
+  `hz_mc` varchar(128) DEFAULT NULL,
+  `hz_zj` varchar(128) DEFAULT NULL,
+  `type` int(1) DEFAULT '0' COMMENT '1-病案首页',
+  UNIQUE KEY `LT_HZ_MC_ZJ_TYPE_INDEX` (`lt_mc`,`lt_zj`,`hz_mc`,`hz_zj`,`type`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Table structure for med_behospital_info
+-- ----------------------------
+DROP TABLE IF EXISTS `med_behospital_info`;
+CREATE TABLE `med_behospital_info` (
+  `behospital_code` varchar(16) NOT NULL COMMENT '病人住院ID',
+  `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院ID',
+  `name` varchar(32) NOT NULL COMMENT '姓名',
+  `sex` varchar(2) DEFAULT NULL COMMENT '性别(男,女)',
+  `birthday` datetime DEFAULT NULL COMMENT '出生日期',
+  `file_code` varchar(16) DEFAULT NULL COMMENT '档案号',
+  `qc_type_id` bigint(20) DEFAULT '1' COMMENT '质控类型',
+  `ward_code` varchar(16) DEFAULT NULL COMMENT '病区编码',
+  `ward_name` varchar(32) DEFAULT NULL COMMENT '病区名称',
+  `beh_dept_id` varchar(16) NOT NULL COMMENT '住院科室ID',
+  `beh_dept_name` varchar(64) NOT NULL COMMENT '住院科室名称',
+  `bed_code` varchar(12) DEFAULT NULL COMMENT '床位号',
+  `bed_name` varchar(12) DEFAULT NULL COMMENT '床位名称',
+  `insurance_name` varchar(50) DEFAULT NULL COMMENT '医保类别',
+  `job_type` varchar(30) DEFAULT NULL COMMENT '职业',
+  `behospital_date` datetime DEFAULT NULL COMMENT '入院时间',
+  `leave_hospital_date` datetime DEFAULT NULL COMMENT '出院时间',
+  `diagnose_icd` varchar(50) DEFAULT NULL COMMENT '疾病ICD编码',
+  `diagnose` text COMMENT '疾病名称',
+  `doctor_id` varchar(6) DEFAULT NULL COMMENT '医生ID',
+  `doctor_name` varchar(50) DEFAULT NULL COMMENT '医生姓名',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  PRIMARY KEY (`behospital_code`,`hospital_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='住院病历信息';
+
+-- ----------------------------
+-- Table structure for med_doctor_advice
+-- ----------------------------
+DROP TABLE IF EXISTS `med_doctor_advice`;
+CREATE TABLE `med_doctor_advice` (
+  `doctor_advice_id` varchar(20) NOT NULL COMMENT '病人医嘱ID',
+  `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院id',
+  `behospital_code` varchar(20) NOT NULL COMMENT '病人ID',
+  `order_doctor_name` varchar(20) DEFAULT NULL COMMENT '医生开单判别',
+  `frequency` varchar(20) DEFAULT NULL COMMENT '医嘱频率判别',
+  `parent_type_id` varchar(20) DEFAULT NULL COMMENT '父类医嘱ID',
+  `doctor_advice_type` varchar(20) DEFAULT NULL COMMENT '医嘱类型判别(嘱托长嘱、长期医嘱等)',
+  `usage_num` varchar(20) DEFAULT NULL COMMENT '一次使用数量',
+  `usage_unit` varchar(30) DEFAULT NULL COMMENT '一次用量单位',
+  `dose` varchar(20) DEFAULT NULL COMMENT '医嘱单次剂量',
+  `dose_unit` varchar(30) DEFAULT NULL COMMENT '单次剂量单位',
+  `med_mode_type` varchar(20) DEFAULT NULL COMMENT '给药方式',
+  `da_frequency` varchar(10) DEFAULT NULL COMMENT '医嘱频率',
+  `da_deal_type` varchar(20) DEFAULT NULL COMMENT '医嘱处理类型',
+  `da_start_date` datetime DEFAULT NULL COMMENT '医嘱开始时间',
+  `da_item_name` varchar(200) DEFAULT NULL COMMENT '医嘱项目名称',
+  `da_status` varchar(20) DEFAULT NULL COMMENT '医嘱状态判别',
+  `da_stop_date` datetime DEFAULT NULL COMMENT '医嘱结束时间',
+  `da_group_no` varchar(20) DEFAULT NULL COMMENT '医嘱同组序号',
+  `da_prescription_type` varchar(20) DEFAULT NULL COMMENT '医嘱处方类型(检验、描述医嘱、膳食、西药、护理等)',
+  `da_med_type` varchar(20) DEFAULT NULL COMMENT '医嘱领药类型',
+  `doctor_notice` varchar(100) DEFAULT NULL COMMENT '医生嘱托',
+  `doctor_id` varchar(20) DEFAULT NULL COMMENT '开单医生ID',
+  `doctor_name` varchar(60) DEFAULT NULL COMMENT '开单医生姓名',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  UNIQUE KEY `advice_behospital_code_unique` (`doctor_advice_id`,`behospital_code`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='病人医嘱';
+
+-- ----------------------------
+-- Table structure for med_home_diagnose_info
+-- ----------------------------
+DROP TABLE IF EXISTS `med_home_diagnose_info`;
+CREATE TABLE `med_home_diagnose_info` (
+  `home_page_id` varchar(20) NOT NULL COMMENT '病案首页ID',
+  `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院ID',
+  `diagnose_order_no` varchar(20) NOT NULL COMMENT '诊断序号',
+  `diagnose_type` varchar(20) DEFAULT NULL COMMENT '诊断类别',
+  `diagnose_type_short` varchar(20) DEFAULT NULL COMMENT '诊断判别',
+  `diagnose_name` varchar(200) DEFAULT NULL COMMENT '诊断名称',
+  `behospital_type` varchar(20) DEFAULT NULL COMMENT '入院情况',
+  `leave_hospital_type` varchar(20) DEFAULT NULL COMMENT '出院情况',
+  `pathology_diagnose` varchar(20) DEFAULT NULL COMMENT '病理号',
+  `icd_code` varchar(20) DEFAULT NULL COMMENT '诊断编码',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Table structure for med_home_operation_info
+-- ----------------------------
+DROP TABLE IF EXISTS `med_home_operation_info`;
+CREATE TABLE `med_home_operation_info` (
+  `home_page_id` varchar(20) NOT NULL COMMENT '病案首页ID',
+  `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院ID',
+  `operation_order_no` varchar(20) NOT NULL COMMENT '手术序号',
+  `operation_date` datetime(6) DEFAULT NULL COMMENT '手术日期',
+  `operation_code` varchar(20) DEFAULT NULL COMMENT '手术编码',
+  `operation_doctor_id` varchar(20) DEFAULT NULL COMMENT '手术医生',
+  `first_assistant_id` varchar(20) DEFAULT NULL COMMENT '一助医生',
+  `second_assistant_id` varchar(20) DEFAULT NULL COMMENT '二助医生',
+  `cut_level` varchar(20) DEFAULT NULL COMMENT '切口等级',
+  `healing_level` varchar(20) DEFAULT NULL COMMENT '愈合等级',
+  `operation_name` varchar(200) DEFAULT NULL COMMENT '手术名称',
+  `operation_level` varchar(20) DEFAULT NULL COMMENT '手术级别',
+  `anaesthesia_name` varchar(100) DEFAULT NULL COMMENT '麻醉方式',
+  `sham_operation_name` varchar(200) DEFAULT NULL COMMENT '拟手术名称',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Table structure for med_home_page
+-- ----------------------------
+DROP TABLE IF EXISTS `med_home_page`;
+CREATE TABLE `med_home_page` (
+  `home_page_id` varchar(20) NOT NULL COMMENT '病案首页编号',
+  `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院ID',
+  `behospital_code` varchar(20) NOT NULL COMMENT '病人住院序号',
+  `hospital_code` varchar(20) DEFAULT NULL COMMENT '组织机构id',
+  `hospital_name` varchar(20) DEFAULT NULL COMMENT '医疗机构名称',
+  `org_code` varchar(20) DEFAULT NULL COMMENT '医疗机构代码',
+  `pay_type` varchar(20) DEFAULT NULL COMMENT '医疗付费方式',
+  `health_card` varchar(20) DEFAULT NULL COMMENT '健康卡号',
+  `behospital_num` varchar(10) DEFAULT NULL COMMENT '住院次数',
+  `file_code` varchar(20) DEFAULT NULL COMMENT '病案号',
+  `name` varchar(40) DEFAULT NULL COMMENT '姓名',
+  `sex` varchar(10) DEFAULT NULL COMMENT '性别',
+  `birthday` datetime DEFAULT NULL COMMENT '出生日期',
+  `age` varchar(10) DEFAULT NULL COMMENT '年龄',
+  `age_unit` varchar(20) DEFAULT NULL COMMENT '年龄单位',
+  `nationality` varchar(20) DEFAULT NULL COMMENT '国籍',
+  `newborn_month` varchar(10) DEFAULT NULL COMMENT '新生儿出生月数',
+  `newborn_day` varchar(10) DEFAULT NULL COMMENT '新生儿出生天数',
+  `newborn_weight` varchar(10) DEFAULT NULL COMMENT '新生儿出生体重',
+  `newborn_behospital_weight` varchar(10) DEFAULT NULL COMMENT '新生儿入院体重',
+  `born_address` varchar(100) DEFAULT NULL COMMENT '出生地',
+  `born_place` varchar(100) DEFAULT NULL COMMENT '籍贯',
+  `nation` varchar(10) DEFAULT NULL COMMENT '民族',
+  `identity_card_no` varchar(20) DEFAULT NULL COMMENT '身份证号',
+  `job_type` varchar(20) DEFAULT NULL COMMENT '职业',
+  `marriage` varchar(20) DEFAULT NULL COMMENT '婚姻',
+  `cur_address` varchar(100) DEFAULT NULL COMMENT '现住址',
+  `cur_phone` varchar(20) DEFAULT NULL COMMENT '现住址电话',
+  `cur_post_code` varchar(6) DEFAULT NULL COMMENT '现住址邮编',
+  `residence_address` varchar(100) DEFAULT NULL COMMENT '户口地址',
+  `residence_post_code` varchar(6) DEFAULT NULL COMMENT '户口地址邮编',
+  `work_address` varchar(60) DEFAULT NULL COMMENT '工作单位',
+  `work_phone` varchar(20) DEFAULT NULL COMMENT '工作单位电话',
+  `work_post_code` varchar(6) DEFAULT NULL COMMENT '工作单位邮编',
+  `contact_name` varchar(20) DEFAULT NULL COMMENT '联系人姓名',
+  `contact_relation` varchar(60) DEFAULT NULL COMMENT '联系人关系',
+  `contact_address` varchar(100) DEFAULT NULL COMMENT '联系人地址',
+  `contact_phone` varchar(20) DEFAULT NULL COMMENT '联系人电话',
+  `behospital_way` varchar(20) DEFAULT NULL COMMENT '入院途径',
+  `behospital_date` datetime DEFAULT NULL COMMENT '入院时间',
+  `behospital_dept` varchar(20) DEFAULT NULL COMMENT '入院科别',
+  `behospital_ward` varchar(20) DEFAULT NULL COMMENT '入院病房',
+  `behospital_bed_id` varchar(20) DEFAULT NULL COMMENT '入院床位序号',
+  `behospital_bed_code` varchar(20) DEFAULT NULL COMMENT '入院床位号码',
+  `change_dept` varchar(50) DEFAULT NULL COMMENT '转科科别',
+  `leave_hospital_date` datetime DEFAULT NULL COMMENT '出院时间',
+  `leave_hospital_dept` varchar(20) DEFAULT NULL COMMENT '出院科别',
+  `leave_hospital_ward` varchar(20) DEFAULT NULL COMMENT '出院病房',
+  `leave_hospital_bed_id` varchar(20) DEFAULT NULL COMMENT '出院床位序号',
+  `leave_hospital_bed_code` varchar(20) DEFAULT NULL COMMENT '出院床位号码',
+  `behospital_day_num` varchar(10) DEFAULT NULL COMMENT '实际住院天数',
+  `outpatient_emr_diagnose` varchar(100) DEFAULT NULL COMMENT '门急诊诊断',
+  `outpatient_emr_diagnose_code` varchar(20) DEFAULT NULL COMMENT '门急诊诊断编码',
+  `poison_factor` varchar(100) DEFAULT NULL COMMENT '损伤中毒因素',
+  `poison_factor_code` varchar(50) DEFAULT NULL COMMENT '损伤中毒因素编码',
+  `pathology_diagnose` varchar(100) DEFAULT NULL COMMENT '病理诊断',
+  `pathology_diagnose_code` varchar(50) DEFAULT NULL COMMENT '病理诊断编码',
+  `pathology_diagnose_id` varchar(50) DEFAULT NULL COMMENT '病理诊断编号',
+  `is_med_allergy` varchar(10) DEFAULT NULL COMMENT '药物过敏',
+  `med_allergy_name` varchar(20) DEFAULT NULL COMMENT '过敏药物',
+  `autopsy` varchar(10) DEFAULT NULL COMMENT '死亡患者尸检',
+  `blood_type` varchar(20) DEFAULT NULL COMMENT '血型',
+  `rh` varchar(20) DEFAULT NULL COMMENT 'Rh',
+  `dept_director` varchar(20) DEFAULT NULL COMMENT '科主任',
+  `director_doctor` varchar(20) DEFAULT NULL COMMENT '主任医师',
+  `attending_doctor` varchar(20) DEFAULT NULL COMMENT '主治医师',
+  `behospital_doctor` varchar(20) DEFAULT NULL COMMENT '住院医师',
+  `response_nurse` varchar(20) DEFAULT NULL COMMENT '责任护士',
+  `study_doctor` varchar(20) DEFAULT NULL COMMENT '进修医师',
+  `practice_doctor` varchar(20) DEFAULT NULL COMMENT '实习医师',
+  `encode_man` varchar(20) DEFAULT NULL COMMENT '编码员',
+  `home_page_quality` varchar(20) DEFAULT NULL COMMENT '病案质量',
+  `qc_doctor` varchar(20) DEFAULT NULL COMMENT '质控医师',
+  `qc_nurse` varchar(20) DEFAULT NULL COMMENT '质控护士',
+  `qc_date` datetime DEFAULT NULL COMMENT '质控日期',
+  `leave_hospital_type` varchar(10) DEFAULT NULL COMMENT '离院方式',
+  `accept_org_code` varchar(100) DEFAULT NULL COMMENT '接收机构名称',
+  `again_behospital_plan` varchar(10) DEFAULT NULL COMMENT '31天内再住院计划',
+  `again_behospital_goal` varchar(100) DEFAULT NULL COMMENT '再住院目的',
+  `tbi_before_day` varchar(10) DEFAULT NULL COMMENT '颅脑损伤患者昏迷前天数',
+  `tbi_before_hour` varchar(10) DEFAULT NULL COMMENT '颅脑损伤患者昏迷前小时',
+  `tbi_before_minute` varchar(10) DEFAULT NULL COMMENT '颅脑损伤患者昏迷前分钟',
+  `tbi_after_day` varchar(10) DEFAULT NULL COMMENT '颅脑损伤患者昏迷后天数',
+  `tbi_after_hour` varchar(10) DEFAULT NULL COMMENT '颅脑损伤患者昏迷后小时',
+  `tbi_after_minute` varchar(10) DEFAULT NULL COMMENT '颅脑损伤患者昏迷后分钟',
+  `total_fee` varchar(20) DEFAULT NULL COMMENT '总费用',
+  `own_fee` varchar(20) DEFAULT NULL COMMENT '自付金额',
+  `general_fee` varchar(20) DEFAULT NULL COMMENT '一般医疗服务费',
+  `service_fee` varchar(20) DEFAULT NULL COMMENT '一般治疗服务费',
+  `nurse_fee` varchar(20) DEFAULT NULL COMMENT '护理费',
+  `other_fee` varchar(20) DEFAULT NULL COMMENT '其他费用',
+  `pathology_fee` varchar(20) DEFAULT NULL COMMENT '病理诊断费',
+  `lab_fee` varchar(20) DEFAULT NULL COMMENT '实验室诊断费',
+  `pacs_fee` varchar(20) DEFAULT NULL COMMENT '影像学诊断费',
+  `clinic_diagnose_fee` varchar(20) DEFAULT NULL COMMENT '临床诊断项目费',
+  `not_operation_fee` varchar(20) DEFAULT NULL COMMENT '非手术治疗项目费',
+  `clinic_physic_fee` varchar(20) DEFAULT NULL COMMENT '临床物理治疗费',
+  `operation_treat_fee` varchar(20) DEFAULT NULL COMMENT '手术治疗费',
+  `anaesthesia_fee` varchar(20) DEFAULT NULL COMMENT '麻醉费',
+  `operation_fee` varchar(20) DEFAULT NULL COMMENT '手术费',
+  `health_type_fee` varchar(20) DEFAULT NULL COMMENT '康复类',
+  `chn_treat_fee` varchar(20) DEFAULT NULL COMMENT '中医治疗费',
+  `western_med_fee` varchar(20) DEFAULT NULL COMMENT '西药费',
+  `antibiosis_fee` varchar(20) DEFAULT NULL COMMENT '抗菌药物费用',
+  `chn_med_fee` varchar(20) DEFAULT NULL COMMENT '中成药费',
+  `chn_herb_fee` varchar(20) DEFAULT NULL COMMENT '中草药费',
+  `blood_fee` varchar(20) DEFAULT NULL COMMENT '血费',
+  `albumen_fee` varchar(20) DEFAULT NULL COMMENT '白蛋白类制品费',
+  `globulin_fee` varchar(20) DEFAULT NULL COMMENT '球蛋白类制品费',
+  `blood_factor_fee` varchar(20) DEFAULT NULL COMMENT '凝血因子类制品费',
+  `cell_factor_fee` varchar(20) DEFAULT NULL COMMENT '细胞因子类制品费',
+  `check_material_fee` varchar(20) DEFAULT NULL COMMENT '检查用一次性医用材料费',
+  `treat_material_fee` varchar(20) DEFAULT NULL COMMENT '治疗用一次性医用材料费',
+  `operation_material_fee` varchar(20) DEFAULT NULL COMMENT '手术用一次性医用材料费',
+  `other_type_fee` varchar(20) DEFAULT NULL COMMENT '其他类其他费',
+  `single_diag_manage` varchar(10) DEFAULT NULL COMMENT '单病种管理',
+  `clinic_pathway_manage` varchar(10) DEFAULT NULL COMMENT '临床路径管理',
+  `is_outpatient_behospital` varchar(10) DEFAULT NULL COMMENT '门诊与住院',
+  `is_leave_behospital` varchar(10) DEFAULT NULL COMMENT '入院与出院',
+  `is_operation_before_after` varchar(10) DEFAULT NULL COMMENT '术前与术后',
+  `is_clinic_pathology` varchar(10) DEFAULT NULL COMMENT '临床与病理',
+  `is_radiate_pathology` varchar(10) DEFAULT NULL COMMENT '放射与病理',
+  `rescue_num` varchar(10) DEFAULT NULL COMMENT '病人抢救次数',
+  `rescue_success_num` varchar(10) DEFAULT NULL COMMENT '病人抢救成功次数',
+  `is_auto_leavehospital` varchar(10) DEFAULT NULL COMMENT '是否为自动出院',
+  `return_to_type` varchar(10) DEFAULT NULL COMMENT '转归情况',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  PRIMARY KEY (`home_page_id`,`hospital_id`),
+  KEY `behospital_code` (`behospital_code`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Table structure for med_medical_record
+-- ----------------------------
+DROP TABLE IF EXISTS `med_medical_record`;
+CREATE TABLE `med_medical_record` (
+  `rec_id` varchar(20) NOT NULL,
+  `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院ID',
+  `behospital_code` varchar(50) DEFAULT NULL COMMENT '病人住院ID',
+  `org_code` varchar(20) DEFAULT NULL COMMENT '组织机构代码',
+  `rec_type_id` varchar(100) DEFAULT NULL COMMENT '病历类别编号',
+  `mode_id` bigint(20) DEFAULT 0 COMMENT '模块id',
+  `rec_date` varchar(50) DEFAULT NULL COMMENT '病历日期',
+  `rec_title` varchar(128) DEFAULT NULL COMMENT '病历标题',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  PRIMARY KEY (`rec_id`,`hospital_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Table structure for med_medical_record_content
+-- ----------------------------
+DROP TABLE IF EXISTS `med_medical_record_content`;
+CREATE TABLE `med_medical_record_content` (
+  `rec_id` varchar(11) NOT NULL COMMENT '病历ID',
+  `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院ID',
+  `content_blob` longblob COMMENT '文书内容(blob)',
+  `content_text` longtext COMMENT '病历文本(文本)',
+  `html_text` longtext COMMENT 'html文本信息',
+  `xml_text` longtext COMMENT 'xml文本信息',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  PRIMARY KEY (`rec_id`,`hospital_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Table structure for med_qcresult_detail
+-- ----------------------------
+DROP TABLE IF EXISTS `med_qcresult_detail`;
+CREATE TABLE `med_qcresult_detail` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院ID',
+  `behospital_code` varchar(255) NOT NULL DEFAULT '' COMMENT '病人住院ID',
+  `cases_id` bigint(20) DEFAULT NULL COMMENT '模块id',
+  `cases_score` decimal(5,1) DEFAULT NULL COMMENT '模块总分',
+  `cases_entry_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '条目ID',
+  `score` decimal(5,1) DEFAULT NULL COMMENT '人工修改分值',
+  `msg` varchar(255) DEFAULT NULL COMMENT '提示信息',
+  `is_reject` int(3) DEFAULT '0' COMMENT '单项否决(1-单项否决 0-非)',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`),
+  KEY `behospital_code` (`behospital_code`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='质控评分明细信息\r\n每次评分增加一条信息,前面所有评分is_deleted全部设置为Y';
+
+-- ----------------------------
+-- Table structure for med_qcresult_info
+-- ----------------------------
+DROP TABLE IF EXISTS `med_qcresult_info`;
+CREATE TABLE `med_qcresult_info` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `hospital_id` bigint(20) DEFAULT '0' COMMENT '医院ID',
+  `behospital_code` varchar(255) NOT NULL DEFAULT '' COMMENT '病人住院ID',
+  `level` varchar(20) NOT NULL DEFAULT '' COMMENT '等级',
+  `page_data` longtext COMMENT '页面数据',
+  `menu_data` longtext COMMENT '菜单数据',
+  `grade_type` tinyint(4) DEFAULT '1' COMMENT '评分类型(1:机器,2:人工)',
+  `score_res` decimal(5,1) NOT NULL DEFAULT '0.0' COMMENT '最后得分',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`),
+  KEY `behospital_code` (`behospital_code`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='质控评分主表信息\r\n每次评分增加一条信息,前面所有评分is_deleted全部设置为Y';
+
+-- ----------------------------
+-- Table structure for med_record_type
+-- ----------------------------
+DROP TABLE IF EXISTS `med_record_type`;
+CREATE TABLE `med_record_type` (
+  `type_id` varchar(16) NOT NULL COMMENT '类别ID',
+  `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院ID',
+  `type_name` varchar(128) DEFAULT NULL COMMENT '类别名称',
+  `parent_type_id` varchar(16) DEFAULT NULL COMMENT '上级类别',
+  `obj_name` varchar(4) DEFAULT NULL COMMENT '服务对象(全院、科室、个人)',
+  `spell` varchar(32) DEFAULT NULL COMMENT '拼音',
+  `remark` varchar(256) DEFAULT NULL,
+  PRIMARY KEY (`type_id`,`hospital_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Table structure for qc_cases
+-- ----------------------------
+DROP TABLE IF EXISTS `qc_cases`;
+CREATE TABLE `qc_cases` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `name` varchar(255) DEFAULT NULL COMMENT '模块名称',
+  `prefix` varchar(255) DEFAULT NULL COMMENT '模块编码前缀',
+  `order_no` int(6) DEFAULT NULL COMMENT '顺序号',
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=285 DEFAULT CHARSET=utf8 COMMENT='模块数据标准';
+
+-- ----------------------------
+-- Table structure for qc_cases_entry
+-- ----------------------------
+DROP TABLE IF EXISTS `qc_cases_entry`;
+CREATE TABLE `qc_cases_entry` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `cases_id` bigint(20) DEFAULT NULL COMMENT '病历id',
+  `cases_name` varchar(255) DEFAULT NULL,
+  `mode_id` bigint(20) DEFAULT NULL COMMENT '数据模块ID-对应qc_mode.id',
+  `code` varchar(255) DEFAULT NULL,
+  `name` varchar(255) DEFAULT NULL COMMENT '条目',
+  `precond` varchar(255) DEFAULT NULL,
+  `order_no` int(6) DEFAULT NULL COMMENT '顺序号',
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2774 DEFAULT CHARSET=utf8 COMMENT='病历条目';
+
+-- ----------------------------
+-- Table structure for qc_cases_entry_hospital
+-- ----------------------------
+DROP TABLE IF EXISTS `qc_cases_entry_hospital`;
+CREATE TABLE `qc_cases_entry_hospital` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `cases_entry_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '条目ID',
+  `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院ID',
+  `score` decimal(5,1) NOT NULL DEFAULT '0.0' COMMENT '扣分值',
+  `msg` varchar(1024) DEFAULT NULL COMMENT '条目提示信息',
+  `is_used` int(3) NOT NULL DEFAULT '0' COMMENT '0-未启用 1-启用',
+  `is_reject` int(3) DEFAULT '0' COMMENT '单项否决(1-单项否决 0-非)',
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=6944 DEFAULT CHARSET=utf8 COMMENT='病历条目';
+
+-- ----------------------------
+-- Table structure for qc_cases_hospital
+-- ----------------------------
+DROP TABLE IF EXISTS `qc_cases_hospital`;
+CREATE TABLE `qc_cases_hospital` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院ID',
+  `cases_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '模块ID',
+  `score` decimal(5,1) NOT NULL DEFAULT '0.0' COMMENT '模块总分',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8 COMMENT='医院模块数据';
+
+-- ----------------------------
+-- Table structure for qc_mode
+-- ----------------------------
+DROP TABLE IF EXISTS `qc_mode`;
+CREATE TABLE `qc_mode` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `name` varchar(128) DEFAULT NULL COMMENT '模块名称',
+  `order_no` int(11) DEFAULT '1' COMMENT '排序号',
+  `parent_id` bigint(20) DEFAULT NULL COMMENT '上级模块',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8 COMMENT='病历';
+
+-- ----------------------------
+-- Table structure for qc_model_hospital
+-- ----------------------------
+DROP TABLE IF EXISTS `qc_model_hospital`;
+CREATE TABLE `qc_model_hospital` (
+  `hospital_model_name` varchar(255) DEFAULT NULL,
+  `stand_model_name` varchar(255) DEFAULT NULL,
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `hospital_id` int(11) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=957 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Table structure for qc_model_mapping
+-- ----------------------------
+DROP TABLE IF EXISTS `qc_model_mapping`;
+CREATE TABLE `qc_model_mapping` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `case_number_id` bigint(20) DEFAULT NULL COMMENT '病历号',
+  `case_number` varchar(255) DEFAULT NULL,
+  `mode_id` bigint(20) DEFAULT NULL COMMENT '数据类型id',
+  `origin_mode` varchar(255) DEFAULT NULL,
+  `text` longtext COMMENT '内容',
+  `origin_text` longtext,
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=257952 DEFAULT CHARSET=utf8 COMMENT='病历内容';
+
+-- ----------------------------
+-- Table structure for qc_type
+-- ----------------------------
+DROP TABLE IF EXISTS `qc_type`;
+CREATE TABLE `qc_type` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `name` varchar(255) DEFAULT NULL COMMENT '质控类型名称',
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='质控类型标准';
+
+-- ----------------------------
+-- Table structure for qc_type_cases_entry
+-- ----------------------------
+DROP TABLE IF EXISTS `qc_type_cases_entry`;
+CREATE TABLE `qc_type_cases_entry` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `type_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '质控类型ID',
+  `case_entry_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '条目数据ID',
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=649 DEFAULT CHARSET=utf8 COMMENT='质控类型和质控条目关联表';
+
+-- ----------------------------
+-- Table structure for qc_type_doc
+-- ----------------------------
+DROP TABLE IF EXISTS `qc_type_doc`;
+CREATE TABLE `qc_type_doc` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `type_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '质控类型ID(qc_type.id)',
+  `hospital_type_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院文书类型的类型id(med_record_type.type_id)',
+  `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院文书类型的医院ID(med_record_type.hospital_id)',
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='质控类型和医院文书类型关联表';
+
+-- ----------------------------
+-- Table structure for sys_dictionary_info
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_dictionary_info`;
+CREATE TABLE `sys_dictionary_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则表示纪录未修改',
+  `group_type` bigint(20) NOT NULL DEFAULT '0' COMMENT '分组(值自定义)',
+  `name` varchar(100) NOT NULL DEFAULT '' COMMENT '内容',
+  `val` varchar(255) NOT NULL DEFAULT '' COMMENT '值',
+  `return_type` int(11) NOT NULL DEFAULT '1' COMMENT '返回类型(0: 都返回,1:后台维护返回 2:界面返回)',
+  `order_no` int(11) NOT NULL DEFAULT '0' COMMENT '排序号',
+  `remark` varchar(300) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=224 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 '编码,与前端对应',
+  `order_no` int(11) NOT NULL DEFAULT '0' COMMENT '排序,从小到大',
+  `remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COMMENT='系统菜单';
+
+-- ----------------------------
+-- 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 DEFAULT CHARSET=utf8 COMMENT='菜单和系统资源的映射表';
+
+-- ----------------------------
+-- 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 '资源名称',
+  `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=17 DEFAULT CHARSET=utf8 COMMENT='系统资源表';
+
+-- ----------------------------
+-- 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=3 DEFAULT CHARSET=utf8 COMMENT='系统角色表';
+
+-- ----------------------------
+-- 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=9 DEFAULT CHARSET=utf8 COMMENT='角色和菜单的映射表';
+
+-- ----------------------------
+-- 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=19 DEFAULT CHARSET=utf8 COMMENT='角色和资源的映射表';
+
+-- ----------------------------
+-- Table structure for sys_task_cron
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_task_cron`;
+CREATE TABLE `sys_task_cron` (
+  `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则表示纪录未修改',
+  `cron_code` varchar(30) NOT NULL DEFAULT '' COMMENT '任务编号',
+  `cron` varchar(30) NOT NULL DEFAULT '' COMMENT '任务执行周期',
+  `is_used` int(3) NOT NULL DEFAULT '0' COMMENT '0-未启用 1-启用',
+  `remark` varchar(100) NOT NULL DEFAULT '' COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='定时任务';
+
+-- ----------------------------
+-- Table structure for sys_user
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_user`;
+CREATE TABLE `sys_user` (
+  `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则表示纪录未修改',
+  `username` varchar(255) NOT NULL DEFAULT '' COMMENT '用户名',
+  `password` varchar(255) NOT NULL DEFAULT '' COMMENT '用户密码',
+  `linkman` varchar(255) NOT NULL DEFAULT '' COMMENT '联系人',
+  `type` int(11) NOT NULL DEFAULT '0' COMMENT '1内部用户,0外部用户(默认0)',
+  `remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
+  PRIMARY KEY (`id`),
+  KEY `uk_username` (`username`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8 COMMENT='系统用户表';
+
+-- ----------------------------
+-- Table structure for sys_user_hospital
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_user_hospital`;
+CREATE TABLE `sys_user_hospital` (
+  `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',
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COMMENT='用户-机构表映射表';
+
+-- ----------------------------
+-- Table structure for sys_user_role
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_user_role`;
+CREATE TABLE `sys_user_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则表示纪录未修改',
+  `user_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '系统用户表.用户ID',
+  `role_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '系统角色表.角色ID',
+  `remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8 COMMENT='系统用户角色关联表';
+
+
+-- ----------------------------
+-- Table structure for qc_cases_entry_pagedata
+-- ----------------------------
+DROP TABLE IF EXISTS `qc_cases_entry_pagedata`;
+CREATE TABLE `qc_cases_entry_pagedata` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `cases_entry_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '条目ID',
+  `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院ID',
+  `page_key` varchar(255) NOT NULL DEFAULT '' COMMENT '页面数据对应的key',
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='质控条目对应页面数据映射表';

BIN=BIN
doc/002.20200426第二版/qc_init.zip


+ 545 - 0
doc/003.20200515第3期/qc_init.sql

@@ -0,0 +1,545 @@
+use `qc`;
+
+DROP TABLE IF EXISTS `qc_abnormal`;
+CREATE TABLE `qc_abnormal` (
+  `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',
+  `behospital_code` varchar(16) NOT NULL DEFAULT '' COMMENT '病人住院ID',
+  `type` int(11) NOT NULL DEFAULT '1' COMMENT '异常类型(1:数据模块 2:质控类型 3:XML结构)',
+  `description` varchar(255) NOT NULL DEFAULT '' COMMENT '异常描述',
+  `status` int(11) NOT NULL DEFAULT '0' COMMENT '状态(0:未处理,1:已处理)',
+  `remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='异常数据监控信息';
+
+DROP TABLE IF EXISTS `med_qcresult_cases`;
+CREATE TABLE `med_qcresult_cases` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `hospital_id` bigint(20) DEFAULT '0' COMMENT '医院ID',
+  `behospital_code` varchar(255) NOT NULL DEFAULT '' COMMENT '病人住院ID',
+  `cases_id` bigint(20) DEFAULT '0' COMMENT '数据模块ID(0:其他模块)',
+  `score_res` decimal(5,1) NOT NULL DEFAULT '0.0' COMMENT '最后得分',
+  `level` varchar(20) NOT NULL DEFAULT '' 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则表示纪录未修改',
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`),
+  KEY `idx_behospital_code` (`behospital_code`) USING BTREE,
+  KEY `idx_hospital_id` (`hospital_id`) USING BTREE,
+  KEY `idx_hospital_id_behospital_code` (`hospital_id`,`behospital_code`) USING BTREE,
+  KEY `idx_is_deleted` (`is_deleted`) USING BTREE,
+  KEY `idx_mix` (`hospital_id`,`behospital_code`,`is_deleted`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='质控评分模块评分信息';
+
+ALTER TABLE `qc`.`qc_model_hospital`
+  ADD COLUMN `is_deleted` CHAR(3) DEFAULT 'N' NULL COMMENT '是否删除,N:未删除,Y:删除' AFTER `stand_model_name`,
+  ADD COLUMN `gmt_create` DATETIME DEFAULT '1970-01-01 12:00:00' NULL COMMENT '记录创建时间' AFTER `is_deleted`,
+  ADD COLUMN `gmt_modified` DATETIME DEFAULT '1970-01-01 12:00:00' NULL COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改' AFTER `gmt_create`,
+  ADD COLUMN `creator` VARCHAR (60) DEFAULT '0' NULL COMMENT '创建人,0表示无创建人值' AFTER `gmt_modified`,
+  ADD COLUMN `modifier` VARCHAR (60) DEFAULT '0' NULL COMMENT '修改人,如果为0则表示纪录未修改' AFTER `creator`,
+  ADD COLUMN `remark` VARCHAR (255) NULL COMMENT '备注' AFTER `modifier` ;
+
+INSERT INTO `qc`.`sys_task_cron` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `cron_code`, `cron`, `is_used`, `remark`) VALUES ('-1', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', 'TASK_CX', '0 0 22 * * ?', '1', '每天晚上自动评分出院日期之前3天的未评分数据');
+UPDATE `qc`.`sys_task_cron` SET `id`='1', `is_deleted`='Y', `gmt_create`='1970-01-01 12:00:00', `gmt_modified`='1970-01-01 12:00:00', `creator`='0', `modifier`='0', `cron_code`='TASK001', `cron`='59 59 23 * * ?', `is_used`='1', `remark`='59 59 23 * * ?' WHERE (`id`='1');
+
+-- ----------------------------
+-- 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=32 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, -10, '用户-控制台');
+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, '用户-权限管理-角色管理');
+INSERT INTO `sys_menu` VALUES (15, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '控制台(科室)', -1, 'YH-KZTKS', 1, 1, -9, '用户-控制台(科室)');
+INSERT INTO `sys_menu` VALUES (16, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '异常数据监控', -1, 'YH-YCSJJK', 1, 0, 10, '用户-异常数据监控');
+INSERT INTO `sys_menu` VALUES (17, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '数据报表明细', -1, 'YH-ZKK', 1, 1, -8, '用户-质控科');
+INSERT INTO `sys_menu` VALUES (18, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '数据报表明细(科室)', -1, 'YH-KSZR', 1, 1, -7, '用户-科室主任');
+INSERT INTO `sys_menu` VALUES (19, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各模块缺陷占比', 17, 'YH-ZKK-GMKQXZB_XQ', 1, 1, 2, '用户-质控科-各模块缺陷占比_详情');
+INSERT INTO `sys_menu` VALUES (20, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '条目缺陷占比', 17, 'YH-ZKK-TMQXZB_XQ', 1, 1, 3, '用户-质控科-条目缺陷占比_详情');
+INSERT INTO `sys_menu` VALUES (21, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '科室平均住院天数', 17, 'YH-ZKK-KSPJZYTS_XQ', 1, 1, 4, '用户-质控科-科室平均住院天数_详情');
+INSERT INTO `sys_menu` VALUES (22, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '科室平均住院花费', 17, 'YH-ZKK-KSPJZYHF_XQ', 1, 1, 5, '用户-质控科-科室平均住院花费_详情');
+INSERT INTO `sys_menu` VALUES (23, 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各科室质控平均分', 17, 'YH-ZKK-GKSZKPJF_XQ', 1, 1, 6, '用户-质控科-各科室质控平均分_详情');
+INSERT INTO `sys_menu` VALUES (24, 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '缺陷详情', 17, 'YH-ZKK-GKSQXZB', 1, 1, 7, '用户-质控科-各科室缺陷占比_详情');
+INSERT INTO `sys_menu` VALUES (25, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各科室甲级病历占比', 17, 'YH-ZKK-GKSJJBLZB_XQ', 1, 1, 8, '用户-质控科-各科室甲级病历占比_详情');
+INSERT INTO `sys_menu` VALUES (26, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各模块缺陷占比', 18, 'YH-KSZR-GMKQXZB_XQ', 1, 1, 2, '用户-科室主任-各模块缺陷占比_详情');
+INSERT INTO `sys_menu` VALUES (27, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '条目缺陷占比', 18, 'YH-KSZR-TMQXZB_XQ', 1, 1, 3, '用户-科室主任-条目缺陷占比_详情');
+INSERT INTO `sys_menu` VALUES (28, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '病案首页合格率占比', 17, 'YH-ZKK-BASYHGLZB_XQ', 1, 1, 1, '用户-质控科-病案首页合格率占比_详情');
+INSERT INTO `sys_menu` VALUES (29, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '病案首页合格率占比', 18, 'YH-KSZR-BASYHGLZB_XQ', 1, 1, 1, '用户-科室主任-病案首页合格率占比_详情');
+INSERT INTO `sys_menu` VALUES (30, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '科室缺陷占比', 18, 'YH-KSZR-KSQXZB_XQ', 1, 1, 4, '用户-科室主任-科室缺陷占比_详情');
+INSERT INTO `sys_menu` VALUES (31, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各科室缺陷占比', 17, 'YH-ZKK-GKSQXZB_XQ', 1, 1, 9, '用户-质控科-各科室缺陷占比_详情');
+
+-- ----------------------------
+-- 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=62 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', '用户-质控评分(个人)-获取详情');
+INSERT INTO `sys_menu_permission` VALUES ('32', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '45', '控制台-平均住院天数');
+INSERT INTO `sys_menu_permission` VALUES ('33', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '46', '控制台-平均住院费用');
+INSERT INTO `sys_menu_permission` VALUES ('34', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '47', '控制台-质控平均分按科室统计');
+INSERT INTO `sys_menu_permission` VALUES ('35', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '48', '控制台-各科室甲级病历占比');
+INSERT INTO `sys_menu_permission` VALUES ('36', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '49', '控制台-出院人数统计');
+INSERT INTO `sys_menu_permission` VALUES ('37', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '50', '控制台-质控病历统计');
+INSERT INTO `sys_menu_permission` VALUES ('38', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '51', '控制台-各模块缺陷占比排行');
+INSERT INTO `sys_menu_permission` VALUES ('39', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '52', '控制台-条目缺陷占比');
+INSERT INTO `sys_menu_permission` VALUES ('40', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '53', '控制台-各科室缺陷占比');
+INSERT INTO `sys_menu_permission` VALUES ('41', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '15', '54', '控制台(科室)-出院人数统计(科室)');
+INSERT INTO `sys_menu_permission` VALUES ('42', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '15', '55', '控制台(科室)-质控病历数统计(科室)');
+INSERT INTO `sys_menu_permission` VALUES ('43', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '15', '56', '控制台(科室)-各模块缺陷占比排行(科室)');
+INSERT INTO `sys_menu_permission` VALUES ('44', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '15', '57', '控制台(科室)-条目缺陷占比(科室)');
+INSERT INTO `sys_menu_permission` VALUES ('45', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '15', '58', '控制台(科室)-查询用户关联科室');
+INSERT INTO `sys_menu_permission` VALUES ('46', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '19', '59', '控制台-各模块缺陷占比_详情');
+INSERT INTO `sys_menu_permission` VALUES ('47', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '20', '60', '控制台-条目缺陷占比_详情');
+INSERT INTO `sys_menu_permission` VALUES ('48', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '21', '64', '控制台-科室平均住院天数_详情');
+INSERT INTO `sys_menu_permission` VALUES ('49', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '22', '65', '控制台-科室平均住院花费_详情');
+INSERT INTO `sys_menu_permission` VALUES ('50', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '66', '控制台-各科室质控平均分_详情');
+INSERT INTO `sys_menu_permission` VALUES ('51', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '31', '67', '控制台-各科室缺陷占比-缺陷详情');
+INSERT INTO `sys_menu_permission` VALUES ('52', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '25', '68', '控制台-各科室甲级病历占比_详情');
+INSERT INTO `sys_menu_permission` VALUES ('53', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '26', '69', '控制台(科室)-各模块缺陷占比_详情');
+INSERT INTO `sys_menu_permission` VALUES ('54', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '27', '70', '控制台(科室)-条目缺陷占比_详情');
+INSERT INTO `sys_menu_permission` VALUES ('55', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '31', '71', '控制台-各科室缺陷占比(组合)');
+INSERT INTO `sys_menu_permission` VALUES ('56', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '28', '72', '控制台-病案首页合格率占比');
+INSERT INTO `sys_menu_permission` VALUES ('57', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '30', '73', '控制台(科室)-各科室缺陷占比(科室)');
+INSERT INTO `sys_menu_permission` VALUES ('58', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '29', '74', '控制台(科室)-病案首页合格率占比(科室)');
+INSERT INTO `sys_menu_permission` VALUES ('59', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '75', '控制台-病案首页合格率占比(首页)');
+INSERT INTO `sys_menu_permission` VALUES ('60', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '15', '76', '控制台(科室)-病案首页合格率占比(首页)');
+INSERT INTO `sys_menu_permission` VALUES ('61', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '30', '77', '控制台(科室)-科室缺陷占比-缺陷明细');
+
+-- ----------------------------
+-- 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=78 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', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取医院模块数据信息', 'FUNC000003', '/qc/cases/getQcCases', 'ALL', '用户-基础数据维护-获取医院模块数据信息', '无需加密');
+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', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '分页查询', 'FUNC000005', '/qc/behospitalInfo/page', 'ALL', '用户-质控评分-分页', '无需加密');
+INSERT INTO `sys_permission` VALUES ('6', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '分页获取医院条目数据信息', 'FUNC000006', '/qc/casesEntryHospital/getQcCasesEntryAll', 'ALL', '用户-条目数据维护-分页获取医院条目数据信息', '无需加密');
+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', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取医院模块下拉数据列表', 'FUNC000008', '/qc/casesEntryHospital/getQcCasesAll', 'ALL', '获取医院模块数据列表', '无需加密');
+INSERT INTO `sys_permission` VALUES ('9', 'Y', '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', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取质控评分详情', 'FUNC000014', '/qc/behospitalInfo/getByBehospitalCode', 'ALL', '用户-质控评分-获取详情', '无需加密');
+INSERT INTO `sys_permission` VALUES ('15', 'Y', '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', 'Y', '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', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取医院科室下拉列表信息', 'FUNC000030', '/bas/dept/getList', 'ALL', '用户-质控评分-获取病历质控一览下医院科室下拉列表信息', '无需加密');
+INSERT INTO `sys_permission` VALUES ('31', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取用户科室下拉列表信息', 'FUNC000031', '/bas/dept/getListUser', 'ALL', '用户-质控评分(科室)-获取病历质控一览下用户科室下拉列表信息', '无需加密');
+INSERT INTO `sys_permission` VALUES ('32', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '分页查询', 'FUNC000032', '/qc/behospitalInfo/page_dept', 'ALL', '用户-质控评分(科室)-分页', '无需加密');
+INSERT INTO `sys_permission` VALUES ('33', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '分页查询', 'FUNC000033', '/qc/behospitalInfo/page_person', 'ALL', '用户-质控评分(个人)-分页', '无需加密');
+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', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取质控评分详情', 'FUNC000014', '/qc/behospitalInfo/getByBehospitalCode', 'ALL', '用户-质控评分(科室)-获取详情', '无需加密');
+INSERT INTO `sys_permission` VALUES ('39', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取用户科室下拉列表信息', 'FUNC000031', '/bas/dept/getListUser', 'ALL', '用户-质控评分(个人)-获取病历质控一览下用户科室下拉列表信息', '无需加密');
+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', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取质控评分详情', 'FUNC000014', '/qc/behospitalInfo/getByBehospitalCode', 'ALL', '用户-质控评分(个人)-获取详情', '无需加密');
+INSERT INTO `sys_permission` VALUES ('45', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '平均住院天数', 'FUNC000045', '/console/getAverageDayNum', 'ALL', '控制台-平均住院天数', null);
+INSERT INTO `sys_permission` VALUES ('46', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '平均住院费用', 'FUNC000046', '/console/getAverageFee', 'ALL', '控制台-平均住院费用', null);
+INSERT INTO `sys_permission` VALUES ('47', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '质控平均分按科室统计', 'FUNC000047', '/console/getAverageScore', 'ALL', '控制台-质控平均分按科室统计', null);
+INSERT INTO `sys_permission` VALUES ('48', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各科室甲级病历占比', 'FUNC000048', '/console/getLevelResultDept', 'ALL', '控制台-各科室甲级病历占比', null);
+INSERT INTO `sys_permission` VALUES ('49', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '出院人数统计', 'FUNC000049', '/console/leaveHosCount', 'ALL', '控制台-出院人数统计', null);
+INSERT INTO `sys_permission` VALUES ('50', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '质控病历统计', 'FUNC000050', '/console/mrCount', 'ALL', '控制台-质控病历统计', null);
+INSERT INTO `sys_permission` VALUES ('51', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各模块缺陷占比排行', 'FUNC000051', '/console/entryCountGroupByCase', 'ALL', '控制台-各模块缺陷占比排行', null);
+INSERT INTO `sys_permission` VALUES ('52', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '条目缺陷占比', 'FUNC000052', '/console/entryCountGroupByEntry', 'ALL', '控制台-条目缺陷占比', null);
+INSERT INTO `sys_permission` VALUES ('53', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各科室缺陷占比', 'FUNC000053', '/console/entryByDept', 'ALL', '控制台-各科室缺陷占比', null);
+INSERT INTO `sys_permission` VALUES ('54', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '出院人数统计(科室)', 'FUNC000054', '/consoleByDept/leaveHosCountByDept', 'ALL', '控制台(科室)-出院人数统计(科室)', null);
+INSERT INTO `sys_permission` VALUES ('55', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '质控病历数统计(科室)', 'FUNC000055', '/consoleByDept/mrCountByDept', 'ALL', '控制台(科室)-质控病历数统计(科室)', null);
+INSERT INTO `sys_permission` VALUES ('56', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各模块缺陷占比排行(科室)', 'FUNC000056', '/consoleByDept/entryCountGroupByCaseAndDept', 'ALL', '控制台(科室)-各模块缺陷占比排行(科室)', null);
+INSERT INTO `sys_permission` VALUES ('57', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '条目缺陷占比(科室)', 'FUNC000057', '/consoleByDept/entryCountGroupByEntryAndDept', 'ALL', '控制台(科室)-条目缺陷占比(科室)', null);
+INSERT INTO `sys_permission` VALUES ('58', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '查询用户关联科室', 'FUNC000058', '/consoleByDept/getDept', 'ALL', '控制台(科室)-查询用户关联科室', null);
+INSERT INTO `sys_permission` VALUES ('59', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各模块缺陷占比_详情', 'FUNC000059', '/console/entryCountGroupByCasePage', 'ALL', '控制台-各模块缺陷占比_详情', null);
+INSERT INTO `sys_permission` VALUES ('60', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '条目缺陷占比_详情', 'FUNC000060', '/console/entryCountGroupByEntryPage', 'ALL', '控制台-条目缺陷占比_详情', null);
+INSERT INTO `sys_permission` VALUES ('61', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '查询异常数据监控信息', 'FUNC000061', '/qc/abnormal/getQcAnnormal', 'ALL', '异常数据监控-查询异常数据监控信息', null);
+INSERT INTO `sys_permission` VALUES ('62', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '更新异常数据监控信息', 'FUNC000062', '/qc/abnormal/saveQcAnnormal', 'ALL', '异常数据监控-异常数据监控-查询异常数据监控信息', null);
+INSERT INTO `sys_permission` VALUES ('63', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '删除异常数据监控信息', 'FUNC000063', '/qc/abnormal/delQcAnnormal', 'ALL', '异常数据监控-异常数据监控-删除异常数据监控信息', null);
+INSERT INTO `sys_permission` VALUES ('64', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '科室平均住院天数_详情', 'FUNC000064', '/console/getAverageDayNumPage', 'ALL', '控制台-科室平均住院天数_详情', null);
+INSERT INTO `sys_permission` VALUES ('65', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '科室平均住院花费_详情', 'FUNC000065', '/console/getAverageFeePage', 'ALL', '控制台-科室平均住院花费_详情', null);
+INSERT INTO `sys_permission` VALUES ('66', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各科室质控平均分_详情', 'FUNC000066', '/console/getAverageScoreByDeptPage', 'ALL', '控制台-各科室质控平均分_详情', null);
+INSERT INTO `sys_permission` VALUES ('67', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各科室缺陷占比-缺陷详情', 'FUNC000067', '/console/resultStatisticsByDeptPage', 'ALL', '控制台-各科室缺陷占比-缺陷详情', null);
+INSERT INTO `sys_permission` VALUES ('68', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各科室甲级病历占比_详情', 'FUNC000068', '/console/levelPercentGroupByDeptPage', 'ALL', '控制台-各科室甲级病历占比_详情', null);
+INSERT INTO `sys_permission` VALUES ('69', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各模块缺陷占比_详情', 'FUNC000069', '/consoleByDept/entryCountGroupByCaseAndDeptPage', 'ALL', '控制台(科室)-各模块缺陷占比_详情', null);
+INSERT INTO `sys_permission` VALUES ('70', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '条目缺陷占比_详情', 'FUNC000070', '/consoleByDept/entryCountGroupByEntryAndDeptPage', 'ALL', '控制台(科室)-条目缺陷占比_详情', null);
+INSERT INTO `sys_permission` VALUES ('71', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各科室缺陷占比(组合)', 'FUNC000071', '/console/levelStatistics', 'ALL', '控制台-各科室缺陷占比(组合)', null);
+INSERT INTO `sys_permission` VALUES ('72', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '病案首页合格率占比', 'FUNC000072', '/console/homePageLevelStatistics', 'ALL', '控制台-病案首页合格率占比', null);
+INSERT INTO `sys_permission` VALUES ('73', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各科室缺陷占比', 'FUNC000073', '/consoleByDept/levelStatisticsByDept', 'ALL', '控制台(科室)-各科室缺陷占比(科室)', null);
+INSERT INTO `sys_permission` VALUES ('74', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '病案首页合格率占比', 'FUNC000074', '/consoleByDept/homePageLevelStatisticsByDept', 'ALL', '控制台(科室)-病案首页合格率占比(科室)', null);
+INSERT INTO `sys_permission` VALUES ('75', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '病案首页合格率占比(首页)', 'FUNC000075', '/console/homePageLevelLimit', 'ALL', '控制台-病案首页合格率占比(首页)', null);
+INSERT INTO `sys_permission` VALUES ('76', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '病案首页合格率占比(首页)', 'FUNC000076', '/consoleByDept/homePageLevelByDeptLimit', 'ALL', '控制台(科室)-病案首页合格率占比(首页)', null);
+INSERT INTO `sys_permission` VALUES ('77', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '科室缺陷占比-缺陷明细', 'FUNC000077', '/consoleByDept/resultStatisticsByDeptAndDoctorPage', '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=591 DEFAULT CHARSET=utf8 COMMENT='角色和菜单的映射表';
+
+-- ----------------------------
+-- Records of sys_role_menu
+-- ----------------------------
+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);
+INSERT INTO `sys_role_menu` VALUES ('499', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '15', null);
+INSERT INTO `sys_role_menu` VALUES ('543', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '1', null);
+INSERT INTO `sys_role_menu` VALUES ('544', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '8', null);
+INSERT INTO `sys_role_menu` VALUES ('545', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '2', null);
+INSERT INTO `sys_role_menu` VALUES ('546', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '5', null);
+INSERT INTO `sys_role_menu` VALUES ('547', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '6', null);
+INSERT INTO `sys_role_menu` VALUES ('548', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '3', null);
+INSERT INTO `sys_role_menu` VALUES ('549', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '7', null);
+INSERT INTO `sys_role_menu` VALUES ('550', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '16', '用户-异常数据监控');
+INSERT INTO `sys_role_menu` VALUES ('551', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '17', '用户-质控科');
+INSERT INTO `sys_role_menu` VALUES ('552', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '18', '用户-科室主任');
+INSERT INTO `sys_role_menu` VALUES ('553', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '19', '用户-质控科-各模块缺陷占比_详情');
+INSERT INTO `sys_role_menu` VALUES ('554', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '20', '用户-质控科-条目缺陷占比_详情');
+INSERT INTO `sys_role_menu` VALUES ('555', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '21', '用户-质控科-科室平均住院天数_详情');
+INSERT INTO `sys_role_menu` VALUES ('556', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '22', '用户-质控科-科室平均住院花费_详情');
+INSERT INTO `sys_role_menu` VALUES ('557', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '23', '用户-质控科-各科室质控平均分_详情');
+INSERT INTO `sys_role_menu` VALUES ('558', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '24', '用户-质控科-各科室缺陷占比_详情');
+INSERT INTO `sys_role_menu` VALUES ('559', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '25', '用户-质控科-各科室甲级病历占比_详情');
+INSERT INTO `sys_role_menu` VALUES ('560', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '26', '用户-科室主任-各模块缺陷占比_详情');
+INSERT INTO `sys_role_menu` VALUES ('561', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '27', '用户-科室主任-条目缺陷占比_详情');
+INSERT INTO `sys_role_menu` VALUES ('562', 'N', '2020-05-18 10:48:43', '2020-05-18 10:48:43', '1', '1', '3', '15', null);
+INSERT INTO `sys_role_menu` VALUES ('563', 'N', '2020-05-18 10:48:43', '2020-05-18 10:48:43', '1', '1', '3', '8', null);
+INSERT INTO `sys_role_menu` VALUES ('564', 'N', '2020-05-18 10:48:43', '2020-05-18 10:48:43', '1', '1', '3', '2', null);
+INSERT INTO `sys_role_menu` VALUES ('565', 'N', '2020-05-18 10:48:43', '2020-05-18 10:48:43', '1', '1', '3', '5', null);
+INSERT INTO `sys_role_menu` VALUES ('566', 'N', '2020-05-18 10:48:43', '2020-05-18 10:48:43', '1', '1', '3', '6', null);
+INSERT INTO `sys_role_menu` VALUES ('567', 'N', '2020-05-18 10:48:43', '2020-05-18 10:48:43', '1', '1', '3', '3', null);
+INSERT INTO `sys_role_menu` VALUES ('568', 'N', '2020-05-18 10:48:43', '2020-05-18 10:48:43', '1', '1', '3', '10', null);
+INSERT INTO `sys_role_menu` VALUES ('569', 'N', '2020-05-18 10:48:51', '2020-05-18 10:48:51', '1', '1', '2', '15', null);
+INSERT INTO `sys_role_menu` VALUES ('570', 'N', '2020-05-18 10:48:51', '2020-05-18 10:48:51', '1', '1', '2', '8', null);
+INSERT INTO `sys_role_menu` VALUES ('571', 'N', '2020-05-18 10:48:51', '2020-05-18 10:48:51', '1', '1', '2', '2', null);
+INSERT INTO `sys_role_menu` VALUES ('572', 'N', '2020-05-18 10:48:51', '2020-05-18 10:48:51', '1', '1', '2', '5', null);
+INSERT INTO `sys_role_menu` VALUES ('573', 'N', '2020-05-18 10:48:51', '2020-05-18 10:48:51', '1', '1', '2', '6', null);
+INSERT INTO `sys_role_menu` VALUES ('574', 'N', '2020-05-18 10:48:51', '2020-05-18 10:48:51', '1', '1', '2', '3', null);
+INSERT INTO `sys_role_menu` VALUES ('575', 'N', '2020-05-18 10:48:51', '2020-05-18 10:48:51', '1', '1', '2', '9', null);
+INSERT INTO `sys_role_menu` VALUES ('576', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '17', '用户-质控科');
+INSERT INTO `sys_role_menu` VALUES ('577', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '18', '用户-科室主任');
+INSERT INTO `sys_role_menu` VALUES ('578', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '19', '用户-质控科-各模块缺陷占比_详情');
+INSERT INTO `sys_role_menu` VALUES ('579', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '20', '用户-质控科-条目缺陷占比_详情');
+INSERT INTO `sys_role_menu` VALUES ('580', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '21', '用户-质控科-科室平均住院天数_详情');
+INSERT INTO `sys_role_menu` VALUES ('581', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '22', '用户-质控科-科室平均住院花费_详情');
+INSERT INTO `sys_role_menu` VALUES ('582', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '23', '用户-质控科-各科室质控平均分_详情');
+INSERT INTO `sys_role_menu` VALUES ('583', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '24', '用户-质控科-各科室缺陷占比_详情');
+INSERT INTO `sys_role_menu` VALUES ('584', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '25', '用户-质控科-各科室甲级病历占比_详情');
+INSERT INTO `sys_role_menu` VALUES ('585', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '26', '用户-科室主任-各模块缺陷占比_详情');
+INSERT INTO `sys_role_menu` VALUES ('586', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '27', '用户-科室主任-条目缺陷占比_详情');
+INSERT INTO `sys_role_menu` VALUES ('587', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '28', '用户-质控科-病案首页合格率占比_详情');
+INSERT INTO `sys_role_menu` VALUES ('588', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '29', '用户-科室主任-病案首页合格率占比_详情');
+INSERT INTO `sys_role_menu` VALUES ('589', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '30', '用户-科室主任-科室缺陷占比_详情');
+INSERT INTO `sys_role_menu` VALUES ('590', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '31', '用户-质控科-各科室缺陷占比_详情');
+
+-- ----------------------------
+-- 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=1235 DEFAULT CHARSET=utf8 COMMENT='角色和资源的映射表';
+
+-- ----------------------------
+-- Records of sys_role_permission
+-- ----------------------------
+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 ('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 ('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', '用户-质控评分(科室)-获取详情');
+INSERT INTO `sys_role_permission` VALUES ('502', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '45', '控制台-平均住院天数');
+INSERT INTO `sys_role_permission` VALUES ('503', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '46', '控制台-平均住院费用');
+INSERT INTO `sys_role_permission` VALUES ('504', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '47', '控制台-质控平均分按科室统计');
+INSERT INTO `sys_role_permission` VALUES ('505', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '48', '控制台-各科室甲级病历占比');
+INSERT INTO `sys_role_permission` VALUES ('506', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '49', '控制台-出院人数统计');
+INSERT INTO `sys_role_permission` VALUES ('507', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '50', '控制台-质控病历统计');
+INSERT INTO `sys_role_permission` VALUES ('508', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '51', '控制台-各模块缺陷占比排行');
+INSERT INTO `sys_role_permission` VALUES ('509', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '52', '控制台-条目缺陷占比');
+INSERT INTO `sys_role_permission` VALUES ('510', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '53', '控制台-各科室缺陷占比');
+INSERT INTO `sys_role_permission` VALUES ('511', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '54', '控制台(科室)-出院人数统计(科室)');
+INSERT INTO `sys_role_permission` VALUES ('512', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '55', '控制台(科室)-质控病历数统计(科室)');
+INSERT INTO `sys_role_permission` VALUES ('513', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '56', '控制台(科室)-各模块缺陷占比排行(科室)');
+INSERT INTO `sys_role_permission` VALUES ('514', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '57', '控制台(科室)-条目缺陷占比(科室)');
+INSERT INTO `sys_role_permission` VALUES ('1164', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '45', null);
+INSERT INTO `sys_role_permission` VALUES ('1165', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '46', null);
+INSERT INTO `sys_role_permission` VALUES ('1166', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '47', null);
+INSERT INTO `sys_role_permission` VALUES ('1167', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '48', null);
+INSERT INTO `sys_role_permission` VALUES ('1168', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '49', null);
+INSERT INTO `sys_role_permission` VALUES ('1169', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '50', null);
+INSERT INTO `sys_role_permission` VALUES ('1170', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '51', null);
+INSERT INTO `sys_role_permission` VALUES ('1171', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '52', null);
+INSERT INTO `sys_role_permission` VALUES ('1172', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '53', null);
+INSERT INTO `sys_role_permission` VALUES ('1173', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '1', null);
+INSERT INTO `sys_role_permission` VALUES ('1174', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '2', null);
+INSERT INTO `sys_role_permission` VALUES ('1175', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '4', null);
+INSERT INTO `sys_role_permission` VALUES ('1176', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '7', null);
+INSERT INTO `sys_role_permission` VALUES ('1177', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '17', null);
+INSERT INTO `sys_role_permission` VALUES ('1178', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '11', null);
+INSERT INTO `sys_role_permission` VALUES ('1179', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '12', null);
+INSERT INTO `sys_role_permission` VALUES ('1180', 'N', '2020-05-14 13:31:16', '2020-05-14 13:31:16', '1', '1', '1', '13', null);
+INSERT INTO `sys_role_permission` VALUES ('1182', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '59', '控制台-各模块缺陷占比_详情');
+INSERT INTO `sys_role_permission` VALUES ('1183', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '60', '控制台-条目缺陷占比_详情');
+INSERT INTO `sys_role_permission` VALUES ('1184', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '61', '异常数据监控-查询异常数据监控信息');
+INSERT INTO `sys_role_permission` VALUES ('1185', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '62', '异常数据监控-异常数据监控-查询异常数据监控信息');
+INSERT INTO `sys_role_permission` VALUES ('1186', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '63', '异常数据监控-异常数据监控-删除异常数据监控信息');
+INSERT INTO `sys_role_permission` VALUES ('1187', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '64', '控制台-科室平均住院天数_详情');
+INSERT INTO `sys_role_permission` VALUES ('1188', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '65', '控制台-科室平均住院花费_详情');
+INSERT INTO `sys_role_permission` VALUES ('1189', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '66', '控制台-各科室质控平均分_详情');
+INSERT INTO `sys_role_permission` VALUES ('1190', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '67', '控制台-各科室缺陷占比_详情');
+INSERT INTO `sys_role_permission` VALUES ('1191', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '68', '控制台-各科室甲级病历占比_详情');
+INSERT INTO `sys_role_permission` VALUES ('1192', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '69', '控制台(科室)-各模块缺陷占比_详情');
+INSERT INTO `sys_role_permission` VALUES ('1193', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '70', '控制台(科室)-条目缺陷占比_详情');
+INSERT INTO `sys_role_permission` VALUES ('1194', 'N', '2020-05-18 10:48:43', '2020-05-18 10:48:43', '1', '1', '3', '54', null);
+INSERT INTO `sys_role_permission` VALUES ('1195', 'N', '2020-05-18 10:48:43', '2020-05-18 10:48:43', '1', '1', '3', '55', null);
+INSERT INTO `sys_role_permission` VALUES ('1196', 'N', '2020-05-18 10:48:43', '2020-05-18 10:48:43', '1', '1', '3', '56', null);
+INSERT INTO `sys_role_permission` VALUES ('1197', 'N', '2020-05-18 10:48:43', '2020-05-18 10:48:43', '1', '1', '3', '57', null);
+INSERT INTO `sys_role_permission` VALUES ('1199', 'N', '2020-05-18 10:48:43', '2020-05-18 10:48:43', '1', '1', '3', '1', null);
+INSERT INTO `sys_role_permission` VALUES ('1200', 'N', '2020-05-18 10:48:43', '2020-05-18 10:48:43', '1', '1', '3', '2', null);
+INSERT INTO `sys_role_permission` VALUES ('1201', 'N', '2020-05-18 10:48:43', '2020-05-18 10:48:43', '1', '1', '3', '4', null);
+INSERT INTO `sys_role_permission` VALUES ('1202', 'N', '2020-05-18 10:48:43', '2020-05-18 10:48:43', '1', '1', '3', '7', null);
+INSERT INTO `sys_role_permission` VALUES ('1203', 'N', '2020-05-18 10:48:43', '2020-05-18 10:48:43', '1', '1', '3', '40', null);
+INSERT INTO `sys_role_permission` VALUES ('1204', 'N', '2020-05-18 10:48:43', '2020-05-18 10:48:43', '1', '1', '3', '41', null);
+INSERT INTO `sys_role_permission` VALUES ('1205', 'N', '2020-05-18 10:48:43', '2020-05-18 10:48:43', '1', '1', '3', '42', null);
+INSERT INTO `sys_role_permission` VALUES ('1206', 'N', '2020-05-18 10:48:43', '2020-05-18 10:48:43', '1', '1', '3', '43', null);
+INSERT INTO `sys_role_permission` VALUES ('1207', 'N', '2020-05-18 10:48:51', '2020-05-18 10:48:51', '1', '1', '2', '54', null);
+INSERT INTO `sys_role_permission` VALUES ('1208', 'N', '2020-05-18 10:48:51', '2020-05-18 10:48:51', '1', '1', '2', '55', null);
+INSERT INTO `sys_role_permission` VALUES ('1209', 'N', '2020-05-18 10:48:51', '2020-05-18 10:48:51', '1', '1', '2', '56', null);
+INSERT INTO `sys_role_permission` VALUES ('1210', 'N', '2020-05-18 10:48:51', '2020-05-18 10:48:51', '1', '1', '2', '57', null);
+INSERT INTO `sys_role_permission` VALUES ('1212', 'N', '2020-05-18 10:48:51', '2020-05-18 10:48:51', '1', '1', '2', '1', null);
+INSERT INTO `sys_role_permission` VALUES ('1213', 'N', '2020-05-18 10:48:51', '2020-05-18 10:48:51', '1', '1', '2', '2', null);
+INSERT INTO `sys_role_permission` VALUES ('1214', 'N', '2020-05-18 10:48:51', '2020-05-18 10:48:51', '1', '1', '2', '4', null);
+INSERT INTO `sys_role_permission` VALUES ('1215', 'N', '2020-05-18 10:48:51', '2020-05-18 10:48:51', '1', '1', '2', '7', null);
+INSERT INTO `sys_role_permission` VALUES ('1216', 'N', '2020-05-18 10:48:51', '2020-05-18 10:48:51', '1', '1', '2', '34', null);
+INSERT INTO `sys_role_permission` VALUES ('1217', 'N', '2020-05-18 10:48:51', '2020-05-18 10:48:51', '1', '1', '2', '35', null);
+INSERT INTO `sys_role_permission` VALUES ('1218', 'N', '2020-05-18 10:48:51', '2020-05-18 10:48:51', '1', '1', '2', '36', null);
+INSERT INTO `sys_role_permission` VALUES ('1219', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '59', '控制台-各模块缺陷占比_详情');
+INSERT INTO `sys_role_permission` VALUES ('1220', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '60', '控制台-条目缺陷占比_详情');
+INSERT INTO `sys_role_permission` VALUES ('1221', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '64', '控制台-科室平均住院天数_详情');
+INSERT INTO `sys_role_permission` VALUES ('1222', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '65', '控制台-科室平均住院花费_详情');
+INSERT INTO `sys_role_permission` VALUES ('1223', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '66', '控制台-各科室质控平均分_详情');
+INSERT INTO `sys_role_permission` VALUES ('1224', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '67', '控制台-各科室缺陷占比-缺陷详情');
+INSERT INTO `sys_role_permission` VALUES ('1225', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '68', '控制台-各科室甲级病历占比_详情');
+INSERT INTO `sys_role_permission` VALUES ('1226', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '69', '控制台(科室)-各模块缺陷占比_详情');
+INSERT INTO `sys_role_permission` VALUES ('1227', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '70', '控制台(科室)-条目缺陷占比_详情');
+INSERT INTO `sys_role_permission` VALUES ('1228', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '71', '控制台-各科室缺陷占比(组合)');
+INSERT INTO `sys_role_permission` VALUES ('1229', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '72', '控制台-病案首页合格率占比');
+INSERT INTO `sys_role_permission` VALUES ('1230', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '73', '控制台(科室)-各科室缺陷占比(科室)');
+INSERT INTO `sys_role_permission` VALUES ('1231', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '74', '控制台(科室)-病案首页合格率占比(科室)');
+INSERT INTO `sys_role_permission` VALUES ('1232', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '75', '控制台-病案首页合格率占比(首页)');
+INSERT INTO `sys_role_permission` VALUES ('1233', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '76', '控制台(科室)-病案首页合格率占比(首页)');
+INSERT INTO `sys_role_permission` VALUES ('1234', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '77', '控制台(科室)-科室缺陷占比-缺陷明细');

+ 29 - 0
doc/004.20200527v.1.3.0/qc_init.sql

@@ -0,0 +1,29 @@
+use `qc`;
+
+INSERT INTO `qc`.`sys_menu` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `parent_id`, `code`, `show_status`, `maintain_status`, `order_no`, `remark`) VALUES ('32', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '质控类型维护', '2', 'YH-JCSJWH-ZKLXWH', '1', '0', '3', '用户-基础数据维护-质控类型维护');
+
+INSERT INTO `qc`.`sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('78', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '分页列表', 'FUNC000078', '/qc/qcType/page', 'ALL', '用户-质控类型维护-分页列表', NULL);
+INSERT INTO `qc`.`sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('79', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '新增或更新', 'FUNC000079', '/qc/qcType/saveOrUpdate', 'ALL', '用户-质控类型维护-新增或更新', NULL);
+INSERT INTO `qc`.`sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('80', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '新增时质控条目分组信息', 'FUNC000080', '/qc/qcType/getEntryByHospital', 'ALL', '用户-质控类型维护-新增时质控条目分组信息', NULL);
+INSERT INTO `qc`.`sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('81', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '质控条目检索', 'FUNC000081', '/qc/qcType/index', 'ALL', '用户-质控类型维护-质控条目检索', NULL);
+INSERT INTO `qc`.`sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('82', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '删除', 'FUNC000082', '/qc/qcType/delete', 'ALL', '用户-质控类型维护-删除', NULL);
+INSERT INTO `qc`.`sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('83', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '根据id返回内容', 'FUNC000083', '/qc/qcType/getById', 'ALL', '用户-质控类型维护-根据id返回内容', NULL);
+INSERT INTO `qc`.`sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('84', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取医院数据全部条目', 'FUNC000084', '/qc/modelHospital/getModelHospitalAll', 'ALL', '用户-质控类型维护-获取医院数据全部条目', NULL);
+INSERT INTO `qc`.`sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('85', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '根据id获取医院数据', 'FUNC000085', '/qc/modelHospital/getModelHospitalById', 'ALL', '用户-质控类型维护-根据id获取医院数据', NULL);
+INSERT INTO `qc`.`sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('86', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '添加和修改医院数据模块', 'FUNC000086', '/qc/modelHospital/saveAndupdataModel', 'ALL', '用户-质控类型维护-添加和修改医院数据模块', NULL);
+INSERT INTO `qc`.`sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('87', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '删除医院数据模块', 'FUNC000087', '/qc/modelHospital/clearModelHospital', 'ALL', '用户-质控类型维护-删除医院数据模块', NULL);
+INSERT INTO `qc`.`sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('88', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取医院全部模块', 'FUNC0000888', '/qc/mode/getModes', 'ALL', '用户-质控类型维护-获取医院全部模块', NULL);
+
+INSERT INTO `qc`.`sys_role_menu` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '32', '用户-基础数据维护-质控类型维护');
+
+INSERT INTO `qc`.`sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '78', '用户-质控类型维护-分页列表');
+INSERT INTO `qc`.`sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '79', '用户-质控类型维护-新增或更新');
+INSERT INTO `qc`.`sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '80', '用户-质控类型维护-新增时质控条目分组信息');
+INSERT INTO `qc`.`sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '81', '用户-质控类型维护-质控条目检索');
+INSERT INTO `qc`.`sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '82', '用户-质控类型维护-删除');
+INSERT INTO `qc`.`sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '83', '用户-质控类型维护-根据id返回内容');
+INSERT INTO `qc`.`sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '84', '用户-质控类型维护-获取医院数据全部条目');
+INSERT INTO `qc`.`sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '85', '用户-质控类型维护-根据id获取医院数据');
+INSERT INTO `qc`.`sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '86', '用户-质控类型维护-添加和修改医院数据模块');
+INSERT INTO `qc`.`sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '87', '用户-质控类型维护-删除医院数据模块');
+INSERT INTO `qc`.`sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '88', '用户-质控类型维护-获取医院全部模块');

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1059 - 0
doc/005.20200528v1.2.x/qc_init.sql


+ 5 - 0
doc/006.20200602数据导入/qc_init.sql

@@ -0,0 +1,5 @@
+use `qc`;
+
+INSERT INTO `qc_mode` (`id`, `name`, `order_no`, `parent_id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `remark`) VALUES ('56', '日常病程录', '210', '37', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', NULL);
+
+delete from sys_dictionary_info where group_type = 0 and is_deleted = 'Y';

+ 34 - 0
doc/006.20200604v1.3.1/qc_initv1.3.1.sql

@@ -0,0 +1,34 @@
+use `qc`;
+
+-- alter table qc_cases_entry add COLUMN `rule_type` TINYINT(4) DEFAULT '0' COMMENT '规则类型(0:无,1:空项,2:错误)' after `name`;
+-- INSERT INTO `sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('286', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '12', '日常病程录', '56', '1', '286', '所属模块');
+-- INSERT INTO `sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('287', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '14', '无', '0', '1', '1', '质控错误类型');
+-- INSERT INTO `sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('288', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '14', '空项', '1', '1', '2', '质控错误类型');
+-- INSERT INTO `sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('289', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '14', '错误', '2', '1', '3', '质控错误类型');
+
+-- 已经在四个环境执行过并且已经和技术服务部同步
+-- ALTER TABLE `med_medical_record` ADD INDEX `idx_hos_becode` ( `hospital_id`, `behospital_code` ) USING BTREE;
+-- ALTER TABLE `med_medical_record` ADD INDEX `idx_mode_id` ( `mode_id` ) USING BTREE;
+
+-- ALTER TABLE `med_qcresult_detail` ADD INDEX `idx_cases_entry_id` (`cases_entry_id`) USING BTREE;
+-- ALTER TABLE `med_qcresult_detail` ADD INDEX `idx_cases_id` (`cases_id`) USING BTREE;
+--
+-- ALTER TABLE `qc_cases_entry_hospital` ADD INDEX `idx_cases_entry_id` (`cases_entry_id`) USING BTREE;
+-- ALTER TABLE `qc_cases_entry_hospital` ADD INDEX `idx_is_reject` (`is_reject`) USING BTREE;
+
+ALTER TABLE `med_behospital_info` ADD INDEX `idx_leave_hospital_date` (`leave_hospital_date`) USING BTREE;
+ALTER TABLE `qc_cases_entry_hospital` ADD INDEX `idx_hospital_id` (`hospital_id`) USING BTREE;
+
+
+ALTER TABLE `med_record_type` ADD `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除' AFTER `remark`;
+ALTER TABLE `med_record_type` ADD `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间' AFTER `is_deleted`;
+ALTER TABLE `med_record_type` ADD `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改' AFTER `gmt_create`;
+ALTER TABLE `med_record_type` ADD `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值' AFTER `gmt_modified`;
+ALTER TABLE `med_record_type` ADD `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改' AFTER `creator`;
+
+
+INSERT INTO `qc_mode` (`id`, `name`, `order_no`, `parent_id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `remark`) VALUES ('56', '日常病程录', '210', '37', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', NULL);
+
+delete from sys_dictionary_info where group_type = 0 and is_deleted = 'Y';
+
+ALTER TABLE `qc_cases_entry_hospital` MODIFY COLUMN  `is_reject` int(3) NOT NULL DEFAULT '0' COMMENT '单项否决(1-单项否决 0-非)' AFTER `is_used`;

+ 3 - 0
doc/007.20200608v1.2.3/qc_initv1.2.3.sql

@@ -0,0 +1,3 @@
+use `qc`;
+
+UPDATE `sys_task_cron` SET `id`='-1', `is_deleted`='N', `gmt_create`='1970-01-01 12:00:00', `gmt_modified`='1970-01-01 12:00:00', `creator`='0', `modifier`='0', `cron_code`='TASK_CX', `cron`='0 0 4 * * ?', `param`='1', `is_used`='1', `remark`='每天早上自动评分当天外的未评分的数据、同时强制质控出院日期推前四天的数据' WHERE (`id`='-1');

+ 8 - 0
doc/008.20200610v1.3.3/qc_initv1.3.3.sql

@@ -0,0 +1,8 @@
+use `qc`;
+
+ALTER TABLE `med_behospital_info` ADD `placefile_date` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '归档时间' AFTER `is_placefile`;
+
+UPDATE `med_behospital_info` set `placefile_date` = date_add(leave_hospital_date,interval 3 day) where leave_hospital_date is not null;
+
+--  【已执行】 2020-06-11
+-- INSERT INTO `sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('290', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '4', 'leaveHospitalType', '出院情况', '2', '0', '病案首页诊断信息');

+ 59 - 0
doc/009.20200612v1.3.4/qc_initv1.3.4.sql

@@ -0,0 +1,59 @@
+use `qc`;
+
+-- ----------------------------
+-- Table structure for sys_user_pageset
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_user_pageset`;
+CREATE TABLE `sys_user_pageset` (
+  `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 '系统用户表.用户ID',
+  `page_type` bigint(20) NOT NULL DEFAULT '0' COMMENT '页面分组(值自定义)',
+  `name` varchar(100) NOT NULL DEFAULT '' COMMENT '列名',
+  `val` varchar(100) NOT NULL DEFAULT '' COMMENT '列名值',
+  `status` int(11) NOT NULL DEFAULT '1' COMMENT '是否启用(0:停用,1:启用)',
+  `order_no` int(11) NOT NULL DEFAULT '0' COMMENT '排序号',
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`),
+  KEY `idx_userId_pageType` (`user_id`,`page_type`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COMMENT='用户页面设定表';
+
+-- ----------------------------
+-- Records of sys_user_pageset
+-- ----------------------------
+INSERT INTO `sys_user_pageset` VALUES ('1', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病历等级', 'level', '1', '1', null);
+INSERT INTO `sys_user_pageset` VALUES ('2', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病历得分', 'scoreRes', '1', '2', null);
+INSERT INTO `sys_user_pageset` VALUES ('3', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病人住院序号', 'behospitalCode', '1', '3', null);
+INSERT INTO `sys_user_pageset` VALUES ('4', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病案号', 'fileCode', '1', '4', null);
+INSERT INTO `sys_user_pageset` VALUES ('5', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病人姓名', 'name', '1', '5', null);
+INSERT INTO `sys_user_pageset` VALUES ('6', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '性别', 'sex', '1', '6', null);
+INSERT INTO `sys_user_pageset` VALUES ('7', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '年龄', 'age', '1', '7', null);
+INSERT INTO `sys_user_pageset` VALUES ('8', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '床号', 'bedCode', '1', '8', null);
+INSERT INTO `sys_user_pageset` VALUES ('9', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '入院日期', 'behospitalDate', '1', '9', null);
+INSERT INTO `sys_user_pageset` VALUES ('10', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '出院日期', 'leaveHospitalDate', '1', '10', null);
+INSERT INTO `sys_user_pageset` VALUES ('11', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '归档日期', 'placefileDate', '1', '11', null);
+INSERT INTO `sys_user_pageset` VALUES ('12', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '主诊断', 'diagnose', '1', '12', null);
+INSERT INTO `sys_user_pageset` VALUES ('13', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '住院医生', 'behDoctorName', '1', '13', null);
+INSERT INTO `sys_user_pageset` VALUES ('14', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '主管医生', 'doctorName', '1', '14', null);
+INSERT INTO `sys_user_pageset` VALUES ('15', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '主任医生', 'directorDoctorName', '1', '15', null);
+INSERT INTO `sys_user_pageset` VALUES ('16', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '科室', 'behDeptName', '1', '16', null);
+INSERT INTO `sys_user_pageset` VALUES ('17', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '评分时间', 'gradeTime', '1', '17', null);
+
+ALTER TABLE `qc`.`med_doctor_advice` ADD COLUMN `medicine_type` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '药品类型(0.普药 1.抗生素 2.激素)' AFTER `da_prescription_type`;
+
+-- 121和122已经执行过下面的脚本
+ALTER TABLE `qc_cases_entry` ADD `dev_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '开发状态标识: 0-未开发  1-已开发' AFTER `rule_type`;
+ALTER TABLE `qc_cases_entry` ADD `accuracy_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '准确率类型:0-极高,1-高,2-中,3-低' AFTER `dev_type`;
+
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('291', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '15', '未开发', '0', '1', '0', '开发状态标识');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('292', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '15', '已开发', '1', '1', '1', '开发状态标识');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('293', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '16', '极高', '0', '1', '0', '准确率类型');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('294', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '16', '高', '1', '1', '1', '准确率类型');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('295', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '16', '中', '2', '1', '2', '准确率类型');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('296', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '16', '低', '3', '1', '3', '准确率类型');
+
+-- alter table med_medical_record modify column `rec_date` datetime DEFAULT NULL COMMENT '病历日期';

+ 34 - 0
doc/010.20200617v1.3.5/qc_initv1.3.5.sql

@@ -0,0 +1,34 @@
+use `qc`;
+-- 技术服务部已执行
+-- ALTER TABLE `qc`.`bas_doctor_info` ADD COLUMN `group_id` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '小组id' AFTER `occup`;
+-- alter table `med_home_page` modify column `outpatient_emr_diagnose` varchar(500) DEFAULT NULL COMMENT '门急诊诊断';
+-- alter table `med_home_page` modify column `qc_nurse` varchar(255) DEFAULT NULL COMMENT '质控护士';
+-- alter table `med_home_page` modify column `encode_man` varchar(255) DEFAULT NULL COMMENT '编码员';
+-- alter table `med_home_page` modify column `dept_director` varchar(255) DEFAULT NULL COMMENT '科主任';
+-- alter table `med_home_page` modify column `cur_post_code` varchar(255) DEFAULT NULL COMMENT '现住址邮编';
+-- alter table `med_home_page` modify column `pathology_diagnose_id` varchar(255) DEFAULT NULL COMMENT '病理诊断编号';
+-- alter table `med_home_page` modify column `director_doctor` varchar(255) DEFAULT NULL COMMENT '主任医师';
+-- alter table `med_home_page` modify column `cur_phone` varchar(255) DEFAULT NULL COMMENT '现住址电话';
+-- alter table `med_home_page` modify column `leave_hospital_dept` varchar(255) DEFAULT NULL COMMENT '出院科别';
+-- alter table `med_home_page` modify column `response_nurse` varchar(255) DEFAULT NULL COMMENT '责任护士';
+
+-- UPDATE `sys_permission` SET is_deleted = 'Y' WHERE permissionUrl LIKE '/console%' AND is_deleted='N';
+
+-- UPDATE sys_menu_permission SET is_deleted='Y' where permission_id in(select id from  `sys_permission`  WHERE permissionUrl LIKE '/console%') AND is_deleted='N';
+
+-- UPDATE sys_role_permission SET is_deleted='Y'where permission_id in(select id from  `sys_permission`  WHERE permissionUrl LIKE '/console%') AND is_deleted='N';
+
+-- 新增权限
+INSERT INTO `sys_permission`(`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES (94, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '条目缺陷占比质控详情页(全院)', 'FUNC000094', '/console/qcResultShortPage', 'ALL', '数据报表明细-条目缺陷占比-条目缺陷占比质控详情页(全院)', NULL);
+INSERT INTO `sys_permission`(`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES (95, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '条目缺陷占比质控详情页(科室)', 'FUNC000095', '/consoleByDept/qcResultShortByDeptPage', 'ALL', '数据报表明细(科室)-条目缺陷占比-条目缺陷占比质控详情页(科室)', NULL);
+INSERT INTO `sys_role_permission`(`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES (1623, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', -1, 94, '数据报表明细-条目缺陷占比-条目缺陷占比质控详情页(全院)');
+INSERT INTO `sys_role_permission`(`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES (1624, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', -1, 95, '数据报表明细(科室)-条目缺陷占比-条目缺陷占比质控详情页(科室)');
+INSERT INTO `sys_menu_permission`(`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `remark`) VALUES (66, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', 20, 94, '数据报表明细-条目缺陷占比-条目缺陷占比质控详情页(全院)');
+INSERT INTO `sys_menu_permission`(`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `remark`) VALUES (67, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', 27, 95, '数据报表明细(科室)-条目缺陷占比-条目缺陷占比质控详情页(科室)');
+
+
+ALTER TABLE `med_behospital_info` ADD INDEX `idx_beh_dept_id` (`beh_dept_id`) USING BTREE;
+
+-- 所有环境、技术服务部已经同步
+-- DROP INDEX advice_behospital_code_unique ON med_doctor_advice;
+-- ALTER TABLE med_doctor_advice ADD UNIQUE KEY `advice_behospital_code_unique` (`doctor_advice_id`,`hospital_id`,`behospital_code`) USING BTREE;

+ 28 - 0
doc/010.20200618v1.3.6/qc_initv1.3.6.sql

@@ -0,0 +1,28 @@
+use `qc`;
+
+INSERT INTO `sys_menu` VALUES ('33', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '质控评分(医疗组)', '3', 'YH-BLZK-ZKPFYLZ', '1', '1', '4', '用户-病历质控-质控评分(医疗组)');
+
+INSERT INTO `sys_menu_permission` VALUES ('68', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '33', '96', '用户-医疗组-分页');
+INSERT INTO `sys_menu_permission` VALUES ('69', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '33', '97', '用户-医疗组-新增质控条目');
+INSERT INTO `sys_menu_permission` VALUES ('70', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '33', '98', '用户-医疗组-删除质控条目');
+INSERT INTO `sys_menu_permission` VALUES ('71', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '33', '99', '用户-医疗组-修改质控条目');
+
+INSERT INTO `sys_permission` VALUES ('96', '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 ('97', '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 ('98', '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 ('99', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '修改质控条目', 'FUNC000013', '/qc/behospitalInfo/updCase', 'ALL', '用户-医疗组-修改质控条目', null);
+
+
+INSERT INTO `sys_role_menu` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '33', NULL);
+
+INSERT INTO `sys_role_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '96', NULL);
+INSERT INTO `sys_role_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '97', NULL);
+INSERT INTO `sys_role_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '98', NULL);
+INSERT INTO `sys_role_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '99', NULL);
+
+
+-- 再次同步
+-- ALTER TABLE `med_qcresult_info` ADD INDEX `idx_hospital_id` (`hospital_id`) USING BTREE;
+-- ALTER TABLE `med_qcresult_info` ADD INDEX `idx_hospital_id_behospital_code` (`hospital_id`,`behospital_code`) USING BTREE;
+-- ALTER TABLE `med_qcresult_info` ADD INDEX `idx_is_deleted` (`is_deleted`) USING BTREE;
+-- ALTER TABLE `med_qcresult_info` ADD INDEX `idx_mix` (`hospital_id`,`behospital_code`,`is_deleted`) USING BTREE;

+ 8 - 0
doc/011.20200619v1.3.6.1/qc_initv1.3.6.1.sql

@@ -0,0 +1,8 @@
+use `qc`;
+
+-- 新增权限
+INSERT INTO `sys_permission`(`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES (100, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '关键条目缺陷占比', 'FUNC000100', '/console/entryStatistics', 'ALL', '数据报表明细-关键条目缺陷占比', NULL);
+INSERT INTO `sys_role_permission`(`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', -1, 100, '数据报表明细-关键条目缺陷占比');
+INSERT INTO `sys_menu_permission`(`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', 34, 100, '数据报表明细-关键条目缺陷占比');
+INSERT INTO `sys_menu`(`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `parent_id`, `code`, `show_status`, `maintain_status`, `order_no`, `remark`) VALUES (34, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '关键条目缺陷占比', 17, 'YH-ZKK-GJTMQXZB', 1, 1, 10, '用户-质控科-关键条目缺陷占比');
+INSERT INTO `sys_role_menu`(`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', -1, 34, '用户-质控科-关键条目缺陷占比');

+ 85 - 0
doc/011.20200628化验辅检危急值/qc_init.sql

@@ -0,0 +1,85 @@
+use `qc`;
+
+drop table if exists med_lis_result;
+CREATE TABLE `med_lis_result` (
+  `rept_no` int(11) NOT NULL COMMENT '报告单号',
+  `hospital_id` int(11) NOT NULL COMMENT '医院ID',
+  `behospital_code` varchar(255) DEFAULT NULL COMMENT '住院病人ID',
+  `item_code` varchar(255) DEFAULT NULL COMMENT '报告代码',
+  `item_name` varchar(255) DEFAULT NULL COMMENT '报告名称',
+  `result` varchar(255) DEFAULT NULL COMMENT '检验结果',
+  `reference_min` varchar(255) DEFAULT NULL COMMENT '最小参考值',
+  `reference_max` varchar(255) DEFAULT NULL COMMENT '最大参考值',
+  `unit` varchar(255) DEFAULT NULL COMMENT '单位',
+  `abnormal` varchar(255) DEFAULT NULL COMMENT '异常标志',
+  `color` varchar(255) DEFAULT NULL COMMENT '异常颜色',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  PRIMARY KEY (`rept_no`,`hospital_id`),
+  KEY `behospital_code` (`behospital_code`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+drop table if exists med_pacs_result;
+CREATE TABLE `med_pacs_result` (
+  `rept_no` varchar(50) NOT NULL COMMENT '报告单号',
+  `hospital_id` int(11) NOT NULL COMMENT '医院ID',
+  `behospital_code` varchar(50) DEFAULT NULL COMMENT '住院病人ID',
+  `rept_name` varchar(255) DEFAULT NULL COMMENT '报告名称',
+  `part` varchar(255) DEFAULT NULL COMMENT '检查部位',
+  `clinic_sight` varchar(255) DEFAULT NULL COMMENT '检查所见',
+  `rept_diag` varchar(255) DEFAULT NULL COMMENT '检查结果诊断',
+  `remark` varchar(1024) DEFAULT NULL COMMENT '观察记录',
+  `clinic_diag` varchar(255) DEFAULT NULL COMMENT '临床诊断',
+  `apply_doctor` varchar(50) DEFAULT NULL COMMENT '申请医生',
+  `checker_doctor` varchar(50) DEFAULT NULL COMMENT '审核医生',
+  `report_doctor` varchar(50) DEFAULT NULL COMMENT '报告医生',
+  `dept_name` varchar(50) DEFAULT NULL COMMENT '科室名称',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  PRIMARY KEY (`rept_no`,`hospital_id`),
+  KEY `behospital_code` (`behospital_code`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('297', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '20', 'hospitalId', '医院ID', '2', '0', '危急值');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('298', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '20', 'behospitalCode', '病人住院ID', '2', '0', '危急值');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('299', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '20', 'recType', '记录类型', '2', '0', '危急值');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('300', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '20', 'crisisId', '危急值ID', '2', '0', '危急值');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('301', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '20', 'crisisName', '危急值名称', '2', '0', '危急值');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('302', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '20', 'deptId', '开单科室ID', '2', '0', '危急值');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('303', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '20', 'deptName', '开单科室名称', '2', '0', '危急值');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('304', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '20', 'doctorId', '开单医生ID', '2', '0', '危急值');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('305', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '20', 'doctorName', '开单医生姓名', '2', '0', '危急值');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('306', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '20', 'crisisValue', '危急结果值', '2', '0', '危急值');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('307', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '20', 'crisisDesc', '危急值描述', '2', '0', '危急值');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('308', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '20', 'crisisStatus', '危急值状态', '2', '0', '危急值');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('309', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '20', 'crisisTopValue', '参考上限', '2', '0', '危急值');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('310', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '20', 'crisisLowerValue', '参考下限', '2', '0', '危急值');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('311', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '20', 'sendDate', '送检时间', '2', '0', '危急值');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('312', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '20', 'repDate', '报告时间', '2', '0', '危急值');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('313', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '21', 'reptNo', '报告单号', '2', '0', '化验');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('314', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '21', 'itemCode', '报告代码', '2', '0', '化验');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('315', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '21', 'itemName', '报告名称', '2', '0', '化验');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('316', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '21', 'result', '检验结果', '2', '0', '化验');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('317', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '21', 'referenceMin', '最小参考值', '2', '0', '化验');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('318', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '21', 'referenceMax', '最大参考值', '2', '0', '化验');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('319', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '21', 'unit', '单位', '2', '0', '化验');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('320', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '21', 'abnormal', '异常标志', '2', '0', '化验');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('321', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '21', 'color', '异常颜色', '2', '0', '化验');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('322', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '22', 'reptNo', '报告单号', '2', '0', '辅检');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('323', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '22', 'reptName', '报告名称', '2', '0', '辅检');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('324', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '22', 'part', '检查部位', '2', '0', '辅检');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('325', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '22', 'clinicSight', '检查所见', '2', '0', '辅检');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('326', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '22', 'reptDiag', '检查结果诊断', '2', '0', '辅检');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('327', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '22', 'remark', '观察记录', '2', '0', '辅检');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('328', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '22', 'clinicDiag', '临床诊断', '2', '0', '辅检');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('329', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '22', 'applyDoctor', '申请医生', '2', '0', '辅检');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('330', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '22', 'checkerDoctor', '审核医生', '2', '0', '辅检');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('331', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '22', 'reportDoctor', '报告医生', '2', '0', '辅检');
+INSERT INTO `qc`.`sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('332', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '22', 'deptName', '科室名称', '2', '0', '辅检');

+ 21 - 0
doc/012.20200706v1.3.6.4/qc_initv1.3.6.4.sql

@@ -0,0 +1,21 @@
+use `qc`;
+
+ ALTER TABLE `qc`.`qc_cases_entry` CHANGE `remark` `remark` VARCHAR(1000) CHARSET utf8 COLLATE utf8_general_ci NULL COMMENT '备注';
+
+DROP TABLE IF EXISTS `sys_hospital_set`;
+CREATE TABLE `sys_hospital_set` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `hospital_id` bigint(20) DEFAULT '0' COMMENT '医院ID',
+  `name` varchar(100) DEFAULT NULL COMMENT '配置名称',
+  `code` varchar(100) DEFAULT NULL COMMENT '配置编码',
+  `value` varchar(255) DEFAULT NULL,
+  `remark` varchar(128) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='医院所有配置信息';
+
+INSERT INTO `sys_hospital_set` VALUES ('1', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '3', '评分类型', 'score_type', '1', '评分类型(0:120分制,1:100分制)');

+ 372 - 0
doc/013.20200706v1.3.7/qc_initv1.3.7.sql

@@ -0,0 +1,372 @@
+use `qc`;
+
+ALTER TABLE `med_qcresult_info` ADD `have_home_page` tinyint(4) DEFAULT '0' COMMENT '是否有病案首页(0:无,1:有)' AFTER `score_res`;
+
+DROP TABLE IF EXISTS `med_check_info`;
+CREATE TABLE `med_check_info` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `behospital_code` varchar(16) NOT NULL COMMENT '病人住院ID',
+  `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院ID',
+  `check_id` bigint(20) NOT NULL COMMENT '核查人id',
+  `check_name` varchar(255) NOT NULL COMMENT '核查人',
+  `check_time` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '核查时间',
+  `status` int(11) NOT NULL DEFAULT '0' COMMENT '核查状态(0未核查,1已核查)',
+  PRIMARY KEY (`id`),
+  KEY `idx_hospital_id_behospital_code` (`behospital_code`,`hospital_id`),
+  KEY `idx_behospital_code` (`behospital_code`),
+  KEY `idx_hospital_id` (`hospital_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='核查表';
+
+DELETE FROM sys_user_pageset WHERE user_id = -1;
+
+INSERT INTO `sys_user_pageset` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病历等级', 'level', '1', '1', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病历得分', 'scoreRes', '1', '2', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病人住院序号', 'behospitalCode', '1', '3', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病案号', 'fileCode', '1', '5', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病人姓名', 'name', '1', '6', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '性别', 'sex', '1', '7', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '年龄', 'age', '1', '8', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '床号', 'bedCode', '1', '9', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '入院日期', 'behospitalDate', '1', '10', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '出院日期', 'leaveHospitalDate', '1', '11', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '归档日期', 'placefileDate', '1', '12', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '主诊断', 'diagnose', '1', '13', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '住院医生', 'behDoctorName', '1', '14', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '主管医生', 'doctorName', '1', '15', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '主任医生', 'directorDoctorName', '1', '16', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '科室', 'behDeptName', '1', '17', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '评分时间', 'gradeTime', '1', '18', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '核查状态', 'checkStatus', '1', '4', NULL);
+
+-- 找出没有”核查状态“的人员并给加上
+ INSERT INTO sys_user_pageset
+(  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`)
+ SELECT is_deleted,
+gmt_create,
+ gmt_modified,
+ creator,
+MODIFIER,
+ user_id,
+ page_type,
+ CASE WHEN ISNULL(NAME) THEN "核查状态" ELSE "核查状态" END NAME,
+ CASE WHEN ISNULL(userId) THEN "checkStatus" ELSE "checkStatus" END val,
+ CASE WHEN ISNULL(STATUS) THEN 0 ELSE 0 END STATUS,
+ CASE WHEN ISNULL(order_no) THEN 4 ELSE 4 END order_no,
+ remark
+ FROM (SELECT * FROM  sys_user_pageset  WHERE user_id <> -1) b LEFT JOIN  (SELECT c.user_id AS userId FROM  sys_user_pageset c  WHERE user_id <> -1 AND val = "checkStatus") p ON b.user_id = p.userId
+WHERE  userId IS NULL
+ GROUP BY user_id ;
+
+
+-- ----------------------------
+-- 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=37 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', '-10', '用户-控制台');
+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', '用户-权限管理-角色管理');
+INSERT INTO `sys_menu` VALUES ('15', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '控制台(科室)', '-1', 'YH-KZTKS', '1', '1', '-9', '用户-控制台(科室)');
+INSERT INTO `sys_menu` VALUES ('16', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '异常数据监控', '-1', 'YH-YCSJJK', '1', '0', '10', '用户-异常数据监控');
+INSERT INTO `sys_menu` VALUES ('17', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '数据报表明细', '-1', 'YH-ZKK', '1', '1', '-8', '用户-质控科');
+INSERT INTO `sys_menu` VALUES ('18', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '数据报表明细(科室)', '-1', 'YH-KSZR', '1', '1', '-7', '用户-科室主任');
+INSERT INTO `sys_menu` VALUES ('19', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各模块缺陷占比', '17', 'YH-ZKK-GMKQXZB_XQ', '1', '1', '1', '用户-质控科-各模块缺陷占比_详情');
+INSERT INTO `sys_menu` VALUES ('20', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '条目缺陷占比', '17', 'YH-ZKK-TMQXZB_XQ', '1', '1', '2', '用户-质控科-条目缺陷占比_详情');
+INSERT INTO `sys_menu` VALUES ('21', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '科室平均住院天数', '17', 'YH-ZKK-KSPJZYTS_XQ', '1', '1', '4', '用户-质控科-科室平均住院天数_详情');
+INSERT INTO `sys_menu` VALUES ('22', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '科室平均住院花费', '17', 'YH-ZKK-KSPJZYHF_XQ', '1', '1', '5', '用户-质控科-科室平均住院花费_详情');
+INSERT INTO `sys_menu` VALUES ('23', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各科室质控平均分', '17', 'YH-ZKK-GKSZKPJF_XQ', '1', '1', '6', '用户-质控科-各科室质控平均分_详情');
+INSERT INTO `sys_menu` VALUES ('24', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '缺陷详情', '17', 'YH-ZKK-GKSQXZB', '1', '1', '7', '用户-质控科-各科室缺陷占比_详情');
+INSERT INTO `sys_menu` VALUES ('25', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各科室甲级病历占比', '17', 'YH-ZKK-GKSJJBLZB_XQ', '1', '1', '8', '用户-质控科-各科室甲级病历占比_详情');
+INSERT INTO `sys_menu` VALUES ('26', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各模块缺陷占比', '18', 'YH-KSZR-GMKQXZB_XQ', '1', '1', '2', '用户-科室主任-各模块缺陷占比_详情');
+INSERT INTO `sys_menu` VALUES ('27', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '条目缺陷占比', '18', 'YH-KSZR-TMQXZB_XQ', '1', '1', '3', '用户-科室主任-条目缺陷占比_详情');
+INSERT INTO `sys_menu` VALUES ('28', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '病案首页合格率占比', '17', 'YH-ZKK-BASYHGLZB_XQ', '1', '1', '0', '用户-质控科-病案首页合格率占比_详情');
+INSERT INTO `sys_menu` VALUES ('29', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '病案首页合格率占比', '18', 'YH-KSZR-BASYHGLZB_XQ', '1', '1', '1', '用户-科室主任-病案首页合格率占比_详情');
+INSERT INTO `sys_menu` VALUES ('30', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '科室缺陷占比', '18', 'YH-KSZR-KSQXZB_XQ', '1', '1', '4', '用户-科室主任-科室缺陷占比_详情');
+INSERT INTO `sys_menu` VALUES ('31', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各科室缺陷占比', '17', 'YH-ZKK-GKSQXZB_XQ', '1', '1', '9', '用户-质控科-各科室缺陷占比_详情');
+INSERT INTO `sys_menu` VALUES ('32', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '质控类型维护', '2', 'YH-JCSJWH-ZKLXWH', '1', '0', '3', '用户-基础数据维护-质控类型维护');
+INSERT INTO `sys_menu` VALUES ('33', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '质控评分(医疗组)', '3', 'YH-BLZK-ZKPFYLZ', '1', '1', '4', '用户-病历质控-质控评分(医疗组)');
+INSERT INTO `sys_menu` VALUES ('34', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '关键条目缺陷占比', '17', 'YH-ZKK-GJTMQXZB', '1', '1', '3', '用户-质控科-关键条目缺陷占比');
+INSERT INTO `sys_menu` VALUES ('35', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '出院人数统计', '17', 'YH-ZKK-CYRSTJ', '1', '1', '11', '用户-质控科-出院人数统计');
+INSERT INTO `sys_menu` VALUES ('36', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '质控核查统计', '17', 'YH-ZKK-ZKHCTJ', '1', '1', '12', '用户-质控科-质控核查统计');
+
+-- ----------------------------
+-- 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=79 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', '用户-质控评分(个人)-获取详情');
+INSERT INTO `sys_menu_permission` VALUES ('32', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '45', '控制台-平均住院天数');
+INSERT INTO `sys_menu_permission` VALUES ('33', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '46', '控制台-平均住院费用');
+INSERT INTO `sys_menu_permission` VALUES ('34', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '47', '控制台-质控平均分按科室统计');
+INSERT INTO `sys_menu_permission` VALUES ('35', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '48', '控制台-各科室甲级病历占比');
+INSERT INTO `sys_menu_permission` VALUES ('36', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '49', '控制台-出院人数统计');
+INSERT INTO `sys_menu_permission` VALUES ('37', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '50', '控制台-质控病历统计');
+INSERT INTO `sys_menu_permission` VALUES ('38', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '51', '控制台-各模块缺陷占比排行');
+INSERT INTO `sys_menu_permission` VALUES ('39', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '52', '控制台-条目缺陷占比');
+INSERT INTO `sys_menu_permission` VALUES ('40', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '53', '控制台-各科室缺陷占比');
+INSERT INTO `sys_menu_permission` VALUES ('41', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '15', '54', '控制台(科室)-出院人数统计(科室)');
+INSERT INTO `sys_menu_permission` VALUES ('42', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '15', '55', '控制台(科室)-质控病历数统计(科室)');
+INSERT INTO `sys_menu_permission` VALUES ('43', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '15', '56', '控制台(科室)-各模块缺陷占比排行(科室)');
+INSERT INTO `sys_menu_permission` VALUES ('44', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '15', '57', '控制台(科室)-条目缺陷占比(科室)');
+INSERT INTO `sys_menu_permission` VALUES ('45', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '15', '58', '控制台(科室)-查询用户关联科室');
+INSERT INTO `sys_menu_permission` VALUES ('46', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '19', '59', '控制台-各模块缺陷占比_详情');
+INSERT INTO `sys_menu_permission` VALUES ('47', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '20', '60', '控制台-条目缺陷占比_详情');
+INSERT INTO `sys_menu_permission` VALUES ('48', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '21', '64', '控制台-科室平均住院天数_详情');
+INSERT INTO `sys_menu_permission` VALUES ('49', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '22', '65', '控制台-科室平均住院花费_详情');
+INSERT INTO `sys_menu_permission` VALUES ('50', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '66', '控制台-各科室质控平均分_详情');
+INSERT INTO `sys_menu_permission` VALUES ('51', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '31', '67', '控制台-各科室缺陷占比-缺陷详情');
+INSERT INTO `sys_menu_permission` VALUES ('52', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '25', '68', '控制台-各科室甲级病历占比_详情');
+INSERT INTO `sys_menu_permission` VALUES ('53', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '26', '69', '控制台(科室)-各模块缺陷占比_详情');
+INSERT INTO `sys_menu_permission` VALUES ('54', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '27', '70', '控制台(科室)-条目缺陷占比_详情');
+INSERT INTO `sys_menu_permission` VALUES ('55', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '31', '71', '控制台-各科室缺陷占比(组合)');
+INSERT INTO `sys_menu_permission` VALUES ('56', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '28', '72', '控制台-病案首页合格率占比');
+INSERT INTO `sys_menu_permission` VALUES ('57', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '30', '73', '控制台(科室)-各科室缺陷占比(科室)');
+INSERT INTO `sys_menu_permission` VALUES ('58', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '29', '74', '控制台(科室)-病案首页合格率占比(科室)');
+INSERT INTO `sys_menu_permission` VALUES ('59', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '75', '控制台-病案首页合格率占比(首页)');
+INSERT INTO `sys_menu_permission` VALUES ('60', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '15', '76', '控制台(科室)-病案首页合格率占比(首页)');
+INSERT INTO `sys_menu_permission` VALUES ('61', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '30', '77', '控制台(科室)-科室缺陷占比-缺陷明细');
+INSERT INTO `sys_menu_permission` VALUES ('62', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '20', '89', '控制台-条目缺陷占比(内页)');
+INSERT INTO `sys_menu_permission` VALUES ('63', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '27', '90', '控制台(科室)-条目缺陷占比-科室(内页)');
+INSERT INTO `sys_menu_permission` VALUES ('64', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '91', '控制台-各科室质控平均分(首页)-根据内外科系统统计');
+INSERT INTO `sys_menu_permission` VALUES ('65', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '31', '92', '控制台-各科室缺陷占比(内页)-根据内外科系统统计');
+INSERT INTO `sys_menu_permission` VALUES ('66', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '20', '94', '数据报表明细-条目缺陷占比-条目缺陷占比质控详情页(全院)');
+INSERT INTO `sys_menu_permission` VALUES ('67', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '27', '95', '数据报表明细(科室)-条目缺陷占比-条目缺陷占比质控详情页(科室)');
+INSERT INTO `sys_menu_permission` VALUES ('68', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '33', '96', '用户-医疗组-分页');
+INSERT INTO `sys_menu_permission` VALUES ('69', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '33', '97', '用户-医疗组-新增质控条目');
+INSERT INTO `sys_menu_permission` VALUES ('70', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '33', '98', '用户-医疗组-删除质控条目');
+INSERT INTO `sys_menu_permission` VALUES ('71', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '33', '99', '用户-医疗组-修改质控条目');
+INSERT INTO `sys_menu_permission` VALUES ('72', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '34', '100', '数据报表明细-关键条目缺陷占比');
+INSERT INTO `sys_menu_permission` VALUES ('73', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '101', '用户-质控评分-核查数据接口');
+INSERT INTO `sys_menu_permission` VALUES ('74', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '9', '105', '用户-质控评分(科室)-核查数据接口');
+INSERT INTO `sys_menu_permission` VALUES ('75', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '10', '104', '用户-质控评分(个人)-核查数据接口');
+INSERT INTO `sys_menu_permission` VALUES ('76', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '33', '106', '用户-医疗组-核查数据接口');
+INSERT INTO `sys_menu_permission` VALUES ('77', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '35', '102', '数据报表明细-出院人数统计');
+INSERT INTO `sys_menu_permission` VALUES ('78', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '36', '103', '数据报表明细-质控核查统计');
+
+-- ----------------------------
+-- 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=107 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', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取医院模块数据信息', 'FUNC000003', '/qc/cases/getQcCases', 'ALL', '用户-基础数据维护-获取医院模块数据信息', '无需加密');
+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', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '分页查询', 'FUNC000005', '/qc/behospitalInfo/page', 'ALL', '用户-质控评分-分页', '无需加密');
+INSERT INTO `sys_permission` VALUES ('6', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '分页获取医院条目数据信息', 'FUNC000006', '/qc/casesEntryHospital/getQcCasesEntryAll', 'ALL', '用户-条目数据维护-分页获取医院条目数据信息', '无需加密');
+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', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取医院模块下拉数据列表', 'FUNC000008', '/qc/casesEntryHospital/getQcCasesAll', 'ALL', '获取医院模块数据列表', '无需加密');
+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', 'Y', '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', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取质控评分详情', 'FUNC000014', '/qc/behospitalInfo/getByBehospitalCode', 'ALL', '用户-质控评分-获取详情', '无需加密');
+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', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取医院科室下拉列表信息', 'FUNC000030', '/bas/dept/getList', 'ALL', '用户-质控评分-获取病历质控一览下医院科室下拉列表信息', '无需加密');
+INSERT INTO `sys_permission` VALUES ('31', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取用户科室下拉列表信息', 'FUNC000031', '/bas/dept/getListUser', 'ALL', '用户-质控评分(科室)-获取病历质控一览下用户科室下拉列表信息', '无需加密');
+INSERT INTO `sys_permission` VALUES ('32', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '分页查询', 'FUNC000032', '/qc/behospitalInfo/page_dept', 'ALL', '用户-质控评分(科室)-分页', '无需加密');
+INSERT INTO `sys_permission` VALUES ('33', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '分页查询', 'FUNC000033', '/qc/behospitalInfo/page_person', 'ALL', '用户-质控评分(个人)-分页', '无需加密');
+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', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取质控评分详情', 'FUNC000014', '/qc/behospitalInfo/getByBehospitalCode', 'ALL', '用户-质控评分(科室)-获取详情', '无需加密');
+INSERT INTO `sys_permission` VALUES ('39', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取用户科室下拉列表信息', 'FUNC000031', '/bas/dept/getListUser', 'ALL', '用户-质控评分(个人)-获取病历质控一览下用户科室下拉列表信息', '无需加密');
+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', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取质控评分详情', 'FUNC000014', '/qc/behospitalInfo/getByBehospitalCode', 'ALL', '用户-质控评分(个人)-获取详情', '无需加密');
+INSERT INTO `sys_permission` VALUES ('45', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '平均住院天数', 'FUNC000045', '/console/getAverageDayNum', 'ALL', '控制台-平均住院天数', null);
+INSERT INTO `sys_permission` VALUES ('46', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '平均住院费用', 'FUNC000046', '/console/getAverageFee', 'ALL', '控制台-平均住院费用', null);
+INSERT INTO `sys_permission` VALUES ('47', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '质控平均分按科室统计', 'FUNC000047', '/console/getAverageScore', 'ALL', '控制台-质控平均分按科室统计', null);
+INSERT INTO `sys_permission` VALUES ('48', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各科室甲级病历占比', 'FUNC000048', '/console/getLevelResultDept', 'ALL', '控制台-各科室甲级病历占比', null);
+INSERT INTO `sys_permission` VALUES ('49', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '出院人数统计', 'FUNC000049', '/console/leaveHosCount', 'ALL', '控制台-出院人数统计', null);
+INSERT INTO `sys_permission` VALUES ('50', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '质控病历统计', 'FUNC000050', '/console/mrCount', 'ALL', '控制台-质控病历统计', null);
+INSERT INTO `sys_permission` VALUES ('51', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各模块缺陷占比排行', 'FUNC000051', '/console/entryCountGroupByCase', 'ALL', '控制台-各模块缺陷占比排行', null);
+INSERT INTO `sys_permission` VALUES ('52', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '条目缺陷占比', 'FUNC000052', '/console/entryCountGroupByEntry', 'ALL', '控制台-条目缺陷占比', null);
+INSERT INTO `sys_permission` VALUES ('53', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各科室缺陷占比', 'FUNC000053', '/console/entryByDept', 'ALL', '控制台-各科室缺陷占比', null);
+INSERT INTO `sys_permission` VALUES ('54', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '出院人数统计(科室)', 'FUNC000054', '/consoleByDept/leaveHosCountByDept', 'ALL', '控制台(科室)-出院人数统计(科室)', null);
+INSERT INTO `sys_permission` VALUES ('55', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '质控病历数统计(科室)', 'FUNC000055', '/consoleByDept/mrCountByDept', 'ALL', '控制台(科室)-质控病历数统计(科室)', null);
+INSERT INTO `sys_permission` VALUES ('56', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各模块缺陷占比排行(科室)', 'FUNC000056', '/consoleByDept/entryCountGroupByCaseAndDept', 'ALL', '控制台(科室)-各模块缺陷占比排行(科室)', null);
+INSERT INTO `sys_permission` VALUES ('57', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '条目缺陷占比(科室)', 'FUNC000057', '/consoleByDept/entryCountGroupByEntryAndDept', 'ALL', '控制台(科室)-条目缺陷占比(科室)', null);
+INSERT INTO `sys_permission` VALUES ('58', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '查询用户关联科室', 'FUNC000058', '/consoleByDept/getDept', 'ALL', '控制台(科室)-查询用户关联科室', null);
+INSERT INTO `sys_permission` VALUES ('59', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各模块缺陷占比_详情', 'FUNC000059', '/console/entryCountGroupByCasePage', 'ALL', '控制台-各模块缺陷占比_详情', null);
+INSERT INTO `sys_permission` VALUES ('60', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '条目缺陷占比_详情', 'FUNC000060', '/console/entryCountGroupByEntryPage', 'ALL', '控制台-条目缺陷占比_详情', null);
+INSERT INTO `sys_permission` VALUES ('61', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '查询异常数据监控信息', 'FUNC000061', '/qc/abnormal/getQcAnnormal', 'ALL', '异常数据监控-查询异常数据监控信息', null);
+INSERT INTO `sys_permission` VALUES ('62', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '更新异常数据监控信息', 'FUNC000062', '/qc/abnormal/saveQcAnnormal', 'ALL', '异常数据监控-异常数据监控-查询异常数据监控信息', null);
+INSERT INTO `sys_permission` VALUES ('63', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '删除异常数据监控信息', 'FUNC000063', '/qc/abnormal/delQcAnnormal', 'ALL', '异常数据监控-异常数据监控-删除异常数据监控信息', null);
+INSERT INTO `sys_permission` VALUES ('64', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '科室平均住院天数_详情', 'FUNC000064', '/console/getAverageDayNumPage', 'ALL', '控制台-科室平均住院天数_详情', null);
+INSERT INTO `sys_permission` VALUES ('65', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '科室平均住院花费_详情', 'FUNC000065', '/console/getAverageFeePage', 'ALL', '控制台-科室平均住院花费_详情', null);
+INSERT INTO `sys_permission` VALUES ('66', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各科室质控平均分_详情', 'FUNC000066', '/console/getAverageScoreByDeptPage', 'ALL', '控制台-各科室质控平均分_详情', null);
+INSERT INTO `sys_permission` VALUES ('67', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各科室缺陷占比-缺陷详情', 'FUNC000067', '/console/resultStatisticsByDeptPage', 'ALL', '控制台-各科室缺陷占比-缺陷详情', null);
+INSERT INTO `sys_permission` VALUES ('68', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各科室甲级病历占比_详情', 'FUNC000068', '/console/levelPercentGroupByDeptPage', 'ALL', '控制台-各科室甲级病历占比_详情', null);
+INSERT INTO `sys_permission` VALUES ('69', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各模块缺陷占比_详情', 'FUNC000069', '/consoleByDept/entryCountGroupByCaseAndDeptPage', 'ALL', '控制台(科室)-各模块缺陷占比_详情', null);
+INSERT INTO `sys_permission` VALUES ('70', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '条目缺陷占比_详情', 'FUNC000070', '/consoleByDept/entryCountGroupByEntryAndDeptPage', 'ALL', '控制台(科室)-条目缺陷占比_详情', null);
+INSERT INTO `sys_permission` VALUES ('71', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各科室缺陷占比(组合)', 'FUNC000071', '/console/levelStatistics', 'ALL', '控制台-各科室缺陷占比(组合)', null);
+INSERT INTO `sys_permission` VALUES ('72', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '病案首页合格率占比', 'FUNC000072', '/console/homePageLevelStatistics', 'ALL', '控制台-病案首页合格率占比', null);
+INSERT INTO `sys_permission` VALUES ('73', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各科室缺陷占比', 'FUNC000073', '/consoleByDept/levelStatisticsByDept', 'ALL', '控制台(科室)-各科室缺陷占比(科室)', null);
+INSERT INTO `sys_permission` VALUES ('74', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '病案首页合格率占比', 'FUNC000074', '/consoleByDept/homePageLevelStatisticsByDept', 'ALL', '控制台(科室)-病案首页合格率占比(科室)', null);
+INSERT INTO `sys_permission` VALUES ('75', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '病案首页合格率占比(首页)', 'FUNC000075', '/console/homePageLevelLimit', 'ALL', '控制台-病案首页合格率占比(首页)', null);
+INSERT INTO `sys_permission` VALUES ('76', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '病案首页合格率占比(首页)', 'FUNC000076', '/consoleByDept/homePageLevelByDeptLimit', 'ALL', '控制台(科室)-病案首页合格率占比(首页)', null);
+INSERT INTO `sys_permission` VALUES ('77', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '科室缺陷占比-缺陷明细', 'FUNC000077', '/consoleByDept/resultStatisticsByDeptAndDoctorPage', 'ALL', '控制台(科室)-科室缺陷占比-缺陷明细', null);
+INSERT INTO `sys_permission` VALUES ('78', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '分页列表', 'FUNC000078', '/qc/qcType/page', 'ALL', '用户-质控类型维护-分页列表', null);
+INSERT INTO `sys_permission` VALUES ('79', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '新增或更新', 'FUNC000079', '/qc/qcType/saveOrUpdate', 'ALL', '用户-质控类型维护-新增或更新', null);
+INSERT INTO `sys_permission` VALUES ('80', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '新增时质控条目分组信息', 'FUNC000080', '/qc/qcType/getEntryByHospital', 'ALL', '用户-质控类型维护-新增时质控条目分组信息', null);
+INSERT INTO `sys_permission` VALUES ('81', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '质控条目检索', 'FUNC000081', '/qc/qcType/index', 'ALL', '用户-质控类型维护-质控条目检索', null);
+INSERT INTO `sys_permission` VALUES ('82', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '删除', 'FUNC000082', '/qc/qcType/delete', 'ALL', '用户-质控类型维护-删除', null);
+INSERT INTO `sys_permission` VALUES ('83', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '根据id返回内容', 'FUNC000083', '/qc/qcType/getById', 'ALL', '用户-质控类型维护-根据id返回内容', null);
+INSERT INTO `sys_permission` VALUES ('84', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取医院数据全部条目', 'FUNC000084', '/qc/modelHospital/getModelHospitalAll', 'ALL', '用户-质控类型维护-获取医院数据全部条目', null);
+INSERT INTO `sys_permission` VALUES ('85', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '根据id获取医院数据', 'FUNC000085', '/qc/modelHospital/getModelHospitalById', 'ALL', '用户-质控类型维护-根据id获取医院数据', null);
+INSERT INTO `sys_permission` VALUES ('86', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '添加和修改医院数据模块', 'FUNC000086', '/qc/modelHospital/saveAndupdataModel', 'ALL', '用户-质控类型维护-添加和修改医院数据模块', null);
+INSERT INTO `sys_permission` VALUES ('87', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '删除医院数据模块', 'FUNC000087', '/qc/modelHospital/clearModelHospital', 'ALL', '用户-质控类型维护-删除医院数据模块', null);
+INSERT INTO `sys_permission` VALUES ('88', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '获取医院全部模块', 'FUNC0000888', '/qc/mode/getModes', 'ALL', '用户-质控类型维护-获取医院全部模块', null);
+INSERT INTO `sys_permission` VALUES ('89', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '条目缺陷占比(内页)', 'FUNC000089', '/console/entryGroupByEntryInnerPage', 'ALL', '控制台-条目缺陷占比(内页)', null);
+INSERT INTO `sys_permission` VALUES ('90', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '条目缺陷占比-科室(内页)', 'FUNC000090', '/consoleByDept/entryGroupByEntryAndDeptInnerPage', 'ALL', '控制台(科室)-条目缺陷占比-科室(内页)', null);
+INSERT INTO `sys_permission` VALUES ('91', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各科室质控平均分(首页)-根据内外科系统统计', 'FUNC000091', '/console/getAverageScoreByDeptClass', 'ALL', '控制台-各科室质控平均分(首页)-根据内外科系统统计', null);
+INSERT INTO `sys_permission` VALUES ('92', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '各科室缺陷占比(内页)-根据内外科系统统计', 'FUNC000092', '/console/levelStatisticsByDeptClass', 'ALL', '控制台-各科室缺陷占比(内页)-根据内外科系统统计', null);
+INSERT INTO `sys_permission` VALUES ('93', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '根据id查询数据模块信息', 'FUNC000093', '/qc/abnormal/getQcAnnormalMode', 'ALL', '异常数据监控-异常数据监控-根据id查询数据模块信息', null);
+INSERT INTO `sys_permission` VALUES ('94', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '条目缺陷占比质控详情页(全院)', 'FUNC000094', '/console/qcResultShortPage', 'ALL', '数据报表明细-条目缺陷占比-条目缺陷占比质控详情页(全院)', null);
+INSERT INTO `sys_permission` VALUES ('95', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '条目缺陷占比质控详情页(科室)', 'FUNC000095', '/consoleByDept/qcResultShortByDeptPage', 'ALL', '数据报表明细(科室)-条目缺陷占比-条目缺陷占比质控详情页(科室)', null);
+INSERT INTO `sys_permission` VALUES ('96', '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 ('97', '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 ('98', '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 ('99', '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 ('100', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '关键条目缺陷占比', 'FUNC000100', '/console/entryStatistics', 'ALL', '数据报表明细-关键条目缺陷占比', null);
+INSERT INTO `sys_permission` VALUES ('101', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '核查数据接口', 'FUNC000014', '/qc/medCheckInfo/addMedCheckInfo', 'ALL', '用户-核查数据接口', null);
+INSERT INTO `sys_permission` VALUES ('102', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '出院人数统计', 'FUNC000102', '/console/leaveHosMRPage', 'ALL', '数据报表明细-出院人数统计', null);
+INSERT INTO `sys_permission` VALUES ('103', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '质控核查统计', 'FUNC000103', '/console/qcCheckStatistics', 'ALL', '数据表白明细-质控核查统计', null);
+INSERT INTO `sys_permission` VALUES ('104', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '核查数据接口(个人)', 'FUNC000014', '/qc/medCheckInfo/addMedCheckInfo', 'ALL', '用户-核查数据接口', null);
+INSERT INTO `sys_permission` VALUES ('105', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '核查数据接口(科室)', 'FUNC000014', '/qc/medCheckInfo/addMedCheckInfo', 'ALL', '用户-核查数据接口', null);
+INSERT INTO `sys_permission` VALUES ('106', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '核查数据接口(医疗组)', 'FUNC000014', '/qc/medCheckInfo/addMedCheckInfo', 'ALL', '用户-核查数据接口', null);
+-- ----------------------------
+
+INSERT INTO `sys_role_menu`( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`)  VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '35', '用户-质控科-出院人数统计');
+INSERT INTO `sys_role_menu`( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`)  VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '36', '用户-质控科-质控核查统计');
+
+
+-- ----------------------------
+
+INSERT INTO `sys_role_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`)  VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '101', null);
+INSERT INTO `sys_role_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '101', null);
+INSERT INTO `sys_role_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`)  VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '102', '数据报表明细-出院人数统计');
+INSERT INTO `sys_role_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '103', '数据报表明细-质控核查统计');
+
+INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '104', NULL);
+INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '104', NULL);
+INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '105', NULL);
+INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '105', NULL);
+INSERT INTO `sys_role_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '106', NULL);
+INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '106', NULL);

+ 18 - 0
doc/014.20200708v1.3.6.5/qc_initv1.3.6.5.sql

@@ -0,0 +1,18 @@
+use `qc`;
+
+INSERT INTO `qc`.`sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '评分接口地址(本地)', 'active_profiles_local', 'http://192.168.2.232:6007', '评分接口地址(本地)-长兴');
+INSERT INTO `qc`.`sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '评分接口地址(本地)', 'active_profiles_local', 'http://192.168.2.232:6008', '评分接口地址(本地)-邵逸夫');
+INSERT INTO `qc`.`sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '3', '评分接口地址(本地)', 'active_profiles_local', 'http://192.168.2.232:6009', '评分接口地址(本地)-台州');
+INSERT INTO `qc`.`sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '评分接口地址(开发)', 'active_profiles_dev', 'http://192.168.2.232:6007', '评分接口地址(开发)-长兴');
+INSERT INTO `qc`.`sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '评分接口地址(开发)', 'active_profiles_dev', 'http://192.168.2.232:6008', '评分接口地址(开发)-邵逸夫');
+INSERT INTO `qc`.`sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '3', '评分接口地址(开发)', 'active_profiles_dev', 'http://192.168.2.232:6009', '评分接口地址(开发)-台州');
+INSERT INTO `qc`.`sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '评分接口地址(测试)', 'active_profiles_test', 'http://192.168.2.241:6007', '评分接口地址(测试)-长兴');
+INSERT INTO `qc`.`sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '评分接口地址(测试)', 'active_profiles_test', 'http://192.168.2.241:6008', '评分接口地址(测试)-邵逸夫');
+INSERT INTO `qc`.`sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '3', '评分接口地址(测试)', 'active_profiles_test', 'http://192.168.2.241:6009', '评分接口地址(测试)-台州');
+INSERT INTO `qc`.`sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '评分接口地址(医学)', 'active_profiles_pre', 'http://192.168.2.186:6007', '评分接口地址(医学)-长兴');
+INSERT INTO `qc`.`sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '评分接口地址(医学)', 'active_profiles_pre', 'http://192.168.2.186:6008', '评分接口地址(医学)-邵逸夫');
+INSERT INTO `qc`.`sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '3', '评分接口地址(医学)', 'active_profiles_pre', 'http://192.168.2.186:6009', '评分接口地址(医学)-台州');
+INSERT INTO `qc`.`sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '评分接口地址(参考)', 'active_profiles_pro', 'http://192.168.2.123:6007', '评分接口地址(参考)-长兴');
+INSERT INTO `qc`.`sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '评分接口地址(参考)', 'active_profiles_pro', 'http://192.168.2.123:6008', '评分接口地址(参考)-邵逸夫');
+INSERT INTO `qc`.`sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '3', '评分接口地址(参考)', 'active_profiles_pro', 'http://192.168.2.123:6009', '评分接口地址(参考)-台州');
+

+ 9 - 0
doc/015.20200706v1.3.7.1/qc_initv1.3.7.1.sql

@@ -0,0 +1,9 @@
+use `qc`;
+
+ALTER TABLE `qc_cases_entry` ADD `drgs` tinyint(4) DEFAULT '2' COMMENT '是否控费(1:是,2:否)' AFTER `name`;
+ALTER TABLE `qc_cases_entry` ADD `type` tinyint(4) DEFAULT '1' COMMENT '质控形式(1:形式质控,2:内涵质控)' AFTER `drgs`;
+
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '17', '是', '1', '1', '1', '是否控费');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '17', '否', '2', '1', '2', '是否控费');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '18', '形式质控', '1', '1', '2', '质控形式');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '18', '内涵质控', '2', '1', '1', '质控形式');

+ 15 - 0
doc/015.20200714病案首页添加14个字段/qc_init_20200714.sql

@@ -0,0 +1,15 @@
+use `qc`;
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'isPhysicalRestraint', '住院期间身体约束', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'tbiBehospitalBeforeTime', '入院前颅脑损伤患者昏迷时间', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'tbiBehospitalAfterTime', '入院后颅脑损伤患者昏迷时间', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'isFallBed', '住院期间是否发生跌倒或坠床', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'isNosocomialInfection', '医院感染', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'isIntoIcu', '入住ICU情况', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'isComplications', '并发症情况', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'isPressureSore', '是否发生压疮', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'isBehospitalPressureSore', '是否住院期间发生压疮', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'isUnplannedReoperation', '非计划再次手术', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'treatmentResults', '治疗结果', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'complicationsResults', '并发症', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'infectionSite', '感染部位', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'isBeInDanger', '住院期间有无告病危', '2', '0', '病案首页');

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 9 - 0
doc/016.20200715v1.3.7.2/qc_initv.1.3.7.2.sql


+ 134 - 0
doc/017.20200716v1.3.8/qc_inti_check.sql

@@ -0,0 +1,134 @@
+use `qc`;
+ALTER TABLE `med_check_info` ADD COLUMN `check_type` INT(11) NULL COMMENT '核查类型(0病历,1病案首页)' AFTER `status`;
+UPDATE med_check_info a SET check_type =0;
+UPDATE med_check_info a SET check_name = (SELECT linkman FROM sys_user b WHERE a.check_id=b.id);
+
+DELETE FROM sys_user_pageset WHERE user_id = -1;
+
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病历等级', 'level', '1', '1', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病历得分', 'scoreRes', '1', '2', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病人住院序号', 'behospitalCode', '1', '3', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病案首页核查状态', 'mrStatus', '1', '4', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病案首页核查人', 'mrName', '1', '5', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病案首页核查时间', 'mrTime', '1', '6', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病历核查状态', 'checkStatus', '1', '7', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病历核查人', 'chName', '1', '8', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病历核查时间', 'chTime', '1', '9', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病案号', 'fileCode', '1', '10', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病人姓名', 'name', '1', '11', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '性别', 'sex', '1', '12', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '年龄', 'age', '1', '13', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '床号', 'bedCode', '1', '14', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '入院日期', 'behospitalDate', '1', '15', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '出院日期', 'leaveHospitalDate', '1', '16', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '归档日期', 'placefileDate', '1', '17', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '主诊断', 'diagnose', '1', '18', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '住院医生', 'behDoctorName', '1', '19', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '主管医生', 'doctorName', '1', '20', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '主任医生', 'directorDoctorName', '1', '21', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '科室', 'behDeptName', '1', '22', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '评分时间', 'gradeTime', '1', '23', NULL);
+
+-- 找出没有”核查状态“的人员并给加上
+ INSERT INTO sys_user_pageset
+(  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`)
+ SELECT is_deleted,
+gmt_create,
+ gmt_modified,
+ creator,
+MODIFIER,
+ user_id,
+ page_type,
+ CASE WHEN ISNULL(NAME) THEN "病案首页核查状态" ELSE "病案首页核查状态" END NAME,
+ CASE WHEN ISNULL(userId) THEN "mrStatus" ELSE "mrStatus" END val,
+ CASE WHEN ISNULL(STATUS) THEN 0 ELSE 0 END STATUS,
+ CASE WHEN ISNULL(order_no) THEN 4 ELSE 4 END order_no,
+ remark
+ FROM (SELECT * FROM  sys_user_pageset  WHERE user_id <> -1) b LEFT JOIN  (SELECT c.user_id AS userId FROM  sys_user_pageset c  WHERE user_id <> -1 AND val = "mrStatus") p ON b.user_id = p.userId
+WHERE  userId IS NULL
+ GROUP BY user_id ;
+
+
+ INSERT INTO sys_user_pageset
+(  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`)
+ SELECT is_deleted,
+gmt_create,
+ gmt_modified,
+ creator,
+MODIFIER,
+ user_id,
+ page_type,
+ CASE WHEN ISNULL(NAME) THEN "病案首页核查人" ELSE "病案首页核查人" END NAME,
+ CASE WHEN ISNULL(userId) THEN "mrName" ELSE "mrName" END val,
+ CASE WHEN ISNULL(STATUS) THEN 0 ELSE 0 END STATUS,
+ CASE WHEN ISNULL(order_no) THEN 5 ELSE 5 END order_no,
+ remark
+ FROM (SELECT * FROM  sys_user_pageset  WHERE user_id <> -1) b LEFT JOIN  (SELECT c.user_id AS userId FROM  sys_user_pageset c  WHERE user_id <> -1 AND val = "mrName") p ON b.user_id = p.userId
+WHERE  userId IS NULL
+ GROUP BY user_id ;
+
+
+ INSERT INTO sys_user_pageset
+(  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`)
+ SELECT is_deleted,
+gmt_create,
+ gmt_modified,
+ creator,
+MODIFIER,
+ user_id,
+ page_type,
+ CASE WHEN ISNULL(NAME) THEN "病案首页核查时间" ELSE "病案首页核查时间" END NAME,
+ CASE WHEN ISNULL(userId) THEN "mrTime" ELSE "mrTime" END val,
+ CASE WHEN ISNULL(STATUS) THEN 0 ELSE 0 END STATUS,
+ CASE WHEN ISNULL(order_no) THEN 6 ELSE 6 END order_no,
+ remark
+ FROM (SELECT * FROM  sys_user_pageset  WHERE user_id <> -1) b LEFT JOIN  (SELECT c.user_id AS userId FROM  sys_user_pageset c  WHERE user_id <> -1 AND val = "mrTime") p ON b.user_id = p.userId
+WHERE  userId IS NULL
+ GROUP BY user_id ;
+
+
+
+ INSERT INTO sys_user_pageset
+(  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`)
+ SELECT is_deleted,
+gmt_create,
+ gmt_modified,
+ creator,
+MODIFIER,
+ user_id,
+ page_type,
+ CASE WHEN ISNULL(NAME) THEN "病历核查人" ELSE "病历核查人" END NAME,
+ CASE WHEN ISNULL(userId) THEN "chName" ELSE "chName" END val,
+ CASE WHEN ISNULL(STATUS) THEN 0 ELSE 0 END STATUS,
+ CASE WHEN ISNULL(order_no) THEN 7 ELSE 7 END order_no,
+ remark
+ FROM (SELECT * FROM  sys_user_pageset  WHERE user_id <> -1) b LEFT JOIN  (SELECT c.user_id AS userId FROM  sys_user_pageset c  WHERE user_id <> -1 AND val = "chName") p ON b.user_id = p.userId
+WHERE  userId IS NULL
+ GROUP BY user_id ;
+
+
+ INSERT INTO sys_user_pageset
+(  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`)
+ SELECT is_deleted,
+gmt_create,
+ gmt_modified,
+ creator,
+MODIFIER,
+ user_id,
+ page_type,
+ CASE WHEN ISNULL(NAME) THEN "病历核查时间" ELSE "病历核查时间" END NAME,
+ CASE WHEN ISNULL(userId) THEN "chTime" ELSE "chTime" END val,
+ CASE WHEN ISNULL(STATUS) THEN 0 ELSE 0 END STATUS,
+ CASE WHEN ISNULL(order_no) THEN 8 ELSE 8 END order_no,
+ remark
+ FROM (SELECT * FROM  sys_user_pageset  WHERE user_id <> -1) b LEFT JOIN  (SELECT c.user_id AS userId FROM  sys_user_pageset c  WHERE user_id <> -1 AND val = "chTime") p ON b.user_id = p.userId
+WHERE  userId IS NULL
+ GROUP BY user_id ;
+
+ UPDATE sys_user_pageset a SET a.name = "病历核查状态" WHERE a.user_id <> -1 AND val ="checkStatus";
+
+-- 新增权限
+INSERT INTO `sys_menu`(`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `parent_id`, `code`, `show_status`, `maintain_status`, `order_no`, `remark`) VALUES (38, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '31日再入院病人数', 17, 'YH-ZKK-31TZRYRS', 1, 1, 14, '用户-质控科-31日再入院病人数');
+INSERT INTO `sys_role_menu`(`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', -1, 38, '用户-质控科-31天再入院人数');
+
+update sys_menu set name ='时效性相关统计' where id=37;

+ 3 - 0
doc/017.20200717v1.3.7.3/qc_initv1.3.7.3.sql

@@ -0,0 +1,3 @@
+use `qc`;
+
+UPDATE `qc`.`qc_mode` SET `id`='8', `name`='医嘱信息', `order_no`='255', `parent_id`='37', `is_deleted`='N', `gmt_create`='1970-01-01 12:00:00', `gmt_modified`='1970-01-01 12:00:00', `creator`='0', `modifier`='0', `remark`=NULL WHERE (`id`='8');

+ 10 - 0
doc/019.20200727v2.0.0/qc_initv2.0.0.sql

@@ -0,0 +1,10 @@
+use `qc`;
+
+-- 新增权限
+INSERT INTO `sys_menu`(`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `parent_id`, `code`, `show_status`, `maintain_status`, `order_no`, `remark`) VALUES (39, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '入院人数统计', 17, 'YH-ZKK-RYRSTJ', 1, 1, 11, '用户-质控科-入院人数统计');
+INSERT INTO `sys_role_menu`(`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', -1, 39, '用户-质控科-入院人数统计');
+update `sys_menu` set is_deleted='Y' where id=15;  -- 控制台(科室)
+update `sys_menu` set is_deleted='Y' where id=18;  -- 数据报表明细(科室)
+update `sys_menu` set is_deleted='Y' where id=21;  -- 科室平均住院天数
+update `sys_menu` set is_deleted='Y' where id=22;  -- 科室平均住院花费
+update `sys_menu` set is_deleted='Y' where id=25;  -- 各科室甲级病历占比

+ 12 - 0
doc/020.20200805v1.4.0/qc_initv1.4.0.sql

@@ -0,0 +1,12 @@
+use `qc`;
+
+-- 默认列设置
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'behospitalCode';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'mrTime';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'chTime';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'sex';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'age';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'bedCode';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'placefileDate';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'behDoctorName';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'directorDoctorName';

+ 9 - 0
doc/021.20200812v1.4.2/qc_initv1.4.2.sql

@@ -0,0 +1,9 @@
+use `qc`;
+
+ALTER TABLE `qc_cases_entry_hospital` ADD   `score_run` decimal(5,1) DEFAULT NULL COMMENT '扣分值(运行质控)' AFTER `score`;
+ALTER TABLE `qc_cases_entry_hospital` ADD   `is_used_run` int(3) DEFAULT NULL COMMENT '0-未启用 1-启用(运行质控)' AFTER `is_used`;
+update qc_cases_entry_hospital set is_used_run = is_used, score_run=score;
+UPDATE `sys_dictionary_info` SET `name` = '形式质控',`order_no` = 3 WHERE `name` = '形式质控' and group_type = '18' and val = '1';
+UPDATE `sys_dictionary_info` SET `name` = '内涵CRF质控',`order_no` = 2 WHERE `name` = '内涵质控' and group_type = '18' and val = '2';
+INSERT INTO `sys_dictionary_info` (`is_deleted`,`gmt_create`,`gmt_modified`,`creator`,`modifier`,`group_type`,`name`,`val`,`return_type`,`order_no`,`remark`) VALUES ('N','1970-01-01 12:00:00','1970-01-01 12:00:00','0','0',18,'内涵规则质控','3',1,1,'质控形式');
+alter table qc_cases_entry MODIFY remark varchar(1024) DEFAULT NULL COMMENT '备注';

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 18 - 0
doc/022.20200911v1.4.5/qc_initv1.4.5.sql


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1035 - 0
doc/023.20200923v1.5.0/qc_initv1.5.0.sql


+ 5 - 0
doc/023.20200923v5.4.0云后台自用/qc_initv5.4.0.sql

@@ -0,0 +1,5 @@
+use `qc`;
+ALTER TABLE `qc_module_info` ADD `default_module` int(3) DEFAULT NULL COMMENT '默认模版是否开启(0-否 1-是)' AFTER `name`;
+UPDATE  `qc_module_info` set default_module = 0
+ALTER TABLE `qc_type` ADD `default_module` int(3) DEFAULT NULL COMMENT '默认模版是否开启(0-否 1-是 -1病历不质控)' AFTER `name`;
+UPDATE  `qc_type` set default_module = 0

+ 26 - 0
doc/024.20200923v1.4.6/qc_initv1.4.6.sql

@@ -0,0 +1,26 @@
+use `qc`;
+UPDATE `sys_user_pageset` SET  `order_no` = 0  WHERE user_id = -1 and name = '病历等级';
+UPDATE `sys_user_pageset` SET  `order_no` = 1  WHERE user_id = -1 and name = '病历得分';
+INSERT INTO `qc`.`sys_user_pageset`(`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', -1, 1, '病案首页得分', 'scoreBn', 0, 2, NULL);
+UPDATE `sys_user_pageset` SET  `order_no` = 3  WHERE user_id = -1 and name = '病人住院序号';
+UPDATE `sys_user_pageset` SET  `order_no` = 4  WHERE user_id = -1 and name = '病案首页核查状态';
+UPDATE `sys_user_pageset` SET  `order_no` = 5  WHERE user_id = -1 and name = '病案首页核查人';
+UPDATE `sys_user_pageset` SET  `order_no` = 6  WHERE user_id = -1 and name = '病案首页核查时间';
+UPDATE `sys_user_pageset` SET  `order_no` = 7  WHERE user_id = -1 and name = '病历核查状态';
+UPDATE `sys_user_pageset` SET  `order_no` = 8  WHERE user_id = -1 and name = '病历核查人';
+UPDATE `sys_user_pageset` SET  `order_no` = 9  WHERE user_id = -1 and name = '病历核查时间';
+UPDATE `sys_user_pageset` SET  `order_no` = 10  WHERE user_id = -1 and name = '病案号';
+UPDATE `sys_user_pageset` SET  `order_no` = 11  WHERE user_id = -1 and name = '病人姓名';
+UPDATE `sys_user_pageset` SET  `order_no` = 12  WHERE user_id = -1 and name = '性别';
+UPDATE `sys_user_pageset` SET  `order_no` = 13  WHERE user_id = -1 and name = '年龄';
+UPDATE `sys_user_pageset` SET  `order_no` = 14  WHERE user_id = -1 and name = '床号';
+UPDATE `sys_user_pageset` SET  `order_no` = 15  WHERE user_id = -1 and name = '入院日期';
+UPDATE `sys_user_pageset` SET  `order_no` = 16  WHERE user_id = -1 and name = '出院日期';
+UPDATE `sys_user_pageset` SET  `order_no` = 17  WHERE user_id = -1 and name = '归档日期';
+UPDATE `sys_user_pageset` SET  `order_no` = 18  WHERE user_id = -1 and name = '主诊断';
+UPDATE `sys_user_pageset` SET  `order_no` = 19  WHERE user_id = -1 and name = '住院医生';
+UPDATE `sys_user_pageset` SET  `order_no` = 20  WHERE user_id = -1 and name = '主管医生';
+UPDATE `sys_user_pageset` SET  `order_no` = 21  WHERE user_id = -1 and name = '主任医生';
+UPDATE `sys_user_pageset` SET  `order_no` = 22  WHERE user_id = -1 and name = '科室';
+UPDATE `sys_user_pageset` SET  `order_no` = 23  WHERE user_id = -1 and name = '评分时间';
+

+ 26 - 0
doc/024.20201009v1.4.6/qc_initv1.4.6.sql

@@ -0,0 +1,26 @@
+use `qc`;
+UPDATE `sys_user_pageset` SET  `order_no` = 0  WHERE user_id = -1 and name = '病历等级';
+UPDATE `sys_user_pageset` SET  `order_no` = 1  WHERE user_id = -1 and name = '病历得分';
+INSERT INTO `qc`.`sys_user_pageset`(`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', -1, 1, '病案首页得分', 'scoreBn', 0, 2, NULL);
+UPDATE `sys_user_pageset` SET  `order_no` = 3  WHERE user_id = -1 and name = '病人住院序号';
+UPDATE `sys_user_pageset` SET  `order_no` = 4  WHERE user_id = -1 and name = '病案首页核查状态';
+UPDATE `sys_user_pageset` SET  `order_no` = 5  WHERE user_id = -1 and name = '病案首页核查人';
+UPDATE `sys_user_pageset` SET  `order_no` = 6  WHERE user_id = -1 and name = '病案首页核查时间';
+UPDATE `sys_user_pageset` SET  `order_no` = 7  WHERE user_id = -1 and name = '病历核查状态';
+UPDATE `sys_user_pageset` SET  `order_no` = 8  WHERE user_id = -1 and name = '病历核查人';
+UPDATE `sys_user_pageset` SET  `order_no` = 9  WHERE user_id = -1 and name = '病历核查时间';
+UPDATE `sys_user_pageset` SET  `order_no` = 10  WHERE user_id = -1 and name = '病案号';
+UPDATE `sys_user_pageset` SET  `order_no` = 11  WHERE user_id = -1 and name = '病人姓名';
+UPDATE `sys_user_pageset` SET  `order_no` = 12  WHERE user_id = -1 and name = '性别';
+UPDATE `sys_user_pageset` SET  `order_no` = 13  WHERE user_id = -1 and name = '年龄';
+UPDATE `sys_user_pageset` SET  `order_no` = 14  WHERE user_id = -1 and name = '床号';
+UPDATE `sys_user_pageset` SET  `order_no` = 15  WHERE user_id = -1 and name = '入院日期';
+UPDATE `sys_user_pageset` SET  `order_no` = 16  WHERE user_id = -1 and name = '出院日期';
+UPDATE `sys_user_pageset` SET  `order_no` = 17  WHERE user_id = -1 and name = '归档日期';
+UPDATE `sys_user_pageset` SET  `order_no` = 18  WHERE user_id = -1 and name = '主诊断';
+UPDATE `sys_user_pageset` SET  `order_no` = 19  WHERE user_id = -1 and name = '住院医生';
+UPDATE `sys_user_pageset` SET  `order_no` = 20  WHERE user_id = -1 and name = '主管医生';
+UPDATE `sys_user_pageset` SET  `order_no` = 21  WHERE user_id = -1 and name = '主任医生';
+UPDATE `sys_user_pageset` SET  `order_no` = 22  WHERE user_id = -1 and name = '科室';
+UPDATE `sys_user_pageset` SET  `order_no` = 23  WHERE user_id = -1 and name = '评分时间';
+

+ 2 - 0
doc/025.20201021v1.4.7/qc_initv1.4.7.sql

@@ -0,0 +1,2 @@
+use `qc`;
+INSERT INTO `qc`.`sys_dictionary_info`( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', 3, 'anaesthesiaDoctor', '麻醉医师', 2, 0, '病案首页手术信息');

+ 36 - 0
doc/026.20201123v1.4.8/qc_initv1.4.8.sql

@@ -0,0 +1,36 @@
+use `qc`;
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+DROP TABLE IF EXISTS `med_transfer_record`;
+CREATE TABLE `med_transfer_record` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `hospital_id` int(20) NOT NULL COMMENT '医院ID',
+  `behospital_code` varchar(50) NOT NULL COMMENT '病历号',
+  `name` varchar(32) DEFAULT NULL COMMENT '姓名',
+  `sex` varchar(2) DEFAULT NULL COMMENT '性别',
+  `age` int(5) DEFAULT NULL COMMENT '年龄',
+  `dept_name` varchar(255) DEFAULT NULL COMMENT '科别',
+  `transfer_out_date` datetime DEFAULT NULL COMMENT '转出日期',
+  `transfer_in_date` datetime DEFAULT NULL COMMENT '转入日期',
+  `transfer_out_dept` varchar(255) DEFAULT NULL COMMENT '转出科室',
+  `transfer_in_dept` varchar(255) DEFAULT NULL COMMENT '转入科室',
+  `rec_doctor` varchar(255) DEFAULT NULL COMMENT '记录医生',
+  `rec_date` datetime DEFAULT NULL COMMENT '记录时间',
+  `remark` varchar(1024) DEFAULT NULL COMMENT '备注',
+  `is_deleted` varchar(3) DEFAULT 'N' COMMENT '是否删除',
+  `gmt_create` datetime DEFAULT NULL COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT NULL COMMENT '记录修改时间',
+  `creator` varchar(60) DEFAULT NULL COMMENT '创建人',
+  `modifier` varchar(60) DEFAULT NULL COMMENT '修改人',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='转入转出记录(标记时间)';
+
+SET FOREIGN_KEY_CHECKS = 1;
+
+
+-- 索引脚本
+ALTER TABLE `med_home_page` ADD INDEX index_home_page_id ( `home_page_id` );
+ALTER TABLE `med_home_page` ADD INDEX index_hospital_id ( `hospital_id` );
+ALTER TABLE `med_home_page` ADD INDEX index_behospital_code ( `behospital_code` );
+ALTER TABLE `med_home_operation_info` ADD INDEX index_home_page_id ( `home_page_id` );

+ 2 - 0
doc/027.20201130_5.4.1云平台/qc_initv20201130_5.4.1.sql

@@ -0,0 +1,2 @@
+use `qc`;
+ALTER TABLE `qc_type` ADD   `parent_type_id` VARCHAR(4) DEFAULT NULL COMMENT '父类质控id' AFTER `default_module`;

+ 25 - 0
doc/028.20201210v1.4.9/qc_initv1.4.9.sql

@@ -0,0 +1,25 @@
+use `qc`;
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+DROP TABLE IF EXISTS `med_nurse`;
+CREATE TABLE `med_nurse` (
+  `rep_no` varchar(255) NOT NULL COMMENT '单号',
+  `hospital_id` int(11) NOT NULL COMMENT '医院ID',
+  `behospital_code` varchar(255) DEFAULT NULL COMMENT '住院病人ID',
+  `measure_time` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '测量时间',
+  `item_name` varchar(255) DEFAULT NULL COMMENT '生命体征名称',
+  `item_value` varchar(255) DEFAULT NULL COMMENT '生命体征数值',
+  `item_unit` varchar(255) DEFAULT NULL COMMENT '生命体征单位',
+  `item_type` varchar(255) DEFAULT NULL COMMENT '生命体征类型',
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  KEY `behospital_code` (`behospital_code`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+SET FOREIGN_KEY_CHECKS = 1;
+
+INSERT INTO `qc_mode`( `name`, `order_no`, `parent_id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `remark`) VALUES ( '护理信息', 259, 37, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', NULL);

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 334 - 0
doc/029.20201224v2.0.0/qc_initv2.0.0.sql


+ 36 - 0
doc/030.20201224v2.0.1/qc_initv2.0.1.sql

@@ -0,0 +1,36 @@
+use `qc`;
+/**
+注意:
+1、中间表的新增或修改需要按照实际的唯一字段来进行操作
+例如:新增sys_role_menu中数据需要sys_menu中指定的id、menu_id,否则可能会失效!!!
+2、按照顺序执行
+ */
+ --全院
+INSERT INTO `sys_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `parent_id`, `code`, `show_status`, `maintain_status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '病历质控报表', '17', 'YH-ZKK-BLZK_XQ', '1', '1', '18', '用户-质控科-病历质控报表');
+--开放菜单
+INSERT INTO `sys_role_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '50', NULL);
+INSERT INTO `sys_role_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '50', NULL);
+
+--开添加权限
+INSERT INTO `sys_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '病历质控报表', '', '/console/qualityControl', 'ALL', '病历质控报表', NULL);
+INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '125', NULL);
+INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '125', NULL);
+
+--开放权限报表
+INSERT INTO `sys_menu_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '50', '125', NULL, '病历质控报表');
+
+--科室
+INSERT INTO `sys_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `parent_id`, `code`, `show_status`, `maintain_status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '病历质控报表', '18', 'YH-KSZR-BLZK_XQ', '1', '1', '13', '用户-科室主任-病历质控报表-详情');
+--开放菜单
+INSERT INTO .`sys_role_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '53', NULL);
+INSERT INTO .`sys_role_menu` (, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '53', NULL);
+
+--开添加权限
+INSERT INTO .`sys_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '病历质控报表', '', '/consoleByDept/qualityControlByDept', 'ALL', '病历质控报表(科室)', NULL);
+INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '126', NULL);
+INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '126', NULL);
+
+--开放权限报表
+INSERT INTO `sys_menu_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '53', '126', NULL, '病历质控报表-科室');
+
+

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 401 - 0
doc/031.20210326v2.0.2/qc_initv2.0.2.sql


+ 13 - 0
doc/033.20210608v2.0.4/qc_initv2.0.4.sql

@@ -0,0 +1,13 @@
+use `qc`;
+
+-- 字典表加入密码正则表达式  不同的医院需要修改id为对应的医院id
+SET @id ='4';
+INSERT INTO `sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '30', @id, '^(?=.*?[A-Z])(?=(.*[a-z]){1,})(?=(.*[\\d]){1,})(?=(.*[\\W]){1,})(?!.*\\s).{8,12}$', '2', '0', '正则表达式(至少8个字符,少于12个字符,大写字母+小写字母+数字+特殊字符)');
+
+UPDATE `sys_menu` SET `name`='31日再入院病历数' WHERE (`name`='31日再入院病人数');
+UPDATE `sys_menu` SET `name`='31日再入院病历数' WHERE (`name`='31日再入院病人数');
+UPDATE `sys_permission` SET  `name`='31日再入院病历数报表',`descritpion`='31日再入院病历数报表' WHERE (`permissionUrl`='/console/reHos31DaysPage');
+UPDATE `sys_permission` SET  `name`='31日再入院病历数报表',`descritpion`='31日再入院病历数报表(科室)' WHERE (`permissionUrl`='/consoleByDept/reHos31DaysPageByDept');
+
+
+

+ 12 - 0
doc/034.20210804_2.0.5/qc_initv2.0.5.sql

@@ -0,0 +1,12 @@
+use `qc`;
+INSERT INTO `sys_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `parent_id`, `code`, `show_status`, `maintain_status`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '数据编辑', '-1', 'YH-SJBJ', '1', '1', '11', '入院记录展示/编辑');
+SET @id =@@identity;
+INSERT INTO `sys_role_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1',@id, NULL);
+INSERT INTO `sys_role_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1',@id, NULL);
+
+INSERT INTO `sys_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '数据编辑', 'FUNC000151', '/qc/dataEdit/getDataEdit', 'ALL', '数据编辑获取入院记录json数据', NULL);
+SET @it =@@identity;
+INSERT INTO `sys_menu_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @id, @it, NULL, '数据编辑获取入院记录json数据');
+
+
+

+ 191 - 0
doc/035.20211108_2.1.0/qc_initv2.1.0.sql

@@ -0,0 +1,191 @@
+use `qc`;
+
+/**
+执行脚本前请先看注意事项:
+  
+ */
+
+/**
+med_qcresult_detail表新增评分结果主表id字段
+ */
+ALTER TABLE `med_qcresult_detail` ADD COLUMN qcresult_info_id BIGINT (20) DEFAULT NULL COMMENT '评分结果id' AFTER `behospital_code`;
+
+/**
+med_qcresult_cases表新增评分结果主表id字段
+ */
+ALTER TABLE `med_qcresult_cases` ADD COLUMN qcresult_info_id BIGINT (20) DEFAULT NULL COMMENT '评分结果id' AFTER `behospital_code`;
+
+
+/**
+新建 sys_region 病区表
+ */
+-- ----------------------------
+-- Table structure for sys_region
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_region`;
+CREATE TABLE `sys_region` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `hospital_id` bigint(20) NOT NULL COMMENT '组织机构ID',
+  `hospital_name` varchar(30) DEFAULT NULL COMMENT '医院名称',
+  `code` varchar(32) DEFAULT NULL COMMENT '病区代码',
+  `name` varchar(32) NOT NULL COMMENT '病区名称',
+  `spell` varchar(64) DEFAULT NULL COMMENT '首字母拼音',
+  `station` varchar(64) DEFAULT NULL COMMENT '区域类别',
+  `order_no` varchar(8) DEFAULT NULL COMMENT '排序',
+  `status` char(1) NOT NULL DEFAULT '1' COMMENT '状态 0:禁用,1:启用',
+  `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(32) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(32) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `remark` varchar(128) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='病区表';
+
+
+/**
+新建 sys_region_dept 病区与科室关联表
+ */
+-- ----------------------------
+-- Table structure for sys_region_dept
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_region_dept`;
+CREATE TABLE `sys_region_dept` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `hospital_id` bigint(20) NOT NULL COMMENT '组织机构ID',
+  `region_code` varchar(20) NOT NULL COMMENT '病区ID',
+  `dept_id` bigint(20) NOT NULL COMMENT '科室ID',
+  `order_no` varchar(8) DEFAULT NULL 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(32) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(32) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `remark` varchar(128) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='病区与科室关联表';
+
+
+
+/**
+新建 sys_medoup 医疗组表
+ */
+-- ----------------------------
+-- Table structure for sys_medoup
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_medoup`;
+CREATE TABLE `sys_medoup` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `code` varchar(32) NOT NULL COMMENT '医疗组代码',
+  `name` varchar(32) NOT NULL 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(32) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(32) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `remark` varchar(128) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='医疗组表';
+
+
+
+
+/**
+新建 sys_dept_medoup 科室与医疗组关联表
+ */
+-- ----------------------------
+-- Table structure for sys_dept_medoup
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_dept_medoup`;
+CREATE TABLE `sys_dept_medoup` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `dept_id` varchar(20) NOT NULL COMMENT '科室ID',
+  `medoup_code` varchar(32) NOT NULL COMMENT '医疗组Code',
+  `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(32) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(32) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `remark` varchar(128) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 COMMENT='科室与医疗组关联表';
+
+
+/**
+列设置,展示相关字段需要在列设置上恢复默认(初始化)然后勾选保存
+ */
+UPDATE `sys_user_pageset` SET  `order_no`='23', `remark`=NULL WHERE (`val`='behDeptName');
+UPDATE `sys_user_pageset` SET  `order_no`='25', `remark`=NULL WHERE (`val`='gradeTime');
+INSERT INTO `sys_user_pageset` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病区', 'wardName', '1', '22', NULL);
+INSERT INTO `sys_user_pageset` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '医疗组', 'medoupName', '1', '24', NULL);
+
+/**
+
+关闭病历稽查报表
+ */
+UPDATE `sys_menu` SET  `is_deleted`='Y'  WHERE (`code`='YH-ZKK-YXBLJCB');
+UPDATE `sys_menu` SET  `is_deleted`='Y'  WHERE (`code`='YH-ZKK-ZMBLJCB');
+UPDATE `sys_menu` SET  `is_deleted`='Y'  WHERE (`code`='YH-KSZR-ZMBLJCS_XQ');
+UPDATE `sys_menu` SET  `is_deleted`='Y'  WHERE (`code`='YH-KSZR-YXBLJCS_XQ');
+
+
+
+
+/**以下脚本执行建议备份下原表med_behospital_info
+doctorId回查
+ */
+ 
+ UPDATE med_behospital_info a,
+ (
+	SELECT
+		doctor_id,
+		name
+		NAME
+	FROM
+		bas_doctor_info b
+	WHERE
+		b.hospital_id = 14
+	AND b.is_deleted = 'N'
+) c
+SET a.doctor_name = c. NAME
+WHERE
+	a.doctor_id = c.doctor_id
+AND a.hospital_id = 14
+AND (a.doctor_name is null or a.doctor_name = '' or a.doctor_name ='-' or a.doctor_name ='—' or LENGTH(a.doctor_name)>64);
+
+UPDATE med_behospital_info a,
+ (
+	SELECT
+		doctor_id,
+		NAME
+	FROM
+		bas_doctor_info b
+	WHERE
+		b.hospital_id = 14
+	AND b.is_deleted = 'N'
+) c
+SET a.doctor_id = c.doctor_id
+WHERE
+	a.doctor_name = c. NAME
+AND a.hospital_id = 14
+AND (a.doctor_id is null or a.doctor_id = '' or a.doctor_id ='-' or a.doctor_id ='—' or LENGTH(a.doctor_id)>64);
+
+
+/**
+空字段统一处理
+ */
+UPDATE med_behospital_info a set a.doctor_id = '-' where a.hospital_id =14  and (a.doctor_id is null or a.doctor_id = ''  or a.doctor_id = '—' or LENGTH(a.doctor_id)>64);
+
+UPDATE med_behospital_info a set a.doctor_name = '-' where a.hospital_id =14  and (a.doctor_name is null or a.doctor_name = '' or a.doctor_name = '—' or LENGTH(a.doctor_name)>64);
+
+UPDATE med_behospital_info a set a.bed_code = '-' where a.hospital_id =14  and (a.bed_code is null or a.bed_code = '' or a.bed_code = '—' or LENGTH(a.bed_code)>64);
+
+UPDATE med_behospital_info a set a.bed_name = '-' where a.hospital_id =14  and (a.bed_name is null or a.bed_name = '' or a.bed_name = '—' or LENGTH(a.bed_name)>64);
+
+/**
+七院生成核查任务,vip开房病区科室id配置
+ */
+INSERT INTO `sys_hospital_set` (`hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('14', '病历核查(杭州七院,科室医生特殊病历)', 'check_order_info', '2015,2019', '科室核查任务除了本科室还要VIP、开放病区医生病历')
+
+
+

+ 24 - 0
doc/036.20211122_2.1.3/qc_initv2.1.3.sql

@@ -0,0 +1,24 @@
+use `qc`;
+
+/**
+执行脚本前请先看注意事项:
+  
+ */
+/**
+sys_user表新增locked字段
+ */
+ALTER TABLE `sys_user` ADD COLUMN `locked` char(1) NOT NULL DEFAULT '1' COMMENT '锁定状态0禁用;1启用' AFTER `type`;
+
+/**
+sys_dictionary_info表新增token、用户锁定、解锁时间配置
+ */
+INSERT INTO `sys_dictionary_info` (`group_type`, `name`, `val`, `return_type`, `remark`) VALUES ('31', 'accessToken', '86400', '2', 'accessToken有效期(单位秒)');
+INSERT INTO `sys_dictionary_info` (`group_type`, `name`, `val`, `return_type`, `remark`) VALUES ('31', 'refreshToken', '604800', '2', 'refreshToken有效期(单位秒)');
+INSERT INTO `sys_dictionary_info` (`group_type`, `name`, `val`, `return_type`, `remark`) VALUES ('31', 'unlockTime', '600', '2', '自动解锁时间');
+INSERT INTO `sys_dictionary_info` (`group_type`, `name`, `val`, `return_type`, `remark`) VALUES ('31', 'lockTime', '60', '2', '锁定时间');
+INSERT INTO `sys_dictionary_info` (`group_type`, `name`, `val`, `return_type`, `remark`) VALUES ('31', 'lockNum', '5', '2', '连续密码输入错误次数');
+
+/**
+sys_hospital_set表新增是否开启用户锁定配置
+ */
+INSERT INTO `sys_hospital_set` (`hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('14', '密码错误锁定机制', 'lock_user', 'true', '密码错误锁定机制');

+ 319 - 0
pom.xml

@@ -0,0 +1,319 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.diagbot</groupId>
+    <artifactId>ihqc-sys</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <packaging>jar</packaging>
+
+    <name>ihqc-sys</name>
+    <description>病案质控系统</description>
+
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.2.1.RELEASE</version>
+        <relativePath/>
+    </parent>
+
+    <properties>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <maven.compiler.target>1.8</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <java.version>1.8</java.version>
+        <spring-cloud.version>Hoxton.RELEASE</spring-cloud.version>
+        <mybatis-plus-boot-starter.version>3.2.0</mybatis-plus-boot-starter.version>
+        <mybatis-spring-boot.version>2.1.1</mybatis-spring-boot.version>
+        <druid.version>1.1.21</druid.version>
+        <swagger.version>2.9.2</swagger.version>
+        <!--<swagger-bootstrap.version>1.9.1</swagger-bootstrap.version>-->
+        <logstash.version>5.2</logstash.version>
+        <poi.version>4.1.1</poi.version>
+        <aggregator.version>1.1.0</aggregator.version>
+        <okhttp.version>4.2.2</okhttp.version>
+        <easypoi.version>4.2.0</easypoi.version>
+        <patchca.version>1.1.2</patchca.version>
+        <hutool.version>5.0.7</hutool.version>
+        <docker-maven-plugin.version>1.2.1</docker-maven-plugin.version>
+        <docker.image.prefix>192.168.2.122:5000/diagbotcloud</docker.image.prefix>
+        <registryUrl>http://192.168.2.122:5000/repository/diagbotcloud/</registryUrl>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.springframework.cloud</groupId>
+                <artifactId>spring-cloud-dependencies</artifactId>
+                <version>${spring-cloud.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.diagbot</groupId>
+            <artifactId>common</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jolokia</groupId>
+            <artifactId>jolokia-core</artifactId>
+        </dependency>
+
+        <!-- 开启web-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-starter-tomcat</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-undertow</artifactId>
+        </dependency>
+
+        <!-- 开启feign-->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>
+
+        <!-- dashboard -->
+        <!-- actuator-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+        <!--hystrix-dashboard-->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
+        </dependency>
+        <!--hystrix -->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.bladejava</groupId>
+            <artifactId>blade-patchca</artifactId>
+            <version>${patchca.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>${hutool.version}</version>
+        </dependency>
+
+        <!--swagger-->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+            <version>${swagger.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+            <version>${swagger.version}</version>
+        </dependency>
+        <!--database-->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <!--security-->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-oauth2</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+        </dependency>
+
+        <dependency>
+            <groupId>net.logstash.logback</groupId>
+            <artifactId>logstash-logback-encoder</artifactId>
+            <version>${logstash.version}</version>
+        </dependency>
+
+
+        <!-- mybatis-plus begin -->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+            <version>${mybatis-plus-boot-starter.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-generator</artifactId>
+            <version>${mybatis-plus-boot-starter.version}</version>
+        </dependency>
+        <!-- mybatis-plus end -->
+
+        <!-- 阿里巴巴druid数据库连接池 -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid-spring-boot-starter</artifactId>
+            <version>${druid.version}</version>
+        </dependency>
+
+        <!-- springboot整合mybatis(核心就这一个) -->
+        <!-- 注意顺序,这个一定要放在最下面 -->
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+            <version>${mybatis-spring-boot.version}</version>
+        </dependency>
+
+        <!--redis设置-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-pool2</artifactId>
+        </dependency>
+       
+       <dependency>
+	      <groupId>com.oracle</groupId>
+	      <artifactId>ojdbc6</artifactId>
+	      <version>11.2.0.3</version>
+	    </dependency>
+    
+    	<dependency>
+			<groupId>com.microsoft.sqlserver</groupId>
+			<artifactId>mssql-jdbc</artifactId>
+			<version>6.2.0.jre8</version>
+			<scope>runtime</scope>
+		</dependency>
+
+        <dependency>
+            <groupId>io.github.lvyahui8</groupId>
+            <artifactId>spring-boot-data-aggregator-starter</artifactId>
+            <version>${aggregator.version}</version>
+        </dependency>
+
+        <!-- easypoi -->
+        <dependency>
+            <groupId>cn.afterturn</groupId>
+            <artifactId>easypoi-spring-boot-starter</artifactId>
+            <version>${easypoi.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.oracle</groupId>
+            <artifactId>ojdbc6</artifactId>
+            <version>11.2.0.3</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.microsoft.sqlserver</groupId>
+            <artifactId>mssql-jdbc</artifactId>
+            <version>6.2.0.jre8</version>
+            <scope>runtime</scope>
+        </dependency>
+
+    </dependencies>
+
+    <!-- 私有仓库 -->
+    <repositories>
+        <repository>
+            <id>nexus-releases</id>
+            <name>Nexus Release Repository</name>
+            <url>http://223.93.170.82:23681/repository/maven-releases/</url>
+        </repository>
+        <repository>
+            <id>nexus-snapshots</id>
+            <name>Nexus Snapshot Repository</name>
+            <url>http://223.93.170.82:23681/repository/maven-snapshots/</url>
+        </repository>
+    </repositories>
+    <!-- 私有仓库 -->
+    <pluginRepositories>
+        <pluginRepository>
+            <id>nexus-releases</id>
+            <name>Nexus Release Repository</name>
+            <url>http://223.93.170.82:23681/repository/maven-releases/</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+        </pluginRepository>
+        <pluginRepository>
+            <id>nexus-snapshots</id>
+            <name>Nexus Snapshot Repository</name>
+            <url>http://223.93.170.82:23681/repository/maven-snapshots/</url>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+        </pluginRepository>
+    </pluginRepositories>
+
+    <distributionManagement>
+        <repository>
+            <id>nexus-releases</id>
+            <name>Nexus Release Repository</name>
+            <url>http://223.93.170.82:23681/repository/maven-releases/</url>
+        </repository>
+        <snapshotRepository>
+            <id>nexus-snapshots</id>
+            <name>Nexus Snapshot Repository</name>
+            <url>http://223.93.170.82:23681/repository/maven-snapshots/</url>
+        </snapshotRepository>
+    </distributionManagement>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+            <!-- 添加docker-maven插件 -->
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>docker-maven-plugin</artifactId>
+                <version>1.1.1</version>
+                <configuration>
+                    <imageName>${docker.image.prefix}/${project.artifactId}:${project.version}</imageName>
+                    <forceTags>true</forceTags>
+                    <!--镜像的FROM,使用压缩的小镜像-->
+                    <baseImage>frolvlad/alpine-oraclejre8:slim</baseImage>
+                    <entryPoint>["java", "-jar", "-Xms256m", "-Xmx1024m", "-Duser.timezone=GMT+8", "/${project.build.finalName}.jar"]</entryPoint>
+                    <resources>
+                        <resource>
+                            <targetPath>/</targetPath>
+                            <directory>${project.build.directory}</directory>
+                            <include>${project.build.finalName}.jar</include>
+                        </resource>
+                    </resources>
+                    <serverId>docker-registry</serverId>
+                    <registryUrl>${registryUrl}</registryUrl>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 33 - 0
src/main/java/com/diagbot/IhqcSysApplication.java

@@ -0,0 +1,33 @@
+package com.diagbot;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
+import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
+import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration;
+import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
+import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
+import org.springframework.cloud.netflix.hystrix.EnableHystrix;
+import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+
+
+/** 
+ * @Description: 病案质控系统启动文件
+ * @author: dsYun
+ * @time: 2024/8/9 9:26
+ */
+@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class,
+        JmxAutoConfiguration.class, ThymeleafAutoConfiguration.class })
+@EnableFeignClients({ "com.diagbot.client" })
+@EnableHystrixDashboard
+@EnableHystrix
+@EnableCircuitBreaker
+@ConfigurationPropertiesScan
+public class IhqcSysApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(IhqcSysApplication.class, args);
+    }
+}

+ 318 - 0
src/main/java/com/diagbot/aggregate/AverageStatisticsAggregate.java

@@ -0,0 +1,318 @@
+package com.diagbot.aggregate;
+
+import com.diagbot.dto.AverageStatisticsDTO;
+import com.diagbot.facade.FilterFacade;
+import com.diagbot.facade.HomePageFacade;
+import com.diagbot.facade.QcresultInfoFacade;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.vo.FilterVO;
+import com.google.common.collect.Lists;
+import io.github.lvyahui8.spring.annotation.DataConsumer;
+import io.github.lvyahui8.spring.annotation.DataProvider;
+import io.github.lvyahui8.spring.annotation.InvokeParameter;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:平均值相关统计
+ * @Author:zhaops
+ * @time: 2024/4/23 14:11
+ */
+@Component
+public class AverageStatisticsAggregate {
+    @Autowired
+    private HomePageFacade homePageFacade;
+    @Autowired
+    private QcresultInfoFacade qcresultInfoFacade;
+    @Autowired
+    private FilterFacade filterFacade;
+
+    @DataProvider("setAllAverage")
+    public Map<String, Object> setAllResult(
+            @InvokeParameter("filterVO") FilterVO filterVO,
+            @DataConsumer("getAverageDayNum") List<AverageStatisticsDTO> averageDayNumList,
+            @DataConsumer("getAverageFee") List<AverageStatisticsDTO> averageFeeList,
+            @DataConsumer("getAverageScore") List<AverageStatisticsDTO> averageScoreList) {
+        Map<String, Object> retMap = new LinkedHashMap<>();
+        retMap.put("平均住院日", Lists.newLinkedList());
+        retMap.put("平均住院费用", Lists.newLinkedList());
+        retMap.put("各科室质控平均分", Lists.newLinkedList());
+        if (ListUtil.isNotEmpty(averageDayNumList)) {
+            retMap.put("平均住院日", averageDayNumList);
+        }
+        if (ListUtil.isNotEmpty(averageFeeList)) {
+            retMap.put("平均住院费用", averageFeeList);
+        }
+        if (ListUtil.isNotEmpty(averageScoreList)) {
+            retMap.put("各科室质控平均分", averageScoreList);
+        }
+        return retMap;
+    }
+
+    /**
+     * 平均住院天数
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("getAverageDayNum")
+    public List<AverageStatisticsDTO> getAverageDayNum(@InvokeParameter("filterVO") FilterVO filterVO) {
+        Integer limitCount = filterVO.getLimitCount();
+        List<AverageStatisticsDTO> retAverageDayNumList = Lists.newLinkedList();
+        //本月、本年
+        List<AverageStatisticsDTO> averageDayNumList = homePageFacade.getAverageDayNum(filterVO);
+        Map<String, Double> averageMap
+                = EntityUtil.makeMapWithKeyValue(averageDayNumList, "name", "averageValue");
+
+        //上月、去年
+        String startDate = filterFacade.getLastStartDateStr(filterVO.getType());
+        String endDate = filterFacade.getLastEndDateStr(filterVO.getType());
+        filterVO.setStartDate(startDate);
+        filterVO.setEndDate(endDate);
+        List<AverageStatisticsDTO> lastAverageDayNumList = homePageFacade.getAverageDayNum(filterVO);
+        Map<String, Double> lastMap
+                = EntityUtil.makeMapWithKeyValue(lastAverageDayNumList, "name", "averageValue");
+
+        //去年本月
+        if (filterVO.getType().equals(1)) {
+            Date date = new Date();
+            String year = DateUtil.getYear(date);
+            startDate = filterFacade.getStartDateStr(filterVO.getType(), Integer.valueOf(year) - 1);
+            endDate = filterFacade.getEndDateStr(filterVO.getType(), Integer.valueOf(year) - 1);
+            filterVO.setStartDate(startDate);
+            filterVO.setEndDate(endDate);
+        }
+        //按年统计,同比环比相同
+        List<AverageStatisticsDTO> lastYearAverageDayNumList = homePageFacade.getAverageDayNum(filterVO);
+        Map<String, Double> lastYearMap
+                = EntityUtil.makeMapWithKeyValue(lastYearAverageDayNumList, "name", "averageValue");
+
+        //获取所有出现的科室
+        List<String> nameList = Lists.newLinkedList();
+        nameList.addAll(averageMap.keySet());
+        nameList.addAll(lastMap.keySet());
+        nameList.addAll(lastYearMap.keySet());
+        nameList = nameList
+                .stream()
+                .distinct()
+                .collect(Collectors.toList());
+
+        for (String name : nameList) {
+            AverageStatisticsDTO item = new AverageStatisticsDTO();
+            item.setName(name);
+            if (averageMap.containsKey(name)) {
+                item.setAverageValue(averageMap.get(name));
+            }
+            if (lastMap.containsKey(name)) {
+                item.setLastAverageValue(lastMap.get(name));
+            }
+            if (lastYearMap.containsKey(name)) {
+                item.setLastYearAverageValue(lastYearMap.get(name));
+            }
+            retAverageDayNumList.add(item);
+        }
+
+        //排序
+        Collections.sort(retAverageDayNumList, new Comparator<AverageStatisticsDTO>() {
+            @Override
+            public int compare(AverageStatisticsDTO o1, AverageStatisticsDTO o2) {
+                Double value1 = o1.getAverageValue();
+                Double lastValue1 = o1.getLastAverageValue();
+                Double lastYearValue1 = o1.getLastYearAverageValue();
+                Double value2 = o2.getAverageValue();
+                Double lastValue2 = o2.getLastAverageValue();
+                Double lastYearValue2 = o2.getLastYearAverageValue();
+                Integer count1 = 0;
+                count1 += Double.compare(value1, 0) == 0 ? 0 : 1;
+                count1 += Double.compare(lastValue1, 0) == 0 ? 0 : 1;
+                count1 += Double.compare(lastYearValue1, 0) == 0 ? 0 : 1;
+                Integer count2 = 0;
+                count2 += Double.compare(value2, 0) == 0 ? 0 : 1;
+                count2 += Double.compare(lastValue2, 0) == 0 ? 0 : 1;
+                count2 += Double.compare(lastYearValue2, 0) == 0 ? 0 : 1;
+                return (count1 > count2) ? -1 : ((count1 < count2) ? 1 : 0);
+            }
+        });
+
+        if (retAverageDayNumList.size() > limitCount) {
+            retAverageDayNumList = retAverageDayNumList.subList(0, limitCount);
+        }
+        return retAverageDayNumList;
+    }
+
+    /**
+     * 平均住院费用
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("getAverageFee")
+    public List<AverageStatisticsDTO> getAverageFee(@InvokeParameter("filterVO") FilterVO filterVO) {
+        Integer limitCount = filterVO.getLimitCount();
+        List<AverageStatisticsDTO> retAverageFeeList = Lists.newLinkedList();
+        //本月、本年
+        List<AverageStatisticsDTO> averageFeeList = homePageFacade.getAverageFee(filterVO);
+        Map<String, Double> averageMap
+                = EntityUtil.makeMapWithKeyValue(averageFeeList, "name", "averageValue");
+
+        //上月、去年
+        String startDate = filterFacade.getLastStartDateStr(filterVO.getType());
+        String endDate = filterFacade.getLastEndDateStr(filterVO.getType());
+        filterVO.setStartDate(startDate);
+        filterVO.setEndDate(endDate);
+        List<AverageStatisticsDTO> lastAverageFeeList = homePageFacade.getAverageFee(filterVO);
+        Map<String, Double> lastMap
+                = EntityUtil.makeMapWithKeyValue(lastAverageFeeList, "name", "averageValue");
+
+        //去年本月
+        if (filterVO.getType().equals(1)) {
+            Date date = new Date();
+            String year = DateUtil.getYear(date);
+            startDate = filterFacade.getStartDateStr(filterVO.getType(), Integer.valueOf(year) - 1);
+            endDate = filterFacade.getEndDateStr(filterVO.getType(), Integer.valueOf(year) - 1);
+            filterVO.setStartDate(startDate);
+            filterVO.setEndDate(endDate);
+        }
+        //按年统计,同比环比相同
+        List<AverageStatisticsDTO> lastYearAverageFeeList = homePageFacade.getAverageFee(filterVO);
+        Map<String, Double> lastYearMap
+                = EntityUtil.makeMapWithKeyValue(lastYearAverageFeeList, "name", "averageValue");
+
+        //获取所有出现的科室
+        List<String> nameList = Lists.newLinkedList();
+        nameList.addAll(averageMap.keySet());
+        nameList.addAll(lastMap.keySet());
+        nameList.addAll(lastYearMap.keySet());
+        nameList = nameList
+                .stream()
+                .distinct()
+                .collect(Collectors.toList());
+
+        for (String name : nameList) {
+            AverageStatisticsDTO item = new AverageStatisticsDTO();
+            item.setName(name);
+            if (averageMap.containsKey(name)) {
+                item.setAverageValue(averageMap.get(name));
+            }
+            if (lastMap.containsKey(name)) {
+                item.setLastAverageValue(lastMap.get(name));
+            }
+            if (lastYearMap.containsKey(name)) {
+                item.setLastYearAverageValue(lastYearMap.get(name));
+            }
+            retAverageFeeList.add(item);
+        }
+
+        //排序
+        Collections.sort(retAverageFeeList, new Comparator<AverageStatisticsDTO>() {
+            @Override
+            public int compare(AverageStatisticsDTO o1, AverageStatisticsDTO o2) {
+                Double value1 = o1.getAverageValue();
+                Double lastValue1 = o1.getLastAverageValue();
+                Double lastYearValue1 = o1.getLastYearAverageValue();
+                Double value2 = o2.getAverageValue();
+                Double lastValue2 = o2.getLastAverageValue();
+                Double lastYearValue2 = o2.getLastYearAverageValue();
+                Integer count1 = 0;
+                count1 += Double.compare(value1, 0) == 0 ? 0 : 1;
+                count1 += Double.compare(lastValue1, 0) == 0 ? 0 : 1;
+                count1 += Double.compare(lastYearValue1, 0) == 0 ? 0 : 1;
+                Integer count2 = 0;
+                count2 += Double.compare(value2, 0) == 0 ? 0 : 1;
+                count2 += Double.compare(lastValue2, 0) == 0 ? 0 : 1;
+                count2 += Double.compare(lastYearValue2, 0) == 0 ? 0 : 1;
+                return (count1 > count2) ? -1 : ((count1 < count2) ? 1 : 0);
+            }
+        });
+
+        if (retAverageFeeList.size() > limitCount) {
+            retAverageFeeList = retAverageFeeList.subList(0, limitCount);
+        }
+        return retAverageFeeList;
+    }
+
+    /**
+     * 质控平均分按科室统计
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("getAverageScore")
+    public List<AverageStatisticsDTO> getAverageScore(@InvokeParameter("filterVO") FilterVO filterVO) {
+        List<AverageStatisticsDTO> retAverageScoreList = Lists.newLinkedList();
+        List<AverageStatisticsDTO> averageScoreList = qcresultInfoFacade.getAverageScore(filterVO);
+        Integer limitCount = filterVO.getLimitCount();
+        //质控平均分
+        if (ListUtil.isNotEmpty(averageScoreList)) {
+            retAverageScoreList = getLimitAverageList(averageScoreList, limitCount);
+        }
+        return retAverageScoreList;
+    }
+
+    /**
+     * 根据限制数量重组统计结果
+     *
+     * @param averageList
+     * @param limitCount
+     * @return
+     */
+    public List<AverageStatisticsDTO> getLimitAverageList(List<AverageStatisticsDTO> averageList, Integer limitCount) {
+        List<AverageStatisticsDTO> retAverageList = Lists.newLinkedList();
+        if (averageList.size() <= limitCount) {
+            retAverageList = BeanUtil.listCopyTo(averageList, AverageStatisticsDTO.class);
+        } else {
+            retAverageList = averageList.subList(0, limitCount - 2);
+            List<AverageStatisticsDTO> otherList = averageList.subList(limitCount - 2, averageList.size());
+            Double totleValue = otherList
+                    .stream()
+                    .map(i -> BigDecimal.valueOf(i.getTotleValue()))
+                    .reduce(BigDecimal.ZERO, BigDecimal::add).doubleValue();
+            Double sameTotleValue = otherList
+                    .stream()
+                    .map(i -> BigDecimal.valueOf(i.getSameTotleValue()))
+                    .reduce(BigDecimal.ZERO, BigDecimal::add).doubleValue();
+            Integer num = otherList
+                    .stream()
+                    .map(AverageStatisticsDTO::getNum)
+                    .reduce(0, Integer::sum);
+            Integer sameNum = otherList
+                    .stream()
+                    .map(AverageStatisticsDTO::getSameNum)
+                    .reduce(0, Integer::sum);
+            Double averageValue = BigDecimal.valueOf(totleValue)
+                    .divide(BigDecimal.valueOf(num), 2, RoundingMode.HALF_UP)
+                    .doubleValue();
+            Double lastYearAverageValue = 0d;
+            if(0 != sameNum){
+                 lastYearAverageValue = BigDecimal.valueOf(sameTotleValue)
+                        .divide(BigDecimal.valueOf(sameNum), 2, RoundingMode.HALF_UP)
+                        .doubleValue();
+            }
+
+
+            AverageStatisticsDTO retAverageStatistics = new AverageStatisticsDTO();
+            retAverageStatistics.setName("其他");
+            retAverageStatistics.setNum(num);
+            retAverageStatistics.setSameNum(sameNum);
+            retAverageStatistics.setSameTotleValue(sameTotleValue);
+            retAverageStatistics.setLastYearAverageValue(lastYearAverageValue);
+            retAverageStatistics.setAverageValue(averageValue);
+            retAverageStatistics.setTotleValue(totleValue);
+            retAverageList.add(retAverageStatistics);
+        }
+        return retAverageList;
+    }
+}

+ 116 - 0
src/main/java/com/diagbot/aggregate/HomePageStatisticsAggregate.java

@@ -0,0 +1,116 @@
+package com.diagbot.aggregate;
+
+import com.diagbot.dto.HomePageImproveDTO;
+import com.diagbot.dto.HomePageNumDTO;
+import com.diagbot.dto.NumDTO;
+import com.diagbot.facade.BehospitalInfoFacade;
+import com.diagbot.vo.FilterVO;
+import io.github.lvyahui8.spring.annotation.DataConsumer;
+import io.github.lvyahui8.spring.annotation.DataProvider;
+import io.github.lvyahui8.spring.annotation.InvokeParameter;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2024/7/22 11:45
+ */
+@Component
+public class HomePageStatisticsAggregate {
+    @Autowired
+    private BehospitalInfoFacade behospitalInfoFacade;
+
+    @DataProvider("setAllHomePage")
+    public Map<String, Object> setAllHomePage(
+            @InvokeParameter("filterVO") FilterVO filterVO,
+            @DataConsumer("getQcNumDTO") HomePageNumDTO qcNumDTO,
+            @DataConsumer("getEmptyNumDTO") HomePageNumDTO emptyNumDTO,
+            @DataConsumer("getImproveDTO") HomePageImproveDTO improveDTO) {
+        Map<String, Object> retMap = new LinkedHashMap<>();
+        retMap.put("合格率", null);
+        retMap.put("不合格率", null);
+        retMap.put("完整率", null);
+        retMap.put("改善率", null);
+
+        if (qcNumDTO != null) {
+            //合格率
+            NumDTO pass = new NumDTO();
+            pass.setName("合格率");
+            pass.setNum(qcNumDTO.getFirstLevelNum());
+            pass.setTotleNum(qcNumDTO.getMrNum());
+            pass.setPercent(qcNumDTO.getFirstLevelPercent());
+            pass.setPercentStr(qcNumDTO.getFirstLevelPercentStr());
+            //不合格率
+            NumDTO unPass = new NumDTO();
+            unPass.setName("不合格率");
+            unPass.setNum(qcNumDTO.getSecondLevelNum());
+            unPass.setTotleNum(qcNumDTO.getMrNum());
+            unPass.setPercent(qcNumDTO.getSecondLevelPercent());
+            unPass.setPercentStr(qcNumDTO.getSecondLevelPercentStr());
+
+            retMap.put("合格率", pass);
+            retMap.put("不合格率", unPass);
+        }
+        if (emptyNumDTO != null) {
+            //完整率
+            NumDTO full = new NumDTO();
+            full.setName("完整率");
+            full.setNum(emptyNumDTO.getEntryTotleNum() - emptyNumDTO.getEmptyNum());
+            full.setTotleNum(emptyNumDTO.getEntryTotleNum());
+            full.setPercent(emptyNumDTO.getEmptyPercent());
+            full.setPercentStr(emptyNumDTO.getEmptyPercentStr());
+
+            retMap.put("完整率", full);
+        }
+
+        if (improveDTO != null) {
+            //改善率
+            NumDTO improve = new NumDTO();
+            improve.setName("改善率");
+            improve.setNum(improveDTO.getImproveNum());
+            improve.setTotleNum(improveDTO.getHomePageMRNum());
+            improve.setPercent(improveDTO.getImprovePercent());
+            improve.setPercentStr(improveDTO.getImprovePercentStr());
+
+            retMap.put("改善率", improve);
+        }
+        return retMap;
+    }
+
+    /**
+     * 合格率
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("getQcNumDTO")
+    public HomePageNumDTO getQcNumDTO(@InvokeParameter("filterVO") FilterVO filterVO) {
+        return behospitalInfoFacade.homePageQcPercent(filterVO);
+    }
+
+    /**
+     * 完整率
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("getEmptyNumDTO")
+    public HomePageNumDTO getEmptyNumDTO(@InvokeParameter("filterVO") FilterVO filterVO) {
+        return behospitalInfoFacade.hmEmptyEntryPercent(filterVO);
+    }
+
+    /**
+     * 改善率
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("getImproveDTO")
+    public HomePageImproveDTO getImproveDTO(@InvokeParameter("filterVO") FilterVO filterVO) {
+        return behospitalInfoFacade.homePageImproveCount(filterVO);
+    }
+}

+ 141 - 0
src/main/java/com/diagbot/aggregate/LeaveHosStatisticsAggregate.java

@@ -0,0 +1,141 @@
+package com.diagbot.aggregate;
+
+import com.diagbot.dto.ReBeHosDTO;
+import com.diagbot.facade.BehospitalInfoFacade;
+import com.diagbot.facade.ConsoleFacade;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.vo.FilterVO;
+import com.diagbot.vo.ReBeHosPageVO;
+import io.github.lvyahui8.spring.annotation.DataConsumer;
+import io.github.lvyahui8.spring.annotation.DataProvider;
+import io.github.lvyahui8.spring.annotation.InvokeParameter;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2024/7/15 16:03
+ */
+@Component
+public class LeaveHosStatisticsAggregate {
+    @Autowired
+    private BehospitalInfoFacade behospitalInfoFacade;
+    @Autowired
+    private ConsoleFacade consoleFacade;
+
+    @DataProvider("setAllLeaveHos")
+    public Map<String, Object> setAllLeaveHos(
+            @InvokeParameter("filterVO") FilterVO filterVO,
+            @DataConsumer("getTotleCount") Integer totleNum,
+            @DataConsumer("getDeathCount") Integer deathNum,
+            @DataConsumer("getNewBornCount") Integer newBornNum,
+            @DataConsumer("getOperationCount") Integer operationNum,
+            @DataConsumer("getNonAdviceCount") Integer nonAdviceNum,
+            @DataConsumer("get31DaysBehospitalCount") Integer reBehospitalNum) {
+
+        Map<String, Object> retMap = new LinkedHashMap<>();
+        retMap.put("总人数", totleNum);
+        retMap.put("死亡人数", deathNum);
+        retMap.put("新生儿人数", newBornNum);
+        retMap.put("手术病人数", operationNum);
+        retMap.put("非医嘱离院病人数", nonAdviceNum);
+        retMap.put("31日再入院病历数", reBehospitalNum);
+        return retMap;
+
+    }
+
+    /**
+     * 总人数
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("getTotleCount")
+    public Integer getTotleCount(@InvokeParameter("filterVO") FilterVO filterVO) {
+        return behospitalInfoFacade.leaveHosCount(filterVO);
+    }
+
+    /**
+     * 死亡人数
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("getDeathCount")
+    public Integer getDeathCount(@InvokeParameter("filterVO") FilterVO filterVO) {
+        return behospitalInfoFacade.deathCount(filterVO);
+    }
+
+    /**
+     * 新生儿患者人数
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("getNewBornCount")
+    public Integer getNewBornCount(@InvokeParameter("filterVO") FilterVO filterVO) {
+        return behospitalInfoFacade.newBornCount(filterVO);
+    }
+
+    /**
+     * 手术人数
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("getOperationCount")
+    public Integer getOperationCount(@InvokeParameter("filterVO") FilterVO filterVO) {
+        return behospitalInfoFacade.operationCount(filterVO);
+    }
+
+    /**
+     * 非医嘱离院
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("getNonAdviceCount")
+    public Integer getNonAdviceCount(@InvokeParameter("filterVO") FilterVO filterVO) {
+        return behospitalInfoFacade.nonAdviceCount(filterVO);
+    }
+
+    /**
+     * 31天重复入院
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("get31DaysBehospitalCount")
+    public Integer get31DaysBehospitalCount(@InvokeParameter("filterVO") FilterVO filterVO) {
+        ReBeHosPageVO reBeHosPageVO = new ReBeHosPageVO();
+        BeanUtil.copyProperties(filterVO,reBeHosPageVO);
+        reBeHosPageVO.setStartDate(timeTrans(filterVO.getStartDate()));
+        reBeHosPageVO.setEndDate(timeTrans(filterVO.getEndDate()));
+        reBeHosPageVO.setFlag(31);
+        List<ReBeHosDTO> records = consoleFacade.reHos31DaysPage(reBeHosPageVO).getRecords();
+        Set<String> codeList = new HashSet<>();
+        records.forEach(obj->{
+            obj.getDetails().forEach(opj->{
+                codeList.add(opj.getBehospitalCode());
+            });
+        });
+        return codeList.size();
+    }
+
+    public static Date timeTrans(String time){
+        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        try {
+            Date date = format.parse(time);
+            return date;
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return new Date();
+
+    }
+}

+ 170 - 0
src/main/java/com/diagbot/aggregate/MrStatisticsAggregate.java

@@ -0,0 +1,170 @@
+package com.diagbot.aggregate;
+
+import com.diagbot.dto.NumDTO;
+import com.diagbot.dto.QcResultPercentDTO;
+import com.diagbot.facade.BehospitalInfoFacade;
+import com.diagbot.facade.QcresultInfoFacade;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.vo.FilterVO;
+import com.diagbot.vo.QcresultFilterVO;
+import com.google.common.collect.Lists;
+import io.github.lvyahui8.spring.annotation.DataConsumer;
+import io.github.lvyahui8.spring.annotation.DataProvider;
+import io.github.lvyahui8.spring.annotation.InvokeParameter;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.text.DecimalFormat;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:病历相关统计
+ * @Author:zhaops
+ * @time: 2024/5/6 17:21
+ */
+@Component
+public class MrStatisticsAggregate {
+
+    @Autowired
+    private BehospitalInfoFacade behospitalInfoFacade;
+    @Autowired
+    private QcresultInfoFacade qcresultInfoFacade;
+
+    @DataProvider("setAllMr")
+    public Map<String, Object> setAllDept(
+            @InvokeParameter("filterVO") FilterVO filterVO,
+            @DataConsumer("getLevelResultDept") List<QcResultPercentDTO> levelResults,
+            @DataConsumer("leaveHosCount") Map<String, Object> leaveHosMap,
+            @DataConsumer("mrCount") List<NumDTO> mrCountList) {
+        Map<String, Object> retMap = new LinkedHashMap<>();
+        retMap.put("各科室甲级病历占比", Lists.newLinkedList());
+        retMap.put("病历数统计", Lists.newLinkedList());
+        retMap.put("出院人数统计", new LinkedHashMap<>());
+        if (ListUtil.isNotEmpty(levelResults)) {
+            retMap.put("各科室甲级病历占比", levelResults);
+        }
+        if (leaveHosMap != null) {
+            retMap.put("出院人数统计", leaveHosMap);
+        }
+        if (ListUtil.isNotEmpty(mrCountList)) {
+            retMap.put("病历数统计", mrCountList);
+        }
+        return retMap;
+    }
+
+    /**
+     * 各科室甲级病历占比
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("getLevelResultDept")
+    public List<QcResultPercentDTO> getLevelResultDept(@InvokeParameter("filterVO") FilterVO filterVO) {
+        List<QcResultPercentDTO> qcResultPercentList = qcresultInfoFacade.levelPercentGroupByDept(filterVO);
+        Integer limitCount = filterVO.getLimitCount();
+        qcResultPercentList = qcResultPercentList
+                .stream()
+                .limit(limitCount)
+                .collect(Collectors.toList());
+        return qcResultPercentList;
+    }
+
+    /**
+     * 出院人数统计
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("leaveHosCount")
+    public Map<String, Object> leaveHosCount(@InvokeParameter("filterVO") FilterVO filterVO) {
+        Map<String, Object> retMap = new LinkedHashMap<>();
+        retMap.put("总人数", 0);
+        retMap.put("死亡人数", 0);
+        retMap.put("新生儿人数", 0);
+        retMap.put("手术病人数", 0);
+        retMap.put("非医嘱离院病人数", 0);
+        retMap.put("31日再入院病人数", 0);
+        Integer totleNum = behospitalInfoFacade.leaveHosCount(filterVO);
+        Integer deathNum = behospitalInfoFacade.deathCount(filterVO);
+        Integer newBornNum = behospitalInfoFacade.newBornCount(filterVO);
+        Integer operationNum = behospitalInfoFacade.operationCount(filterVO);
+        Integer nonAdviceNum = behospitalInfoFacade.nonAdviceCount(filterVO);
+        Integer reBehospitalNum = behospitalInfoFacade.get31DaysBehospitalCount(filterVO);
+        retMap.put("总人数", totleNum);
+        retMap.put("死亡人数", deathNum);
+        retMap.put("新生儿人数", newBornNum);
+        retMap.put("手术病人数", operationNum);
+        retMap.put("非医嘱离院病人数", nonAdviceNum);
+        retMap.put("31日再入院病人数", reBehospitalNum);
+        return retMap;
+    }
+
+    /**
+     * 质控病历统计
+     *
+     * @return
+     */
+    @DataProvider("mrCount")
+    public List<NumDTO> mrCount(@InvokeParameter("filterVO") FilterVO filterVO) {
+        DecimalFormat df = new DecimalFormat("#0.00");
+        List<NumDTO> retList = Lists.newLinkedList();
+        QcresultFilterVO qcresultFilterVO = new QcresultFilterVO();
+        BeanUtil.copyProperties(filterVO, qcresultFilterVO);
+
+        int totleNum = qcresultInfoFacade.resultCount(qcresultFilterVO);
+        if (totleNum == 0) {
+            return retList;
+        }
+        qcresultFilterVO.setLevel("甲");
+        int firstLevelNum = qcresultInfoFacade.resultCount(qcresultFilterVO);
+        qcresultFilterVO.setLevel("乙");
+        int secondLevelNum = qcresultInfoFacade.resultCount(qcresultFilterVO);
+        qcresultFilterVO.setLevel("丙");
+        int thirdLevelNum = qcresultInfoFacade.resultCount(qcresultFilterVO);
+        NumDTO totleNumDTO = new NumDTO();
+        totleNumDTO.setName("累计质控病历数");
+        totleNumDTO.setTotleNum(totleNum);
+        totleNumDTO.setNum(totleNum);
+        NumDTO firstLevelNumDTO = new NumDTO();
+        firstLevelNumDTO.setName("甲级病历");
+        firstLevelNumDTO.setNum(firstLevelNum);
+        firstLevelNumDTO.setTotleNum(totleNum);
+        Double firstPercent = BigDecimal.valueOf(firstLevelNum)
+                .divide(BigDecimal.valueOf(totleNum), 4, RoundingMode.HALF_UP)
+                .doubleValue();
+        String firstPercentStr = df.format(BigDecimal.valueOf(firstPercent).multiply(BigDecimal.valueOf(100))) + "%";
+        firstLevelNumDTO.setPercent(firstPercent);
+        firstLevelNumDTO.setPercentStr(firstPercentStr);
+        NumDTO secondLevelNumDTO = new NumDTO();
+        secondLevelNumDTO.setName("乙级病历");
+        secondLevelNumDTO.setNum(secondLevelNum);
+        secondLevelNumDTO.setTotleNum(totleNum);
+        Double secondPercent = BigDecimal.valueOf(secondLevelNum)
+                .divide(BigDecimal.valueOf(totleNum), 4, RoundingMode.HALF_UP)
+                .doubleValue();
+        String secondPercentStr = df.format(BigDecimal.valueOf(secondPercent).multiply(BigDecimal.valueOf(100))) + "%";
+        secondLevelNumDTO.setPercent(secondPercent);
+        secondLevelNumDTO.setPercentStr(secondPercentStr);
+        NumDTO thirdLevelNumDTO = new NumDTO();
+        thirdLevelNumDTO.setName("丙级病历");
+        thirdLevelNumDTO.setNum(thirdLevelNum);
+        thirdLevelNumDTO.setTotleNum(totleNum);
+        Double thirdPercent = BigDecimal.valueOf(thirdLevelNum)
+                .divide(BigDecimal.valueOf(totleNum), 4, RoundingMode.HALF_UP)
+                .doubleValue();
+        String thirdPercentStr = df.format(BigDecimal.valueOf(thirdPercent).multiply(BigDecimal.valueOf(100))) + "%";
+        thirdLevelNumDTO.setPercent(thirdPercent);
+        thirdLevelNumDTO.setPercentStr(thirdPercentStr);
+        retList.add(totleNumDTO);
+        retList.add(firstLevelNumDTO);
+        retList.add(secondLevelNumDTO);
+        retList.add(thirdLevelNumDTO);
+        return retList;
+    }
+}

+ 150 - 0
src/main/java/com/diagbot/aggregate/ResultStatisticsAggregate.java

@@ -0,0 +1,150 @@
+package com.diagbot.aggregate;
+
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.text.DecimalFormat;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import com.diagbot.dto.NumDTO;
+import com.diagbot.facade.BehospitalInfoFacade;
+import com.diagbot.facade.QcresultInfoFacade;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.vo.FilterVO;
+import com.google.common.collect.Lists;
+
+import io.github.lvyahui8.spring.annotation.DataConsumer;
+import io.github.lvyahui8.spring.annotation.DataProvider;
+import io.github.lvyahui8.spring.annotation.InvokeParameter;
+
+/**
+ * @Description:缺陷相关统计
+ * @author: gaodm
+ * @time: 2024/4/22 18:09
+ */
+@Component
+public class ResultStatisticsAggregate {
+    @Autowired
+    private QcresultInfoFacade qcresultInfoFacade;
+    @Autowired
+    private BehospitalInfoFacade behospitalInfoFacade;
+
+    @DataProvider("setAllResult")
+    public Map<String, Object> setAllResult(
+            @InvokeParameter("filterVO") FilterVO filterVO,
+            @DataConsumer("entryByDept") List<NumDTO> deptList,
+            @DataConsumer("entryCountGroupByEntry") List<NumDTO> entryList,
+            @DataConsumer("entryCountGroupByCase") List<NumDTO> caseList) {
+        Map<String, Object> retMap = new LinkedHashMap<>();
+        retMap.put("各科室缺陷占比", Lists.newLinkedList());
+        retMap.put("各模块缺陷占比排行", Lists.newLinkedList());
+        retMap.put("条目缺陷占比", Lists.newLinkedList());
+        if (ListUtil.isNotEmpty(deptList)) {
+            retMap.put("各科室缺陷占比", deptList);
+        }
+        if (ListUtil.isNotEmpty(caseList)) {
+            retMap.put("各模块缺陷占比排行", caseList);
+        }
+        if (ListUtil.isNotEmpty(entryList)) {
+            retMap.put("条目缺陷占比", entryList);
+        }
+
+        return retMap;
+    }
+
+    /**
+     * 各模块缺陷占比排行
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("entryCountGroupByCase")
+    public List<NumDTO> entryCountGroupByCase(@InvokeParameter("filterVO") FilterVO filterVO) {
+        List<NumDTO> qcEntryNumList = qcresultInfoFacade.entryCountGroupByCase(filterVO);
+        return qcEntryNumList;
+    }
+
+    /**
+     * 条目缺陷占比
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("entryCountGroupByEntry")
+    public List<NumDTO> entryCountGroupByEntry(@InvokeParameter("filterVO") FilterVO filterVO) {
+        Integer limitCount = filterVO.getLimitCount();
+        List<NumDTO> numDTOList = qcresultInfoFacade.entryCountGroupByEntry(filterVO);
+        if (ListUtil.isNotEmpty(numDTOList)) {
+            List<NumDTO> retList = Lists.newLinkedList();
+            if (numDTOList.size() <= limitCount) {
+                retList = numDTOList;
+            } else {
+                retList = numDTOList.subList(0, limitCount);
+            }
+            return retList;
+        }
+        return null;
+    }
+
+    /**
+     * 各科室缺陷占比-全院-首页
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("entryByDept")
+    public List<NumDTO> entryByDept(@InvokeParameter("filterVO") FilterVO filterVO) {
+        Integer limitCount = filterVO.getLimitCount();
+        List<NumDTO> numDTOList = behospitalInfoFacade.entryByDept(filterVO);
+        if (ListUtil.isNotEmpty(numDTOList)) {
+            int totle = numDTOList
+                    .stream()
+                    .map(NumDTO::getNum)
+                    .reduce(0, Integer::sum);
+            numDTOList.forEach(result -> {
+                Double percent = BigDecimal.valueOf(result.getNum())
+                        .divide(BigDecimal.valueOf(totle), 4, RoundingMode.HALF_UP)
+                        .doubleValue();
+                result.setPercent(percent);
+            });
+            List<NumDTO> retList = Lists.newLinkedList();
+            if (numDTOList.size() <= limitCount) {
+                retList = BeanUtil.listCopyTo(numDTOList, NumDTO.class);
+            } else {
+
+                Double rate = 0d;
+                Integer num = 0;
+                for (NumDTO numDTO : numDTOList) {
+                    if (retList.size() < limitCount - 1) {
+                        rate = BigDecimal.valueOf(rate)
+                                .add(BigDecimal.valueOf(Double.valueOf(numDTO.getPercent())))
+                                .doubleValue();
+                        retList.add(numDTO);
+                    } else {
+                        num += numDTO.getNum();
+                    }
+                }
+                NumDTO otherNumDTO = new NumDTO();
+                otherNumDTO.setName("其他");
+                otherNumDTO.setNum(num);
+                otherNumDTO.setPercent(BigDecimal.valueOf(num)
+                        .divide(BigDecimal.valueOf(totle), 4, RoundingMode.HALF_UP)
+                        .doubleValue());
+                retList.add(otherNumDTO);
+            }
+            retList.forEach(result -> {
+                DecimalFormat df = new DecimalFormat("#0.00");
+                String percentStr
+                        = df.format(BigDecimal.valueOf(result.getPercent()).multiply(BigDecimal.valueOf(100))) + "%";
+                result.setPercentStr(percentStr);
+            });
+            return retList;
+        }
+        return null;
+    }
+}

+ 41 - 0
src/main/java/com/diagbot/aop/SysLoggerAspect.java

@@ -0,0 +1,41 @@
+//package com.diagbot.aop;
+//
+//import com.diagbot.biz.log.entity.SysLog;
+//import com.diagbot.enums.SysTypeEnum;
+//import com.diagbot.rabbit.MySender;
+//import com.diagbot.util.AopUtil;
+//import org.aspectj.lang.JoinPoint;
+//import org.aspectj.lang.annotation.Aspect;
+//import org.aspectj.lang.annotation.Before;
+//import org.aspectj.lang.annotation.Pointcut;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+//import org.springframework.stereotype.Component;
+//
+///**
+// * @Description: 日志拦截切面
+// * @author: gaodm
+// * @time: 2018/8/2 13:36
+// */
+//@Aspect
+//@Component
+//@ConditionalOnProperty(prefix = "syslog", value = { "enable" }, havingValue = "true")
+//public class SysLoggerAspect {
+//    @Autowired
+//    private MySender mySender;
+//
+//    @Pointcut("@annotation(com.diagbot.annotation.SysLogger)")
+//    public void loggerPointCut() {
+//
+//    }
+//
+//    @Before("loggerPointCut()")
+//    public void saveSysLog(JoinPoint joinPoint) {
+//        //入参设置
+//        SysLog sysLog = AopUtil.sysLoggerAspect(joinPoint, SysTypeEnum.FEEDBACK_SERVICE.getKey());
+//        //保存系统日志
+//        mySender.outputLogSend(sysLog);
+//    }
+//
+//}
+//

+ 42 - 0
src/main/java/com/diagbot/client/AuthServiceClient.java

@@ -0,0 +1,42 @@
+package com.diagbot.client;
+
+import com.diagbot.client.hystrix.AuthServiceHystrix;
+import com.diagbot.dto.AnalyzeDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.JWT;
+import com.diagbot.vo.AnalyzeVO;
+import com.diagbot.vo.DataImportVO;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.security.oauth2.common.OAuth2AccessToken;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestHeader;
+import org.springframework.web.bind.annotation.RequestParam;
+
+
+/**
+ * @Description: 请求认证授权服务器客户端
+ * @author: gaodm
+ * @time: 2018/8/2 13:37
+ */
+@FeignClient(name = "oath-self", url = "${oath.self.address}",fallback = AuthServiceHystrix.class)
+public interface AuthServiceClient {
+
+    @PostMapping(value = "/oauth/token")
+    JWT getToken(@RequestHeader(value = "Authorization") String authorization, @RequestParam("grant_type") String type, @RequestParam("username") String username, @RequestParam("password") String password);
+
+    @PostMapping(value = "/oauth/token")
+    JWT refreshToken(@RequestHeader(value = "Authorization") String authorization, @RequestParam("grant_type") String type, @RequestParam("refresh_token") String refreshToken);
+
+    @PostMapping(value = "/oauth/check_token")
+    OAuth2AccessToken checkToken(@RequestHeader(value = "Authorization") String authorization, @RequestParam("token") String token);
+
+    @PostMapping(value = "/qc/behospitalInfo/analyze_rpc")
+    RespDTO<AnalyzeDTO> analyze_rpc(@RequestBody AnalyzeVO analyzeVO);
+
+    @PostMapping(value = "/qc/dataimport/import")
+    RespDTO<Boolean> dataimport(@RequestBody DataImportVO dataImportVO);
+}
+
+
+

+ 30 - 0
src/main/java/com/diagbot/client/QcServiceClient.java

@@ -0,0 +1,30 @@
+package com.diagbot.client;
+
+import com.diagbot.client.hystrix.QcServiceHystrix;
+import com.diagbot.dto.OutputInfo;
+import com.diagbot.dto.Response;
+import com.diagbot.vo.QueryVo;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+
+import java.net.URI;
+
+
+/**
+ * @description: 病历质控远程调用
+ * @author: zhoutg
+ * @date: 2020/4/13 18:28
+ */
+@FeignClient(name = "qc", url = "url-placehokder", fallback = QcServiceHystrix.class)
+public interface QcServiceClient {
+
+    @PostMapping(value = "/analyse/rec")
+    Response<OutputInfo> extract(URI uri, QueryVo queryVo);
+
+    @PostMapping(value = "/analyse/standardFieldDock")
+    Response<OutputInfo> analyseField(URI uri, QueryVo queryVo);
+
+}
+
+
+

+ 51 - 0
src/main/java/com/diagbot/client/hystrix/AuthServiceHystrix.java

@@ -0,0 +1,51 @@
+package com.diagbot.client.hystrix;
+
+
+import com.diagbot.client.AuthServiceClient;
+import com.diagbot.dto.AnalyzeDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.JWT;
+import com.diagbot.vo.AnalyzeVO;
+import com.diagbot.vo.DataImportVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.security.oauth2.common.OAuth2AccessToken;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description: 请求认证授权服务器客户端(请求失败熔断)
+ * @author: gaodm
+ * @time: 2018/8/2 13:37
+ */
+@Component
+@Slf4j
+public class AuthServiceHystrix implements AuthServiceClient {
+    @Override
+    public JWT getToken(String authorization, String type, String username, String password) {
+        log.error("【hystrix】调用{}异常", "getToken");
+        return null;
+    }
+
+    @Override
+    public JWT refreshToken(String authorization, String type, String refreshToken) {
+        log.error("【hystrix】调用{}异常", "refreshToken");
+        return null;
+    }
+
+    @Override
+    public OAuth2AccessToken checkToken(String authorization, String token){
+        log.error("【hystrix】调用{}异常", "checkToken");
+        return null;
+    }
+
+    @Override
+    public RespDTO<AnalyzeDTO> analyze_rpc(AnalyzeVO analyzeVO) {
+        log.error("【hystrix】调用{}异常", "analyze_rpc");
+        return null;
+    }
+
+    @Override
+    public RespDTO<Boolean> dataimport(DataImportVO dataImportVO) {
+        log.error("【hystrix】调用{}异常", "dataimport");
+        return null;
+    }
+}

+ 32 - 0
src/main/java/com/diagbot/client/hystrix/QcServiceHystrix.java

@@ -0,0 +1,32 @@
+package com.diagbot.client.hystrix;
+
+
+import com.diagbot.client.QcServiceClient;
+import com.diagbot.dto.OutputInfo;
+import com.diagbot.dto.Response;
+import com.diagbot.vo.QueryVo;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+import java.net.URI;
+
+/**
+ * @description: 病历质控远程调用熔断器
+ * @author: zhoutg
+ * @date: 2020/4/13 18:23
+ */
+@Component
+@Slf4j
+public class QcServiceHystrix implements QcServiceClient {
+
+    @Override
+    public Response<OutputInfo> extract(URI uri, QueryVo queryVo) {
+        log.error("【hystrix】调用{}异常", "extract");
+        return null;
+    }
+    @Override
+    public Response<OutputInfo> analyseField(URI uri, QueryVo queryVo){
+        log.error("【hystrix】调用{}异常", "analyseField");
+        return null;
+    }
+}

+ 37 - 0
src/main/java/com/diagbot/config/AccessDeniedExceptionPoint.java

@@ -0,0 +1,37 @@
+package com.diagbot.config;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.springframework.security.access.AccessDeniedException;
+import org.springframework.security.web.access.AccessDeniedHandler;
+import org.springframework.stereotype.Component;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @Author songxl
+ * @time: 2024/11/30
+ */
+@Component
+public class AccessDeniedExceptionPoint implements AccessDeniedHandler {
+    @Override
+    public void handle(HttpServletRequest httpServletRequest, HttpServletResponse response, AccessDeniedException e) throws IOException, ServletException {
+        Map<String,Object> map = new HashMap<>();
+        //响应状态码统一为200
+        response.setStatus(HttpServletResponse.SC_OK);
+        map.put("code", "00000001");
+        map.put("msg","没有该权限");
+        response.setContentType("application/json");
+        try {
+            ObjectMapper mapper = new ObjectMapper();
+            mapper.writeValue(response.getOutputStream(), map);
+        } catch (Exception e1) {
+            throw new ServletException();
+        }
+    }
+}

+ 39 - 0
src/main/java/com/diagbot/config/AuthExceptionEntryPoint.java

@@ -0,0 +1,39 @@
+package com.diagbot.config;
+
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.exception.ServiceErrorCode;
+import com.diagbot.util.StringUtil;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.core.AuthenticationException;
+import org.springframework.security.web.AuthenticationEntryPoint;
+import org.springframework.stereotype.Component;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @Author songxl
+ * @time: 2024/11/30
+ */
+@Component
+public class AuthExceptionEntryPoint implements AuthenticationEntryPoint {
+    @Autowired
+    AuthenticationExceptionHandler authenticationExceptionHandler;
+
+    @Override
+    public void commence(HttpServletRequest request, HttpServletResponse response,
+                         AuthenticationException authException)
+            throws ServletException {
+        try {
+            authenticationExceptionHandler.handleException(request,response,authException);
+        } catch (Exception e) {
+            throw new ServletException();
+        }
+    }
+}

+ 90 - 0
src/main/java/com/diagbot/config/AuthenticationExceptionHandler.java

@@ -0,0 +1,90 @@
+package com.diagbot.config;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.authentication.AccountExpiredException;
+import org.springframework.security.authentication.AccountStatusException;
+import org.springframework.security.authentication.BadCredentialsException;
+import org.springframework.security.authentication.CredentialsExpiredException;
+import org.springframework.security.authentication.DisabledException;
+import org.springframework.security.authentication.InsufficientAuthenticationException;
+import org.springframework.security.authentication.LockedException;
+import org.springframework.security.core.AuthenticationException;
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
+import org.springframework.stereotype.Component;
+
+import com.diagbot.facade.SysUserFacade;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+/**
+ * @Description:权限认证异常处理
+ * @Author songxl
+ * @time: 2024/12/13
+ */
+@Component
+public class AuthenticationExceptionHandler {
+    @Autowired
+    private SysUserFacade userFacade;
+
+    public void handleException(HttpServletRequest request, HttpServletResponse response,
+                                AuthenticationException authException) throws ServletException {
+        Map<String,Object> map = new HashMap<>();
+        //登录前的获取登录页面的请求接口不知道什么原因会抛出未认证(Full authentication is required to access this resource)
+        //如果抛出未认证在这个调用这个服务接口返回消息
+        //响应状态码统一为200
+        response.setStatus(HttpServletResponse.SC_OK);
+        if (matchers("/sys/user/getHospitalMark", request)) {
+            map.put("code", "0");
+            map.put("msg", "");
+            map.put("data", userFacade.getHospitalMark());
+        } else if (authException instanceof BadCredentialsException) {
+            map.put("code", "00000001");
+            map.put("msg", "用户或密码不正确");
+        } else if (authException instanceof AccountStatusException) {
+            if (authException instanceof LockedException) {
+                map.put("code", "00000001");
+                map.put("msg", "账户锁定");
+            } else if (authException instanceof AccountExpiredException) {//账户过期
+                map.put("code", "10020011");
+                map.put("msg", "登录超时。为确保您的账户安全,系统已自动退出,请重新登录。");
+            } else if (authException instanceof CredentialsExpiredException) {//证书过期
+                map.put("code", "10020011");
+                map.put("msg", "登录超时。为确保您的账户安全,系统已自动退出,请重新登录。");
+            } else if (authException instanceof DisabledException) {
+                map.put("code", "00000001");
+                map.put("msg", "账户不可用");
+            } else {
+                map.put("code", "00000001");
+                map.put("msg", "用户状态异常");
+            }
+        } else if (authException instanceof InsufficientAuthenticationException) {
+            map.put("code", "10020011");
+            map.put("msg", "登录超时。为确保您的账户安全,系统已自动退出,请重新登录。");
+        } else {
+            map.put("code", "00000001");
+            map.put("msg", authException.getMessage());
+        }
+        response.setContentType("application/json");
+        try {
+            ObjectMapper mapper = new ObjectMapper();
+            mapper.writeValue(response.getOutputStream(), map);
+        } catch (Exception e) {
+            throw new ServletException();
+        }
+    }
+
+    private boolean matchers(String url, HttpServletRequest request) {
+        AntPathRequestMatcher matcher = new AntPathRequestMatcher(url);
+        if (matcher.matches(request)) {
+            return true;
+        }
+        return false;
+    }
+}

+ 29 - 0
src/main/java/com/diagbot/config/CacheDeleteInit.java

@@ -0,0 +1,29 @@
+package com.diagbot.config;
+
+import com.diagbot.facade.CacheFacade;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.CommandLineRunner;
+import org.springframework.core.annotation.Order;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description: 项目启动后初始化缓存
+ * @author: gaodm
+ * @time: 2024/5/13 11:20
+ */
+@Component //把类交给spring容器管理
+@Order(100)  //使用order属性,设置该类在spring容器中的加载顺序
+@Slf4j
+public class CacheDeleteInit implements CommandLineRunner {
+
+    @Autowired
+    CacheFacade cacheFacade;
+
+    @Override
+    public void run(String... args) throws Exception {
+        // 服务启动清除redis缓存
+        cacheFacade.clear();
+        log.info("病案首页质控系统缓存启动初始化成功!");
+    }
+}

+ 30 - 0
src/main/java/com/diagbot/config/CorsConfiguer.java

@@ -0,0 +1,30 @@
+package com.diagbot.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.cors.CorsConfiguration;
+import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
+import org.springframework.web.filter.CorsFilter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2024/4/12 15:56
+ */
+@Configuration
+public class CorsConfiguer {
+    private CorsConfiguration buildConfig() {
+        CorsConfiguration corsConfiguration = new CorsConfiguration();
+        corsConfiguration.addAllowedOrigin("*"); // 允许的域名
+        corsConfiguration.addAllowedHeader("*"); // 允许的请求头
+        corsConfiguration.addAllowedMethod("*"); // 允许的方法(post、get等)
+        return corsConfiguration;
+    }
+
+    @Bean
+    public CorsFilter corsFilter() {
+        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
+        source.registerCorsConfiguration("/**", buildConfig()); // 对接口配置跨域设置
+        return new CorsFilter(source);
+    }
+}

+ 19 - 0
src/main/java/com/diagbot/config/CustomAccessTokenConverter.java

@@ -0,0 +1,19 @@
+package com.diagbot.config;
+
+import org.springframework.security.oauth2.provider.OAuth2Authentication;
+import org.springframework.security.oauth2.provider.token.DefaultAccessTokenConverter;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+@Component
+public class CustomAccessTokenConverter extends DefaultAccessTokenConverter {
+
+    @Override
+    public OAuth2Authentication extractAuthentication(Map<String, ?> claims) {
+        OAuth2Authentication authentication = super.extractAuthentication(claims);
+        authentication.setDetails(claims);
+        return authentication;
+    }
+
+}

+ 30 - 0
src/main/java/com/diagbot/config/CustomTokenEnhancer.java

@@ -0,0 +1,30 @@
+package com.diagbot.config;
+
+import com.diagbot.entity.SysUserUaa;
+import org.springframework.security.oauth2.common.DefaultOAuth2AccessToken;
+import org.springframework.security.oauth2.common.OAuth2AccessToken;
+import org.springframework.security.oauth2.provider.OAuth2Authentication;
+import org.springframework.security.oauth2.provider.token.TokenEnhancer;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @Description: token生成携带的信息
+ * @author: gaodm
+ * @time: 2018/9/3 15:16
+ */
+public class CustomTokenEnhancer implements TokenEnhancer {
+
+    @Override
+    public OAuth2AccessToken enhance(OAuth2AccessToken accessToken, OAuth2Authentication authentication) {
+        final Map<String, Object> additionalInfo = new HashMap<>();
+        SysUserUaa user = (SysUserUaa) authentication.getUserAuthentication().getPrincipal();
+        additionalInfo.put("user_id", user.getId());
+        additionalInfo.put("hosp_id", user.getHospitalId());
+        //		additionalInfo.put("authorities", user.getAuthorities());
+        ((DefaultOAuth2AccessToken) accessToken).setAdditionalInformation(additionalInfo);
+        return accessToken;
+    }
+
+}

+ 15 - 0
src/main/java/com/diagbot/config/GlobalMethodSecurityConfigurer.java

@@ -0,0 +1,15 @@
+package com.diagbot.config;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
+
+/**
+ * @Description: 安全配置类
+ * @author: gaodm
+ * @time: 2018/8/2 13:38
+ */
+@Configuration
+@EnableGlobalMethodSecurity(prePostEnabled = true)
+public class GlobalMethodSecurityConfigurer {
+
+}

+ 220 - 0
src/main/java/com/diagbot/config/MyJwtTokenStore.java

@@ -0,0 +1,220 @@
+package com.diagbot.config;
+
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.RedisUtils;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.jwt.Jwt;
+import org.springframework.security.jwt.JwtHelper;
+import org.springframework.security.jwt.crypto.sign.RsaVerifier;
+import org.springframework.security.jwt.crypto.sign.SignatureVerifier;
+import org.springframework.security.oauth2.common.DefaultExpiringOAuth2RefreshToken;
+import org.springframework.security.oauth2.common.DefaultOAuth2AccessToken;
+import org.springframework.security.oauth2.common.DefaultOAuth2RefreshToken;
+import org.springframework.security.oauth2.common.OAuth2AccessToken;
+import org.springframework.security.oauth2.common.OAuth2RefreshToken;
+import org.springframework.security.oauth2.common.exceptions.InvalidTokenException;
+import org.springframework.security.oauth2.common.util.JsonParser;
+import org.springframework.security.oauth2.common.util.JsonParserFactory;
+import org.springframework.security.oauth2.provider.OAuth2Authentication;
+import org.springframework.security.oauth2.provider.approval.Approval;
+import org.springframework.security.oauth2.provider.approval.ApprovalStore;
+import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter;
+import org.springframework.security.oauth2.provider.token.store.JwtClaimsSetVerifier;
+import org.springframework.security.oauth2.provider.token.store.JwtTokenStore;
+import org.springframework.security.oauth2.provider.approval.Approval.ApprovalStatus;
+import org.springframework.util.FileCopyUtils;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * @Description:token续签
+ * @Author songxl
+ * @time: 2024/12/17
+ */
+public class MyJwtTokenStore extends JwtTokenStore {
+    private JwtAccessTokenConverter jwtTokenEnhancer;
+    private ApprovalStore approvalStore;
+    private JsonParser objectMapper = JsonParserFactory.create();
+    private JwtClaimsSetVerifier jwtClaimsSetVerifier = new NoOpJwtClaimsSetVerifier();
+    private SignatureVerifier verifier;
+    private RedisUtils redisUtils;
+    public MyJwtTokenStore(JwtAccessTokenConverter jwtTokenEnhancer,RedisUtils redisUtils) {
+        super(jwtTokenEnhancer);
+        verifier = createVerifier();
+        this.jwtTokenEnhancer = jwtTokenEnhancer;
+        this.redisUtils = redisUtils;
+    }
+
+    private SignatureVerifier createVerifier() {
+        Resource resource = new ClassPathResource("public.cert");
+        String publicKey;
+        try {
+            publicKey = new String(FileCopyUtils.copyToByteArray(resource.getInputStream()));
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+        return new RsaVerifier(publicKey);
+    }
+
+    public void setApprovalStore(ApprovalStore approvalStore) {
+        this.approvalStore = approvalStore;
+    }
+
+    public OAuth2Authentication readAuthentication(OAuth2AccessToken token) {
+        return this.readAuthentication(token.getValue());
+    }
+
+
+    public void storeAccessToken(OAuth2AccessToken token, OAuth2Authentication authentication) {
+    }
+
+    public OAuth2AccessToken readAccessToken(String tokenValue) {
+        DefaultOAuth2AccessToken accessToken = (DefaultOAuth2AccessToken) this.convertAccessToken(tokenValue);
+        OAuth2AccessToken newAccessToken = updateTokenOutTime(accessToken);
+        if (this.jwtTokenEnhancer.isRefreshToken(accessToken)) {
+            throw new InvalidTokenException("Encoded token is a refresh token");
+        } else {
+            return newAccessToken;
+        }
+    }
+
+    private OAuth2AccessToken updateTokenOutTime(DefaultOAuth2AccessToken accessToken) {
+        if(accessToken.getAdditionalInformation()!=null&&accessToken.getAdditionalInformation().containsKey("user_id")){
+            //通过用户id获取redis存储的token过期时间
+            Object userIdObj = accessToken.getAdditionalInformation().get("user_id");
+            Integer value =(Integer) redisUtils.get("user:refreshToken:outTime_" + userIdObj);
+            if (value!=null){
+                //更新token过期时间为明天
+                accessToken.setExpiration(DateUtil.addDay(new Date(),1));
+                //将这个时间重新存到redis
+                redisUtils.set("user:refreshToken:outTime_" + userIdObj, value, value);
+            }
+        }
+        return accessToken;
+    }
+
+    private OAuth2AccessToken convertAccessToken(String tokenValue) {
+        return this.jwtTokenEnhancer.extractAccessToken(tokenValue, decode(tokenValue));
+    }
+
+    public void removeAccessToken(OAuth2AccessToken token) {
+    }
+
+    public void storeRefreshToken(OAuth2RefreshToken refreshToken, OAuth2Authentication authentication) {
+    }
+
+    public OAuth2RefreshToken readRefreshToken(String tokenValue) {
+        OAuth2AccessToken encodedRefreshToken = this.convertAccessToken(tokenValue);
+        OAuth2RefreshToken refreshToken = this.createRefreshToken(encodedRefreshToken);
+        if (this.approvalStore != null) {
+            OAuth2Authentication authentication = this.readAuthentication(tokenValue);
+            if (authentication.getUserAuthentication() != null) {
+                String userId = authentication.getUserAuthentication().getName();
+                String clientId = authentication.getOAuth2Request().getClientId();
+                Collection<Approval> approvals = this.approvalStore.getApprovals(userId, clientId);
+                Collection<String> approvedScopes = new HashSet<>();
+                Iterator<?> var9 = approvals.iterator();
+                while(var9.hasNext()) {
+                    Approval approval = (Approval)var9.next();
+                    if (approval.isApproved()) {
+                        approvedScopes.add(approval.getScope());
+                    }
+                }
+
+                if (!approvedScopes.containsAll(authentication.getOAuth2Request().getScope())) {
+                    return null;
+                }
+            }
+        }
+
+        return refreshToken;
+    }
+
+    private OAuth2RefreshToken createRefreshToken(OAuth2AccessToken encodedRefreshToken) {
+        if (!this.jwtTokenEnhancer.isRefreshToken(encodedRefreshToken)) {
+            throw new InvalidTokenException("Encoded token is not a refresh token");
+        } else {
+            return (OAuth2RefreshToken)(encodedRefreshToken.getExpiration() != null ? new DefaultExpiringOAuth2RefreshToken(encodedRefreshToken.getValue(), encodedRefreshToken.getExpiration()) : new DefaultOAuth2RefreshToken(encodedRefreshToken.getValue()));
+        }
+    }
+
+    public OAuth2Authentication readAuthenticationForRefreshToken(OAuth2RefreshToken token) {
+        return this.readAuthentication(token.getValue());
+    }
+
+    public void removeRefreshToken(OAuth2RefreshToken token) {
+        this.remove(token.getValue());
+    }
+
+    public void removeAccessTokenUsingRefreshToken(OAuth2RefreshToken refreshToken) {
+    }
+
+    public OAuth2AccessToken getAccessToken(OAuth2Authentication authentication) {
+        return null;
+    }
+
+    public Collection<OAuth2AccessToken> findTokensByClientIdAndUserName(String clientId, String userName) {
+        return Collections.emptySet();
+    }
+
+    public Collection<OAuth2AccessToken> findTokensByClientId(String clientId) {
+        return Collections.emptySet();
+    }
+
+    public void setTokenEnhancer(JwtAccessTokenConverter tokenEnhancer) {
+        this.jwtTokenEnhancer = tokenEnhancer;
+    }
+
+    private void remove(String token) {
+        if (this.approvalStore != null) {
+            OAuth2Authentication auth = this.readAuthentication(token);
+            String clientId = auth.getOAuth2Request().getClientId();
+            Authentication user = auth.getUserAuthentication();
+            if (user != null) {
+                Collection<Approval> approvals = new ArrayList<>();
+                Iterator<?> var6 = auth.getOAuth2Request().getScope().iterator();
+                while(var6.hasNext()) {
+                    String scope = (String)var6.next();
+                    approvals.add(new Approval(user.getName(), clientId, scope, new Date(), ApprovalStatus.APPROVED));
+                }
+                this.approvalStore.revokeApprovals(approvals);
+            }
+        }
+
+    }
+
+    protected Map<String, Object> decode(String token) {
+        try {
+            Jwt jwt = JwtHelper.decodeAndVerify(token,verifier);
+            String claimsStr = jwt.getClaims();
+            Map<String, Object> claims = this.objectMapper.parseMap(claimsStr);
+            if (claims.containsKey("exp") && claims.get("exp") instanceof Integer) {
+                Integer intValue = (Integer)claims.get("exp");
+                claims.put("exp", new Long((long)intValue));
+            }
+
+            jwtClaimsSetVerifier.verify(claims);
+            return claims;
+        } catch (Exception var6) {
+            throw new InvalidTokenException("Cannot convert access token to JSON", var6);
+        }
+    }
+
+
+    private class NoOpJwtClaimsSetVerifier implements JwtClaimsSetVerifier {
+        private NoOpJwtClaimsSetVerifier() {
+        }
+
+        public void verify(Map<String, Object> claims) throws InvalidTokenException {
+        }
+    }
+}

+ 25 - 0
src/main/java/com/diagbot/config/MyWebConfigurer.java

@@ -0,0 +1,25 @@
+package com.diagbot.config;
+
+import org.springframework.boot.SpringBootConfiguration;
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+
+@SpringBootConfiguration
+public class MyWebConfigurer implements WebMvcConfigurer {
+
+    @Override
+    public void addCorsMappings(CorsRegistry corsRegistry){
+        /**
+         * 所有请求都允许跨域,使用这种配置就不需要
+         * 在interceptor中配置header了
+         */
+        corsRegistry.addMapping("/**")
+                .allowCredentials(true)
+                .allowedOrigins("*")
+                .allowedMethods("POST", "GET", "PUT", "OPTIONS", "DELETE")
+                .allowedHeaders("*")
+                .maxAge(3600);
+    }
+
+}

+ 33 - 0
src/main/java/com/diagbot/config/MybatisPlusConfigurer.java

@@ -0,0 +1,33 @@
+package com.diagbot.config;
+
+import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+/**
+ * @Description: MybatisPlus配置类
+ * @author: gaodm
+ * @time: 2018/8/2 13:39
+ */
+@EnableTransactionManagement
+@Configuration
+@MapperScan("com.diagbot.mapper*")//这个注解,作用相当于下面的@Bean MapperScannerConfigurer,2者配置1份即可
+public class MybatisPlusConfigurer {
+
+    /**
+     * mybatis-plus分页插件<br>
+     * 文档:http://mp.baomidou.com<br>
+     */
+    @Bean
+    public PaginationInterceptor paginationInterceptor() {
+        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
+        // 设置请求的页面大于最大页后操作,true调回到首页,false继续请求,默认false
+        //paginationInterceptor.setOverflow(false);
+        // 设置最大单页限制数量,默认500条,-1不受限制
+        paginationInterceptor.setLimit(-1L);
+        return paginationInterceptor;
+    }
+
+}

+ 103 - 0
src/main/java/com/diagbot/config/OAuth2Configurer.java

@@ -0,0 +1,103 @@
+package com.diagbot.config;
+
+import java.util.Arrays;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.security.authentication.AuthenticationManager;
+import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer;
+import org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter;
+import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer;
+import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer;
+import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerSecurityConfigurer;
+import org.springframework.security.oauth2.provider.token.TokenEnhancer;
+import org.springframework.security.oauth2.provider.token.TokenEnhancerChain;
+import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter;
+import org.springframework.security.oauth2.provider.token.store.JwtTokenStore;
+import org.springframework.security.oauth2.provider.token.store.KeyStoreKeyFactory;
+
+import com.diagbot.facade.SysDictionaryFacade;
+import com.diagbot.service.UrlUserService;
+
+import lombok.extern.slf4j.Slf4j;
+
+/**
+ * @Description: OAuth2授权认证配置类
+ * @author: gaodm
+ * @time: 2018/8/2 14:24
+ */
+@Configuration
+@EnableAuthorizationServer
+@Slf4j
+public class OAuth2Configurer extends AuthorizationServerConfigurerAdapter {
+    @Autowired
+    private UrlUserService urlUserService;
+    @Autowired
+    private SysDictionaryFacade sysDictionaryFacade;
+
+    @Override
+    public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
+        int accessToken = 24 * 3600;
+        int refreshToken = 30 * 24 * 3600;
+        if (sysDictionaryFacade.getDictionaryWithKey() != null
+                && sysDictionaryFacade.getDictionaryWithKey().containsKey("31")
+                && sysDictionaryFacade.getDictionaryWithKey().get("31").containsKey("accessToken")
+                && sysDictionaryFacade.getDictionaryWithKey().get("31").containsKey("refreshToken")) {
+            accessToken = Integer.parseInt(sysDictionaryFacade.getDictionaryWithKey().get("31").get("accessToken"));
+            refreshToken = Integer.parseInt(sysDictionaryFacade.getDictionaryWithKey().get("31").get("refreshToken"));
+        }
+        clients.inMemory()
+                .withClient("uaa-service")
+                .secret("{noop}123456")
+                .scopes("service")
+                .autoApprove(true)
+                .authorizedGrantTypes("implicit", "refresh_token", "password", "authorization_code")
+                .accessTokenValiditySeconds(accessToken)
+                .refreshTokenValiditySeconds(refreshToken);
+    }
+
+    /**
+     * 注入自定义token生成方式
+     *
+     * @return
+     */
+    @Bean
+    public TokenEnhancer customerEnhancer() {
+        return new CustomTokenEnhancer();
+    }
+
+    @Override
+    public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
+        //指定认证管理器
+        endpoints.authenticationManager(authenticationManager).userDetailsService(urlUserService);
+        //指定token存储位置
+        endpoints.tokenStore(new JwtTokenStore(jwtTokenEnhancerServer()));
+        // 自定义token生成方式
+        TokenEnhancerChain tokenEnhancerChain = new TokenEnhancerChain();
+        tokenEnhancerChain.setTokenEnhancers(Arrays.asList(customerEnhancer(), jwtTokenEnhancerServer()));
+        endpoints.tokenEnhancer(tokenEnhancerChain);
+    }
+
+    @Override
+    public void configure(AuthorizationServerSecurityConfigurer security) throws Exception {
+        security.tokenKeyAccess("permitAll()")
+                .checkTokenAccess("isAuthenticated()")
+                .allowFormAuthenticationForClients();
+    }
+
+    @Autowired
+    @Qualifier("authenticationManagerBean")
+    private AuthenticationManager authenticationManager;
+
+    @Bean("JwtTokenEnhancerServer")
+    protected JwtAccessTokenConverter jwtTokenEnhancerServer() {
+        KeyStoreKeyFactory keyStoreKeyFactory = new KeyStoreKeyFactory(new ClassPathResource("diagbot-jwt.jks"), "diagbot123456".toCharArray());
+        JwtAccessTokenConverter converter = new JwtAccessTokenConverter();
+        converter.setKeyPair(keyStoreKeyFactory.getKeyPair("diagbot-jwt"));
+        log.info("Created jwtTokenEnhancerServer success");
+        return converter;
+    }
+}

+ 202 - 0
src/main/java/com/diagbot/config/RedisConfigurer.java

@@ -0,0 +1,202 @@
+package com.diagbot.config;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.PropertyAccessor;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cache.CacheManager;
+import org.springframework.cache.annotation.CachingConfigurerSupport;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.cache.interceptor.KeyGenerator;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.data.redis.cache.RedisCacheConfiguration;
+import org.springframework.data.redis.cache.RedisCacheManager;
+import org.springframework.data.redis.connection.RedisStandaloneConfiguration;
+import org.springframework.data.redis.connection.lettuce.LettuceClientConfiguration;
+import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
+import org.springframework.data.redis.connection.lettuce.LettucePoolingClientConfiguration;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
+import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
+import org.springframework.data.redis.serializer.RedisSerializationContext;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+
+import java.time.Duration;
+
+@Configuration
+@EnableCaching
+@Slf4j
+public class RedisConfigurer extends CachingConfigurerSupport {
+
+    @Value("${spring.redis.database.cache}")
+    private String databaseCache;
+    @Value("${spring.redis.database.token}")
+    private String databaseMr;
+    @Value("${spring.redis.host}")
+    private String host;
+    @Value("${spring.redis.password}")
+    private String password;
+    @Value("${spring.redis.port}")
+    private int port;
+    @Value("${spring.redis.timeout}")
+    private int timeout;
+    @Value("${spring.redis.lettuce.pool.max-active}")
+    private int maxActive;
+    @Value("${spring.redis.lettuce.pool.max-idle}")
+    private int maxIdle;
+    @Value("${spring.redis.lettuce.pool.max-wait}")
+    private long maxWaitMillis;
+    @Value("${spring.redis.lettuce.pool.min-idle}")
+    private int minIdle;
+
+    @Autowired
+    @Qualifier("factoryForCache")
+    private LettuceConnectionFactory lettuceConnectionFactory;
+
+    @Bean
+    public GenericObjectPoolConfig getRedisConfig() {
+        GenericObjectPoolConfig poolConfig = new GenericObjectPoolConfig();
+        poolConfig.setMaxTotal(maxActive);
+        poolConfig.setMaxIdle(maxIdle);
+        poolConfig.setMaxWaitMillis(maxWaitMillis);
+        poolConfig.setMinIdle(minIdle);
+        return poolConfig;
+    }
+
+    @Bean
+    @Override
+    public CacheManager cacheManager() {
+        RedisCacheConfiguration redisCacheConfiguration = RedisCacheConfiguration.defaultCacheConfig()
+                // 设置 key为string序列化
+                .serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(new StringRedisSerializer()))
+                // 设置value为json序列化
+                .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(getSerializer()))
+                // 不缓存空值
+                .disableCachingNullValues();
+        RedisCacheManager cacheManager = RedisCacheManager.builder(lettuceConnectionFactory)
+                .cacheDefaults(redisCacheConfiguration)
+                .transactionAware()
+                .build();
+        cacheManager.afterPropertiesSet();
+        log.info("RedisCacheManager config success");
+        return cacheManager;
+    }
+
+    @Bean(name = "springSessionDefaultRedisSerializer")
+    public GenericJackson2JsonRedisSerializer getGenericJackson2JsonRedisSerializer() {
+        return new GenericJackson2JsonRedisSerializer();
+    }
+
+    /**
+     * 缓存使用的redis
+     *
+     * @return
+     */
+    @Bean("factoryForCache")
+    @Primary
+    public LettuceConnectionFactory redisConnectionFactory() {
+        return getRedisConnectionFactory(Integer.valueOf(databaseCache));
+    }
+
+    @Bean
+    public RedisTemplate<String, Object> redisTemplate() {
+        return getRedisTemplate(lettuceConnectionFactory);
+    }
+
+    private Jackson2JsonRedisSerializer getSerializer() {
+        Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer<>(Object.class);
+        ObjectMapper om = new ObjectMapper();
+        om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
+        om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
+        jackson2JsonRedisSerializer.setObjectMapper(om);
+        return jackson2JsonRedisSerializer;
+    }
+
+    @Bean
+    @Override
+    public KeyGenerator keyGenerator() {
+        //  设置自动key的生成规则,配置spring boot的注解,进行方法级别的缓存
+        // 使用:进行分割,可以很多显示出层级关系
+        // 这里其实就是new了一个KeyGenerator对象
+        return (target, method, params) -> {
+            StringBuilder sb = new StringBuilder();
+            sb.append(target.getClass().getName());
+            sb.append(":");
+            sb.append(method.getName());
+            for (Object obj : params) {
+                sb.append(":" + String.valueOf(obj));
+            }
+            String rsToUse = String.valueOf(sb);
+//            log.info("自动生成Redis Key -> [{}]", rsToUse);
+            return rsToUse;
+        };
+    }
+
+    /**
+     * Token使用的redis
+     *
+     * @return
+     */
+    @Bean("factoryForToken")
+    public LettuceConnectionFactory redisConnectionFactoryForToken() {
+        return getRedisConnectionFactory(Integer.valueOf(databaseMr));
+    }
+
+    @Bean(name = "redisTemplateForToken")
+    public RedisTemplate<String, Object> redisTemplateForToken(@Qualifier("factoryForToken") LettuceConnectionFactory factory) {
+        return getRedisTemplate(factory);
+    }
+
+    /**
+     * 表字段和注释使用的redis
+     *
+     * @return
+     */
+    @Bean("factoryForTable")
+    public LettuceConnectionFactory redisConnectionFactoryForTable() {
+        return getRedisConnectionFactory(Integer.valueOf(databaseMr));
+    }
+
+    @Bean(name = "redisTemplateForTable")
+    public RedisTemplate<String, Object> redisTemplateForTable(@Qualifier("factoryForTable") LettuceConnectionFactory factory) {
+        return getRedisTemplate(factory);
+    }
+
+
+    private LettuceConnectionFactory getRedisConnectionFactory(Integer database) {
+        RedisStandaloneConfiguration connection = new RedisStandaloneConfiguration();
+        connection.setHostName(host);
+        connection.setPort(port);
+        connection.setPassword(password);
+        connection.setDatabase(database);
+        GenericObjectPoolConfig poolConfig = getRedisConfig();
+        LettuceClientConfiguration builder = LettucePoolingClientConfiguration.builder()
+                .commandTimeout(Duration.ofMillis(timeout))
+                .poolConfig(poolConfig)
+                .shutdownTimeout(Duration.ZERO)
+                .build();
+        LettuceConnectionFactory factory = new LettuceConnectionFactory(connection, builder);
+        return factory;
+    }
+
+    private RedisTemplate<String, Object> getRedisTemplate(LettuceConnectionFactory factory) {
+        RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>();
+        redisTemplate.setConnectionFactory(factory);
+
+        // value值的序列化
+        redisTemplate.setValueSerializer(getSerializer());
+        redisTemplate.setHashValueSerializer(getSerializer());
+        // key的序列化采用StringRedisSerializer
+        redisTemplate.setKeySerializer(new StringRedisSerializer());
+        redisTemplate.setHashKeySerializer(new StringRedisSerializer());
+        redisTemplate.afterPropertiesSet();
+        return redisTemplate;
+    }
+}
+ 

+ 308 - 0
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -0,0 +1,308 @@
+package com.diagbot.config;
+
+import java.io.IOException;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.jwt.crypto.sign.RsaVerifier;
+import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
+import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter;
+import org.springframework.security.oauth2.config.annotation.web.configurers.ResourceServerSecurityConfigurer;
+import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter;
+import org.springframework.util.FileCopyUtils;
+
+import com.diagbot.util.RedisUtils;
+
+/**
+ * @Description: 权限资源配置类
+ * @author: gaodm
+ * @time: 2018/8/2 14:21
+ */
+@Configuration
+@EnableResourceServer
+@ComponentScan({"com.diagbot.config"})
+public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
+    Logger log = LoggerFactory.getLogger(ResourceServerConfigurer.class);
+    @Autowired
+    private AuthExceptionEntryPoint authExceptionEntryPoint;
+    @Autowired
+    private AccessDeniedExceptionPoint accessDeniedExceptionPoint;
+    @Autowired
+    private RedisUtils redisUtils;
+    @Override
+    public void configure(HttpSecurity http) throws Exception {
+        http.cors()
+                .and()
+                .exceptionHandling().authenticationEntryPoint(authExceptionEntryPoint)
+                .and()
+                .exceptionHandling().accessDeniedHandler(accessDeniedExceptionPoint)
+                .and()
+                .csrf().disable()
+                .authorizeRequests()
+                .regexMatchers(".*swagger.*", ".*v2.*", ".*webjars.*", "/druid.*", "/actuator.*", "/hystrix.*").permitAll()
+                .antMatchers("/sys/user/getJwt").permitAll()
+                .antMatchers("/sys/user/logout").permitAll()
+                .antMatchers("/sys/user/unlock").permitAll()
+                .antMatchers("/sys/user/getCaptcha").permitAll()
+                .antMatchers("/sys/user/getHospitalMark").permitAll()
+                .antMatchers("/sys/user/getJwtNoPass").permitAll()
+                .antMatchers("/sys/user/refreshJwt").permitAll()
+                .antMatchers("/sys/user/checkToken").permitAll()
+                .antMatchers("/sys/dictionaryInfo/getDictionary").permitAll()
+                .antMatchers("/oauth/token").permitAll()
+                .antMatchers("/oauth/check_token").permitAll()
+                .antMatchers("/cache/clear").permitAll()
+                .antMatchers("/qc/behospitalInfo/execule").permitAll()
+                .antMatchers("/qc/behospitalInfo/analyze_rpc").permitAll()
+                .antMatchers("/qc/behospitalInfo/analyze_api").permitAll()
+                .antMatchers("/qc/behospitalInfo/analyze_run").permitAll()
+                .antMatchers("/qc/behospitalInfo/sendRuleWarn").permitAll()
+                .antMatchers("/qc/behospitalInfo/checkRule").permitAll()
+                .antMatchers("/qc/behospitalInfo/upState").permitAll()
+                .antMatchers("/qc/behospitalInfo/delState").permitAll()
+                .antMatchers("/qc/module/getById").permitAll()
+                .antMatchers("/qc/module/getModuleMap").permitAll()
+                .antMatchers("/qc/cases/getQcCases").permitAll()
+                .antMatchers("/qc/behospitalInfo/page").permitAll()
+                .antMatchers("/qc/casesEntryHospital/getQcCasesEntryAll").permitAll()
+                .antMatchers("/qc/casesEntryHospital/getQcCasesAll").permitAll()
+                .antMatchers("/qc/behospitalInfo/getByBehospitalCode").permitAll()
+                .antMatchers("/bas/dept/getList").permitAll()
+                .antMatchers("/bas/dept/getListUser").permitAll()
+                .antMatchers("/qc/behospitalInfo/page_dept").permitAll()
+                .antMatchers("/qc/behospitalInfo/page_person").permitAll()
+                .antMatchers("/qc/behospitalInfo/page_group").permitAll()
+                .antMatchers("/qc/casesEntryHospital/findQcCasesEntry").permitAll()
+                .antMatchers("/qc/dataimport/import").permitAll()
+                .antMatchers("/qc/dataimport/test").permitAll()
+                .antMatchers("/qc/behospitalInfo/exportExcel").permitAll()
+                .antMatchers("/qc/behospitalInfo/exportQcresult").permitAll()
+                .antMatchers("/qc/behospitalInfo/exportQcresultByDept").permitAll()
+                .antMatchers("/qc/behospitalInfo/exportQcresultByGroup").permitAll()
+                .antMatchers("/qc/abnormal/getQcAnnormalMode").permitAll()
+                .antMatchers("/qc/dataimport/import").permitAll()
+                .antMatchers("/qc/dataimport/dataimportPrepare").permitAll()
+                .antMatchers("/qc/dataimport/test").permitAll()
+                .antMatchers("/sys/user/pageset/getPageSet").permitAll()
+                .antMatchers("/sys/user/pageset/savePageSet").permitAll()
+                .antMatchers("/sys/user/pageset/getDefultPageSet").permitAll()
+                .antMatchers("/consoleByDept/getDept").permitAll()
+                .antMatchers("/console/entryRejectPercent").permitAll()
+                .antMatchers("/console/qcResultLevelPercent").permitAll()
+                .antMatchers("/console/averageStatistics").permitAll()
+                .antMatchers("/console/entryByDept").permitAll()
+                .antMatchers("/console/entryCountGroupByCase").permitAll()
+                .antMatchers("/console/entryCountGroupByCasePage").permitAll()
+                .antMatchers("/console/entryCountGroupByEntry").permitAll()
+                .antMatchers("/console/entryCountGroupByEntryPage").permitAll()
+                .antMatchers("/console/entryGroupByEntryInnerPage").permitAll()
+                .antMatchers("/console/getAverageDayNum").permitAll()
+                .antMatchers("/console/getAverageDayNumPage").permitAll()
+                .antMatchers("/console/getAverageFee").permitAll()
+                .antMatchers("/console/getAverageFeePage").permitAll()
+                .antMatchers("/console/getAverageScore").permitAll()
+                .antMatchers("/console/getAverageScoreByDeptClass").permitAll()
+                .antMatchers("/console/getAverageScoreByDeptPage").permitAll()
+                .antMatchers("/console/getLevelResultDept").permitAll()
+                .antMatchers("/console/homePageLevelLimit").permitAll()
+                .antMatchers("/console/homePageLevelStatistics").permitAll()
+                .antMatchers("/console/leaveHosCount").permitAll()
+                .antMatchers("/console/medicalRecordIndicator").permitAll()
+                .antMatchers("/console/codingMonthly").permitAll()
+                .antMatchers("/console/levelPercentGroupByDeptPage").permitAll()
+                .antMatchers("/console/levelStatistics").permitAll()
+                .antMatchers("/console/levelStatisticsByDeptClass").permitAll()
+                .antMatchers("/console/mrCount").permitAll()
+                .antMatchers("/console/mrStatistics").permitAll()
+                .antMatchers("/console/qcResultShortPage").permitAll()
+                .antMatchers("/console/resultStatistics").permitAll()
+                .antMatchers("/console/resultStatisticsByDeptPage").permitAll()
+                .antMatchers("/console/homePageMRCount").permitAll()
+                .antMatchers("/console/qcCheckStatistics").permitAll()
+                .antMatchers("/console/unModifyMRStatistics").permitAll()
+                .antMatchers("/console/unModifyMRPage").permitAll()
+                .antMatchers("/console/reHos31DaysPage").permitAll()
+                .antMatchers("/console/beHosCount").permitAll()
+                .antMatchers("/console/casesEntryStatisticsById").permitAll()
+                .antMatchers("/console/hmImproveMRPage").permitAll()
+                .antMatchers("/console/qcCheckMRPage").permitAll()
+                .antMatchers("/consoleByDept/entryCountGroupByCaseAndDept").permitAll()
+                .antMatchers("/consoleByDept/entryCountGroupByCaseAndDeptPage").permitAll()
+                .antMatchers("/consoleByDept/entryCountGroupByEntryAndDept").permitAll()
+                .antMatchers("/consoleByDept/entryCountGroupByEntryAndDeptPage").permitAll()
+                .antMatchers("/consoleByDept/entryGroupByEntryAndDeptInnerPage").permitAll()
+                .antMatchers("/consoleByDept/homePageLevelByDeptLimit").permitAll()
+                .antMatchers("/consoleByDept/homePageLevelStatisticsByDept").permitAll()
+                .antMatchers("/consoleByDept/leaveHosCountByDept").permitAll()
+                .antMatchers("/consoleByDept/levelStatisticsByDept").permitAll()
+                .antMatchers("/consoleByDept/mrCountByDept").permitAll()
+                .antMatchers("/consoleByDept/qcResultShortByDeptPage").permitAll()
+                .antMatchers("/consoleByDept/levelStatisticsByDeptPage").permitAll()
+                .antMatchers("/consoleByDept/resultStatisticsByDeptAndDoctorPage").permitAll()
+                .antMatchers("/console/export/homePageLevelExport").permitAll()
+                .antMatchers("/console/export/entryGroupByEntryExport").permitAll()
+                .antMatchers("/console/export/levelExport").permitAll()
+                .antMatchers("/console/entryStatistics").permitAll()
+                .antMatchers("/console/export/levelExport_TZ").permitAll()
+                .antMatchers("/console/export/getAverageDayNumExport").permitAll()
+                .antMatchers("/console/export/getAverageFeeExport").permitAll()
+                .antMatchers("/console/export/levelPercentGroupByDeptExport").permitAll()
+                .antMatchers("/console/export/entryCountGroupByEntryExport").permitAll()
+                .antMatchers("/console/export/entryCountGroupByCaseExport").permitAll()
+                .antMatchers("/console/export/entryStatisticsExport").permitAll()
+                .antMatchers("/console/export/sjcfStatisticsExport").permitAll()
+                .antMatchers("/console/export/qcResultShortPageExport").permitAll()
+                .antMatchers("/console/export/leaveHosMrPageExport").permitAll()
+                .antMatchers("/console/export/qcCheckStatisticsExport").permitAll()
+                .antMatchers("/console/export/unModifyMRPageExport").permitAll()
+                .antMatchers("/console/export/unModifyMRStatisticsExport").permitAll()
+                .antMatchers("/console/export/reHos31DaysPageExport").permitAll()
+                .antMatchers("/console/export/hmImproveMRPageExport").permitAll()
+                .antMatchers("/console/export/qcCheckMRPageExport").permitAll()
+                .antMatchers("/qc/data/sendDoctorInfos").permitAll()
+                .antMatchers("/qc/data/sendDeptInfos").permitAll()
+                .antMatchers("/qc/data/sendRecordTypes").permitAll()
+                .antMatchers("/qc/data/sendMrRecordIng").permitAll()
+                .antMatchers("/qc/data/sendMrContent").permitAll()
+                .antMatchers("/qc/data/sendMrRecord").permitAll()
+                .antMatchers("/qc/data/sendPatientInfo").permitAll()
+                .antMatchers("/qc/data/sendDoctorAdvice").permitAll()
+                .antMatchers("/qc/data/sendHomePageIng").permitAll()
+                .antMatchers("/qc/data/sendHomePage").permitAll()
+                .antMatchers("/qc/data/sendHomeDiagnose").permitAll()
+                .antMatchers("/qc/data/sendHomeOperation").permitAll()
+                .antMatchers("/qc/data/sendCrisis").permitAll()
+                .antMatchers("/qc/data/deleteFlag").permitAll()
+                .antMatchers("/qc/data/sendPacsInfos").permitAll()
+                .antMatchers("/qc/data/sendLisInfos").permitAll()
+                .antMatchers("/qc/data/placeFile").permitAll()
+                .antMatchers("/qc/data/sendLisResults").permitAll()
+                .antMatchers("/qc/data/sendPacsResults").permitAll()
+                .antMatchers("/qc/data/getColumnZhAndCh").permitAll()
+                .antMatchers("/qc/data/analyseRec").permitAll()
+                .antMatchers("/qc/data/hisDataDeal").permitAll()
+                .antMatchers("/qc/data/sendDataDeal").permitAll()
+                .antMatchers("/qc/data/sendDataDealOne").permitAll()
+                .antMatchers("/qc/data/documentEncryption").permitAll()
+                .antMatchers("/qc/data_str/sendAdmissionNote").permitAll()
+                .antMatchers("/qc/data_str/sendBloodResult").permitAll()
+                .antMatchers("/qc/data_str/sendBloodTransfusion").permitAll()
+                .antMatchers("/qc/data_str/sendConsultationApply").permitAll()
+                .antMatchers("/qc/data_str/sendConsultationNote").permitAll()
+                .antMatchers("/qc/data_str/sendConsultationRecord").permitAll()
+                .antMatchers("/qc/data_str/sendConsultationResult").permitAll()
+                .antMatchers("/qc/data_str/sendCrisisNote").permitAll()
+                .antMatchers("/qc/data_str/sendDeathDiscussion").permitAll()
+                .antMatchers("/qc/data_str/sendDeathNote").permitAll()
+                .antMatchers("/qc/data_str/sendDifficultCase").permitAll()
+                .antMatchers("/qc/data_str/sendFirstRecord").permitAll()
+                .antMatchers("/qc/data_str/sendIllCritically").permitAll()
+                .antMatchers("/qc/data_str/sendIllSeriousl").permitAll()
+                .antMatchers("/qc/data_str/sendLeaveHospital").permitAll()
+                .antMatchers("/qc/data_str/sendOperativeFirstRecord").permitAll()
+                .antMatchers("/qc/data_str/sendOperativeNote").permitAll()
+                .antMatchers("/qc/data_str/sendWardRecord").permitAll()
+                .antMatchers("/qc/data_str/sendTransferOutNote").permitAll()
+                .antMatchers("/qc/data_str/sendTransferInNote").permitAll()
+                .antMatchers("/qc/data_str/sendRescueNote").permitAll()
+                .antMatchers("/qc/data_str/sendPeriodConclusion").permitAll()
+                .antMatchers("/qc/data_str/sendPreoperativeDiscussion").permitAll()
+                .antMatchers("/qc/data_str/sendTalkInform").permitAll()
+                .antMatchers("/qc/data_str/sendInformedConsent").permitAll()
+                .antMatchers("/qc/data_str/sendContent").permitAll()
+                .antMatchers("/qc/doctoradvice/getPage").permitAll()
+                .antMatchers("/qc/medPacsInfo/getCheckPage").permitAll()
+                .antMatchers("/qc/medLisInfo/getExaminePage").permitAll()
+                .antMatchers("/qc/medLisInfo/getExamineSonPage").permitAll()
+                .antMatchers("/console/medicalCheckForm").permitAll()
+                .antMatchers("/qc/behospitalInfo/analyzeCds").permitAll()
+                .antMatchers("/console/medicalCheckTitle").permitAll()
+                .antMatchers("/console/export/medicalCheckExport").permitAll()
+                .antMatchers("/console/export/medicalCheckInnerExport").permitAll()
+                .antMatchers("/console/badLevelPage").permitAll()
+                .antMatchers("/console/export/badLevelPagePageExport").permitAll()
+                .antMatchers("/qc/medNurse/getMedNursePage").permitAll()
+                .antMatchers("/qc/medRecordOther/getMedRecordOtherPage").permitAll()
+                .antMatchers("/qc/medRecordOther/getMedRecordContentOther").permitAll()
+                .antMatchers("/qc/behospitalInfo/exportQcresultByPerson").permitAll()
+                .antMatchers("/consoleByDept/beHosCountByDept").permitAll()
+                .antMatchers("/consoleByDept/casesEntryStatisticsByDept").permitAll()
+                .antMatchers("/bas/doctor/getList").permitAll()
+                .antMatchers("/bas/doctor/getRegionAndMedoupList").permitAll()
+                .antMatchers("/consoleByDept/homePageOrGoodLevelByDept").permitAll()
+                .antMatchers("/print/export/homePageLevelExportByDept").permitAll()
+                .antMatchers("/print/export/homePageOrLevelExportByDept").permitAll()
+                .antMatchers("/print/export/levelStatisticsExportByDept").permitAll()
+                .antMatchers("/print/export/entryGroupExportByDeptPage").permitAll()
+                .antMatchers("/print/export/entryGroupExportByDeptCase").permitAll()
+                .antMatchers("/print/export/entryGroupExportByDeptEntry").permitAll()
+                .antMatchers("/print/export/qcResultShortExportByDeptPage").permitAll()
+                .antMatchers("/print/export/levelExportByDept").permitAll()
+                .antMatchers("/consoleByDept/entryStatisticsByDept").permitAll()
+                .antMatchers("/print/export/entryStatisticsExportByDept").permitAll()
+                .antMatchers("/consoleByDept/leaveHosMRPageByDept").permitAll()
+                .antMatchers("/print/export/leaveHosMrPageExportByDept").permitAll()
+                .antMatchers("/consoleByDept/qcCheckStatisticsByDept").permitAll()
+                .antMatchers("/print/export/qcCheckStaExportByDept").permitAll()
+                .antMatchers("/consoleByDept/qcCheckMRPageByDept").permitAll()
+                .antMatchers("/print/export/qcCheckMRPageExportByDept").permitAll()
+                .antMatchers("/consoleByDept/hmImproveMRPageByDept").permitAll()
+                .antMatchers("/print/export/improveMRExportByDept").permitAll()
+                .antMatchers("/consoleByDept/reHos31DaysPageByDept").permitAll()
+                .antMatchers("/print/export/reHos31DaysPageExportByDept").permitAll()
+                .antMatchers("/consoleByDept/unModifyMRSByDept").permitAll()
+                .antMatchers("/print/export/unModifyMRSExportByDept").permitAll()
+                .antMatchers("/consoleByDept/unModifyMRPageByDept").permitAll()
+                .antMatchers("/print/export/unModifyMRPageExportByDept").permitAll()
+                .antMatchers("/consoleByDept/medicalCheckFormKs").permitAll()
+                .antMatchers("/print/export/medicalCheckExportByDept").permitAll()
+                .antMatchers("/consoleByDept/medicalCheckTitleKs").permitAll()
+                .antMatchers("/console/qualityControl").permitAll()
+                .antMatchers("/console/export/qualityControlExport").permitAll()
+                .antMatchers("/consoleByDept/qualityControlByDept").permitAll()
+                .antMatchers("/print/export/qualityControlExportByDept").permitAll()
+                .antMatchers("/qc/behospitalInfo/getMedQualityCoList").permitAll()
+                .antMatchers("/console/saveMedicaIndicator").permitAll()
+                .antMatchers("/qc/medCheckInfo/createMedBeHospitalInfoType").permitAll()
+                .antMatchers("/qc/medCheckWork/getLocalRegionMedoup").permitAll()
+                .antMatchers("/qc/medCheckInfo/addMedCheckInfo").permitAll()
+                .antMatchers("/qc/medCheckInfo/getDataEdit").permitAll()
+                .antMatchers("/qc/medCheckInfo/saveDataEdit").permitAll()
+                .antMatchers("/**").authenticated();
+        //                .antMatchers("/**").permitAll();
+    }
+    @Override
+    public void configure(ResourceServerSecurityConfigurer resources) throws Exception {
+        log.info("Configuring ResourceServerSecurityConfigurer");
+        resources.resourceId("user-service").tokenStore(new MyJwtTokenStore(jwtTokenEnhancerClient(),redisUtils));
+        resources.authenticationEntryPoint(authExceptionEntryPoint);
+        resources.accessDeniedHandler(accessDeniedExceptionPoint);
+    }
+    @Autowired
+    private CustomAccessTokenConverter customAccessTokenConverter;
+
+    @Bean("jwtTokenEnhancerClient")
+    protected JwtAccessTokenConverter jwtTokenEnhancerClient() {
+        JwtAccessTokenConverter converter = new JwtAccessTokenConverter();
+        Resource resource = new ClassPathResource("public.cert");
+        String publicKey;
+        try {
+            publicKey = new String(FileCopyUtils.copyToByteArray(resource.getInputStream()));
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+        converter.setVerifierKey(publicKey);
+        //不设置这个会出现 Cannot convert access token to JSON
+        converter.setVerifier(new RsaVerifier(publicKey));
+        converter.setAccessTokenConverter(customAccessTokenConverter);
+        log.info("Created jwtTokenEnhancerClient success");
+        return converter;
+    }
+}

+ 70 - 0
src/main/java/com/diagbot/config/SwaggerConfigurer.java

@@ -0,0 +1,70 @@
+package com.diagbot.config;
+
+
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.ParameterBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.schema.ModelRef;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.Contact;
+import springfox.documentation.service.Parameter;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * @Description: Swagger配置类
+ * @author: gaodm
+ * @time: 2018/8/2 14:21
+ */
+@Configuration
+@ConditionalOnProperty(prefix = "swagger", value = { "enable" }, havingValue = "true")
+@EnableSwagger2
+public class SwaggerConfigurer {
+    /**
+     * 全局参数
+     *
+     * @return
+     */
+    private List<Parameter> parameter() {
+        List<Parameter> params = new ArrayList<>();
+        params.add(new ParameterBuilder().name("Authorization")
+                .description("Authorization Bearer token")
+                .modelRef(new ModelRef("string"))
+                .parameterType("header")
+                .required(false).build());
+        return params;
+    }
+
+
+    @Bean
+    public Docket sysApi() {
+        return new Docket(DocumentationType.SWAGGER_2)
+                .apiInfo(apiInfo())
+                .select()
+                .apis(RequestHandlerSelectors.basePackage("com.diagbot.web"))
+                .paths(PathSelectors.any())
+                .build().globalOperationParameters(parameter());
+        //.securitySchemes(newArrayList(oauth()))
+        // .securityContexts(newArrayList(securityContext()));
+    }
+
+    private ApiInfo apiInfo() {
+        return new ApiInfoBuilder()
+                .title("病案首页质控系统 api ")
+                .description("病案首页质控系统服务")
+                .termsOfServiceUrl("")
+                .contact(new Contact("diagbot","",""))
+                .version("1.0")
+                .build();
+    }
+
+}

+ 69 - 0
src/main/java/com/diagbot/config/WebSecurityConfigurer.java

@@ -0,0 +1,69 @@
+package com.diagbot.config;
+
+import com.diagbot.service.UrlUserService;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.authentication.AuthenticationManager;
+import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
+import org.springframework.security.core.AuthenticationException;
+import org.springframework.security.crypto.factory.PasswordEncoderFactories;
+import org.springframework.security.crypto.password.PasswordEncoder;
+import org.springframework.security.web.AuthenticationEntryPoint;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * @Description: WebSecurity配置类
+ * @author: gaodm
+ * @time: 2018/8/2 14:24
+ */
+@Configuration
+class WebSecurityConfigurer extends WebSecurityConfigurerAdapter {
+
+    @Override
+    @Bean
+    public AuthenticationManager authenticationManagerBean() throws Exception {
+        return super.authenticationManagerBean();
+    }
+
+    @Override
+    protected void configure(HttpSecurity http) throws Exception {
+        //CSRF:因为不再依赖于Cookie,所以你就不需要考虑对CSRF(跨站请求伪造)的防范。
+        http
+                .csrf().disable()
+                .exceptionHandling()
+                // .authenticationEntryPoint((request, response, authException) -> response.sendError(HttpServletResponse.SC_UNAUTHORIZED))
+                .authenticationEntryPoint(new AuthenticationEntryPoint() {
+                    @Override
+                    public void commence(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, AuthenticationException e) throws IOException, ServletException {
+                        httpServletResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED);
+                    }
+                })
+                .and()
+                .authorizeRequests()
+                .regexMatchers("/actuator.*").permitAll()
+                .antMatchers("/**").authenticated()
+                .and()
+                .httpBasic();
+    }
+
+    @Bean
+    UrlUserService urlUserService() {
+        return new UrlUserService();
+    }
+
+    @Bean
+    public PasswordEncoder passwordEncoder() {
+        return PasswordEncoderFactories.createDelegatingPasswordEncoder();
+    }
+
+    @Override
+    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
+        auth.userDetailsService(urlUserService()).passwordEncoder(passwordEncoder());
+    }
+}

+ 368 - 0
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -0,0 +1,368 @@
+package com.diagbot.config.security;
+
+import com.diagbot.exception.CommonException;
+import com.diagbot.exception.ServiceErrorCode;
+import com.diagbot.facade.TokenFacade;
+import com.diagbot.util.HttpUtils;
+import com.diagbot.util.StringUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.AccessDecisionManager;
+import org.springframework.security.access.AccessDeniedException;
+import org.springframework.security.access.ConfigAttribute;
+import org.springframework.security.authentication.AccountExpiredException;
+import org.springframework.security.authentication.InsufficientAuthenticationException;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.web.FilterInvocation;
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Collection;
+
+/**
+ * @Description: 自定义权限拦截
+ * @author: gaodm
+ * @time: 2018/8/23 13:46
+ */
+@Service
+public class UrlAccessDecisionManager implements AccessDecisionManager {
+    @Autowired
+    private TokenFacade tokenFacade;
+
+    @Override
+    public void decide(Authentication authentication, Object object, Collection<ConfigAttribute> configAttributes) throws AccessDeniedException, InsufficientAuthenticationException {
+        HttpServletRequest request = ((FilterInvocation) object).getHttpRequest();
+        String url, method;
+        String tokenStr = HttpUtils.getHeaders(request).get("Authorization");
+        if (!request.getMethod().equals("OPTIONS") && StringUtil.isEmpty(tokenStr)) {
+            tokenStr = HttpUtils.getHeaders(request).get("authorization");
+        }
+        //用户是否被顶掉校验
+        if (StringUtil.isNotEmpty(tokenStr) && !matchNotCheckUrl(request)) {
+            tokenStr = tokenStr.replaceFirst("Bearer ", "");
+            int res = tokenFacade.newVerifyToken(tokenStr, 1);
+            if (-1 == res) {
+                throw new CommonException(ServiceErrorCode.LONGIN_ERROE);
+            } else if (-2 == res) {
+                throw new CommonException(ServiceErrorCode.USER_POWER_UP);
+            }
+        }
+        if (matchPermitAllUrl(request)) {
+            return;
+        }
+        if ("anonymousUser".equals(authentication.getPrincipal())) {
+            throw new AccessDeniedException("no right");
+        } else {
+            if (StringUtil.isNotEmpty(tokenStr)) {
+                tokenStr = tokenStr.replaceFirst("Bearer ", "");
+//                Boolean res = tokenFacade.verifyToken(tokenStr, 1);
+                int res = tokenFacade.newVerifyToken(tokenStr, 1);
+                if (-1 == res) {
+                    throw new CommonException(ServiceErrorCode.LONGIN_ERROE);
+                } else if (1 != res) {
+                    throw new AccountExpiredException("token expire");
+                }
+            }
+            for (GrantedAuthority ga : authentication.getAuthorities()) {
+                String[] authority = ga.getAuthority().split(";");
+                url = authority[0];
+                method = authority[1];
+                if (matchers(url, request)) {
+                    if (method.equals(request.getMethod()) || "ALL".equals(method)) {
+                        return;
+                    }
+                }
+            }
+        }
+        throw new AccessDeniedException("无接口访问权限!");
+    }
+
+    private boolean matchNotCheckUrl(HttpServletRequest request) {
+        if (matchers("/swagger/**", request)
+                || matchers("/v2/**", request)
+                || matchers("/swagger-ui.html/**", request)
+                || matchers("/swagger-resources/**", request)
+                || matchers("/webjars/**", request)
+                || matchers("/druid/**", request)
+                || matchers("/actuator/**", request)
+                || matchers("/hystrix/**", request)
+                || matchers("/sys/user/getJwt", request)
+                || matchers("/sys/user/logout", request)
+                || matchers("/sys/user/getCaptcha", request)
+                || matchers("/sys/user/getHospitalMark", request)
+                || matchers("/sys/user/getJwtNoPass", request)
+                || matchers("/sys/user/refreshJwt", request)
+                || matchers("/sys/dictionaryInfo/getDictionary", request)
+                || matchers("/sys/user/checkToken", request)
+                || matchers("/oauth/token", request)
+                || matchers("/oauth/check_token", request)
+                || matchers("/cache/clear", request)) {
+            return true;
+        }
+        return false;
+    }
+
+    @Override
+    public boolean supports(ConfigAttribute attribute) {
+        return true;
+    }
+
+    @Override
+    public boolean supports(Class<?> clazz) {
+        return true;
+    }
+
+    private Boolean matchPermitAllUrl(HttpServletRequest request) {
+        if (matchers("/swagger/**", request)
+                || matchers("/v2/**", request)
+                || matchers("/swagger-ui.html/**", request)
+                || matchers("/swagger-resources/**", request)
+                || matchers("/webjars/**", request)
+                || matchers("/druid/**", request)
+                || matchers("/actuator/**", request)
+                || matchers("/hystrix/**", request)
+                || matchers("/sys/user/getJwt", request)
+                || matchers("/sys/user/logout", request)
+                || matchers("/sys/user/unlock", request)
+                || matchers("/sys/user/getCaptcha", request)
+                || matchers("/sys/user/getHospitalMark", request)
+                || matchers("/sys/user/getJwtNoPass", request)
+                || matchers("/sys/user/refreshJwt", request)
+                || matchers("/sys/dictionaryInfo/getDictionary", request)
+                || matchers("/sys/user/checkToken", request)
+                || matchers("/oauth/token", request)
+                || matchers("/oauth/check_token", request)
+                || matchers("/cache/clear", request)
+                || matchers("/qc/behospitalInfo/execule", request)
+                || matchers("/qc/behospitalInfo/analyze_rpc", request)
+                || matchers("/qc/behospitalInfo/analyze_api", request)
+                || matchers("/qc/behospitalInfo/analyze_run", request)
+                || matchers("/qc/behospitalInfo/sendRuleWarn", request)
+                || matchers("/qc/behospitalInfo/checkRule", request)
+                || matchers("/qc/behospitalInfo/upState", request)
+                || matchers("/qc/behospitalInfo/delState", request)
+                || matchers("/qc/module/getById", request)
+                || matchers("/qc/module/getModuleMap", request)
+                || matchers("/qc/cases/getQcCases", request)
+                || matchers("/qc/behospitalInfo/page", request)
+                || matchers("/qc/casesEntryHospital/getQcCasesEntryAll", request)
+                || matchers("/qc/casesEntryHospital/getQcCasesAll", request)
+                || matchers("/qc/behospitalInfo/getByBehospitalCode", request)
+                || matchers("/bas/dept/getList", request)
+                || matchers("/bas/dept/getListUser", request)
+                || matchers("/qc/behospitalInfo/page_dept", request)
+                || matchers("/qc/behospitalInfo/page_person", request)
+                || matchers("/qc/behospitalInfo/page_group", request)
+                || matchers("/qc/casesEntryHospital/findQcCasesEntry", request)
+                || matchers("/qc/behospitalInfo/exportExcel", request)
+                || matchers("/qc/dataimport/import", request)
+                || matchers("/qc/dataimport/test", request)
+                || matchers("/qc/behospitalInfo/exportExcel", request)
+                || matchers("/qc/behospitalInfo/exportQcresult", request)
+                || matchers("/qc/behospitalInfo/exportQcresultByDept", request)
+                || matchers("/qc/behospitalInfo/exportQcresultByGroup", request)
+                || matchers("/qc/abnormal/getQcAnnormalMode", request)
+                || matchers("/qc/dataimport/import", request)
+                || matchers("/qc/dataimport/dataimportPrepare", request)
+                || matchers("/qc/dataimport/test", request)
+                || matchers("/sys/user/pageset/getPageSet", request)
+                || matchers("/sys/user/pageset/savePageSet", request)
+                || matchers("/sys/user/pageset/getDefaultPageSet", request)
+                || matchers("/consoleByDept/getDept", request)
+                || matchers("/console/entryRejectPercent", request)
+                || matchers("/console/qcResultLevelPercent", request)
+                || matchers("/console/averageStatistics", request)
+                || matchers("/console/entryByDept", request)
+                || matchers("/console/entryCountGroupByCase", request)
+                || matchers("/console/entryCountGroupByCasePage", request)
+                || matchers("/console/entryCountGroupByEntry", request)
+                || matchers("/console/entryCountGroupByEntryPage", request)
+                || matchers("/console/entryGroupByEntryInnerPage", request)
+                || matchers("/console/getAverageDayNum", request)
+                || matchers("/console/getAverageDayNumPage", request)
+                || matchers("/console/getAverageFee", request)
+                || matchers("/console/getAverageFeePage", request)
+                || matchers("/console/getAverageScore", request)
+                || matchers("/console/getAverageScoreByDeptClass", request)
+                || matchers("/console/getAverageScoreByDeptPage", request)
+                || matchers("/console/getLevelResultDept", request)
+                || matchers("/console/homePageLevelLimit", request)
+                || matchers("/console/homePageLevelStatistics", request)
+                || matchers("/console/leaveHosCount", request)
+                || matchers("/console/levelPercentGroupByDeptPage", request)
+                || matchers("/console/levelStatistics", request)
+                || matchers("/console/levelStatisticsByDeptClass", request)
+                || matchers("/console/mrCount", request)
+                || matchers("/console/mrStatistics", request)
+                || matchers("/console/medicalRecordIndicator", request)
+                || matchers("/console/codingMonthly", request)
+                || matchers("/console/qcResultShortPage", request)
+                || matchers("/console/resultStatistics", request)
+                || matchers("/console/resultStatisticsByDeptPage", request)
+                || matchers("/console/homePageMRCount", request)
+                || matchers("/console/qcCheckStatistics", request)
+                || matchers("/console/unModifyMRStatistics", request)
+                || matchers("/console/unModifyMRPage", request)
+                || matchers("/console/reHos31DaysPage", request)
+                || matchers("/console/beHosCount", request)
+                || matchers("/console/casesEntryStatisticsById", request)
+                || matchers("/console/hmImproveMRPage", request)
+                || matchers("/console/qcCheckMRPage", request)
+                || matchers("/consoleByDept/entryCountGroupByCaseAndDept", request)
+                || matchers("/consoleByDept/entryCountGroupByCaseAndDeptPage", request)
+                || matchers("/consoleByDept/entryCountGroupByEntryAndDept", request)
+                || matchers("/consoleByDept/entryCountGroupByEntryAndDeptPage", request)
+                || matchers("/consoleByDept/entryGroupByEntryAndDeptInnerPage", request)
+                || matchers("/consoleByDept/homePageLevelByDeptLimit", request)
+                || matchers("/consoleByDept/homePageLevelStatisticsByDept", request)
+                || matchers("/consoleByDept/leaveHosCountByDept", request)
+                || matchers("/consoleByDept/levelStatisticsByDept", request)
+                || matchers("/consoleByDept/mrCountByDept", request)
+                || matchers("/consoleByDept/qcResultShortByDeptPage", request)
+                || matchers("/consoleByDept/levelStatisticsByDeptPage", request)
+                || matchers("/consoleByDept/resultStatisticsByDeptAndDoctorPage", request)
+                || matchers("/console/export/homePageLevelExport", request)
+                || matchers("/console/export/entryGroupByEntryExport", request)
+                || matchers("/console/export/levelExport", request)
+                || matchers("/console/entryStatistics", request)
+                || matchers("/console/export/levelExport_TZ", request)
+                || matchers("/console/export/getAverageDayNumExport", request)
+                || matchers("/console/export/getAverageFeeExport", request)
+                || matchers("/console/export/levelPercentGroupByDeptExport", request)
+                || matchers("/console/export/entryCountGroupByEntryExport", request)
+                || matchers("/console/export/entryCountGroupByCaseExport", request)
+                || matchers("/console/export/entryStatisticsExport", request)
+                || matchers("/console/export/sjcfStatisticsExport", request)
+                || matchers("/console/export/qcResultShortPageExport", request)
+                || matchers("/console/export/leaveHosMrPageExport", request)
+                || matchers("/console/export/qcCheckStatisticsExport", request)
+                || matchers("/console/export/unModifyMRPageExport", request)
+                || matchers("/console/export/unModifyMRStatisticsExport", request)
+                || matchers("/console/export/reHos31DaysPageExport", request)
+                || matchers("/console/export/hmImproveMRPageExport", request)
+                || matchers("/console/export/qcCheckMRPageExport", request)
+                || matchers("/qc/data/sendDoctorInfos", request)
+                || matchers("/qc/data/sendDeptInfos", request)
+                || matchers("/qc/data/sendRecordTypes", request)
+                || matchers("/qc/data/sendMrRecordIng", request)
+                || matchers("/qc/data/sendMrContent", request)
+                || matchers("/qc/data/sendMrRecord", request)
+                || matchers("/qc/data/sendPatientInfo", request)
+                || matchers("/qc/data/sendDoctorAdvice", request)
+                || matchers("/qc/data/sendHomePageIng", request)
+                || matchers("/qc/data/sendHomePage", request)
+                || matchers("/qc/data/sendHomeDiagnose", request)
+                || matchers("/qc/data/sendHomeOperation", request)
+                || matchers("/qc/data/sendCrisis", request)
+                || matchers("/qc/data/deleteFlag", request)
+                || matchers("/qc/data/placeFile", request)
+                || matchers("/qc/data/sendLisResults", request)
+                || matchers("/qc/data/sendPacsResults", request)
+                || matchers("/qc/data/sendPacsInfos", request)
+                || matchers("/qc/data/sendLisInfos", request)
+                || matchers("/qc/data/getColumnZhAndCh", request)
+                || matchers("/qc/data/analyseRec", request)
+                || matchers("/qc/data/hisDataDeal", request)
+                || matchers("/qc/data/sendDataDeal", request)
+                || matchers("/qc/data/sendDataDealOne", request)
+                || matchers("/qc/data/documentEncryption", request)
+                || matchers("/qc/data_str/sendAdmissionNote", request)
+                || matchers("/qc/data_str/sendBloodResult", request)
+                || matchers("/qc/data_str/sendBloodTransfusion", request)
+                || matchers("/qc/data_str/sendConsultationApply", request)
+                || matchers("/qc/data_str/sendConsultationNote", request)
+                || matchers("/qc/data_str/sendConsultationRecord", request)
+                || matchers("/qc/data_str/sendConsultationResult", request)
+                || matchers("/qc/data_str/sendCrisisNote", request)
+                || matchers("/qc/data_str/sendDeathDiscussion", request)
+                || matchers("/qc/data_str/sendDeathNote", request)
+                || matchers("/qc/data_str/sendDifficultCase", request)
+                || matchers("/qc/data_str/sendFirstRecord", request)
+                || matchers("/qc/data_str/sendIllCritically", request)
+                || matchers("/qc/data_str/sendIllSeriousl", request)
+                || matchers("/qc/data_str/sendLeaveHospital", request)
+                || matchers("/qc/data_str/sendOperativeFirstRecord", request)
+                || matchers("/qc/data_str/sendOperativeNote", request)
+                || matchers("/qc/data_str/sendWardRecord", request)
+                || matchers("/qc/data_str/sendTransferOutNote", request)
+                || matchers("/qc/data_str/sendTransferInNote", request)
+                || matchers("/qc/data_str/sendRescueNote", request)
+                || matchers("/qc/data_str/sendPeriodConclusion", request)
+                || matchers("/qc/data_str/sendPreoperativeDiscussion", request)
+                || matchers("/qc/data_str/sendTalkInform", request)
+                || matchers("/qc/data_str/sendInformedConsent", request)
+                || matchers("/qc/data_str/sendContent", request)
+                || matchers("/qc/doctoradvice/getPage", request)
+                || matchers("/qc/medPacsInfo/getCheckPage", request)
+                || matchers("/qc/medLisInfo/getExaminePage", request)
+                || matchers("/qc/behospitalInfo/analyzeCds", request)
+                || matchers("/qc/medLisInfo/getExamineSonPage", request)
+                || matchers("/console/medicalCheckForm", request)
+                || matchers("/console/medicalCheckTitle", request)
+                || matchers("/console/export/medicalCheckExport", request)
+                || matchers("/console/export/medicalCheckInnerExport", request)
+                || matchers("/console/badLevelPage", request)
+                || matchers("/console/export/badLevelPagePageExport", request)
+                || matchers("/qc/medNurse/getMedNursePage", request)
+                || matchers("/qc/medRecordOther/getMedRecordOtherPage", request)
+                || matchers("/qc/medRecordOther/getMedRecordContentOther", request)
+                || matchers("/qc/behospitalInfo/exportQcresultByPerson", request)
+                || matchers("/consoleByDept/beHosCountByDept", request)
+                || matchers("/consoleByDept/casesEntryStatisticsByDept", request)
+                || matchers("/bas/doctor/getList", request)
+                || matchers("/bas/doctor/getRegionAndMedoupList", request)
+                || matchers("/consoleByDept/homePageOrGoodLevelByDept", request)
+                || matchers("/print/export/homePageLevelExportByDept", request)
+                || matchers("/print/export/homePageOrLevelExportByDept", request)
+                || matchers("/print/export/levelStatisticsExportByDept", request)
+                || matchers("/print/export/entryGroupExportByDeptPage", request)
+                || matchers("/print/export/entryGroupExportByDeptCase", request)
+                || matchers("/print/export/entryGroupExportByDeptEntry", request)
+                || matchers("/print/export/qcResultShortExportByDeptPage", request)
+                || matchers("/print/export/levelExportByDept", request)
+                || matchers("/consoleByDept/entryStatisticsByDept", request)
+                || matchers("/print/export/entryStatisticsExportByDept", request)
+                || matchers("/consoleByDept/leaveHosMRPageByDept", request)
+                || matchers("/print/export/leaveHosMrPageExportByDept", request)
+                || matchers("/consoleByDept/qcCheckStatisticsByDept", request)
+                || matchers("/print/export/qcCheckStaExportByDept", request)
+                || matchers("/consoleByDept/qcCheckMRPageByDept", request)
+                || matchers("/print/export/qcCheckMRPageExportByDept", request)
+                || matchers("/consoleByDept/hmImproveMRPageByDept", request)
+                || matchers("/print/export/improveMRExportByDept", request)
+                || matchers("/consoleByDept/reHos31DaysPageByDept", request)
+                || matchers("/print/export/reHos31DaysPageExportByDept", request)
+                || matchers("/consoleByDept/unModifyMRSByDept", request)
+                || matchers("/print/export/unModifyMRSExportByDept", request)
+                || matchers("/consoleByDept/unModifyMRPageByDept", request)
+                || matchers("/print/export/unModifyMRPageExportByDept", request)
+                || matchers("/consoleByDept/medicalCheckFormKs", request)
+                || matchers("/print/export/medicalCheckExportByDept", request)
+                || matchers("/consoleByDept/medicalCheckTitleKs", request)
+                || matchers("/console/qualityControl", request)
+                || matchers("/console/export/qualityControlExport", request)
+                || matchers("/consoleByDept/qualityControlByDept", request)
+                || matchers("/print/export/qualityControlExportByDept", request)
+                || matchers("/qc/behospitalInfo/getMedQualityCoList", request)
+                || matchers("/console/saveMedicaIndicator", request)
+                || matchers("/qc/medCheckInfo/createMedBeHospitalInfoType", request)
+                || matchers("/qc/medCheckWork/getLocalRegionMedoup", request)
+                || matchers("/qc/medCheckInfo/addMedCheckInfo", request)
+                || matchers("/qc/dataEdit/getDataEdit", request)
+                || matchers("/qc/dataEdit/saveDataEdit", request)
+                || matchers("/", request)) {
+            return true;
+        }
+        return false;
+    }
+
+
+    private boolean matchers(String url, HttpServletRequest request) {
+        AntPathRequestMatcher matcher = new AntPathRequestMatcher(url);
+        if (matcher.matches(request)) {
+            return true;
+        }
+        return false;
+    }
+}

+ 30 - 0
src/main/java/com/diagbot/config/security/UrlConfigAttribute.java

@@ -0,0 +1,30 @@
+package com.diagbot.config.security;
+
+import org.springframework.security.access.ConfigAttribute;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * @Description: 自定义权限拦截
+ * @author: gaodm
+ * @time: 2018/8/23 13:47
+ */
+public class UrlConfigAttribute implements ConfigAttribute {
+
+	private static final long serialVersionUID = 6871245426256786239L;
+	private final HttpServletRequest httpServletRequest;
+
+    public UrlConfigAttribute(HttpServletRequest httpServletRequest) {
+        this.httpServletRequest = httpServletRequest;
+    }
+
+
+    @Override
+    public String getAttribute() {
+        return null;
+    }
+
+    public HttpServletRequest getHttpServletRequest() {
+        return httpServletRequest;
+    }
+}

+ 91 - 0
src/main/java/com/diagbot/config/security/UrlFilterSecurityInterceptor.java

@@ -0,0 +1,91 @@
+package com.diagbot.config.security;
+
+import com.alibaba.fastjson.JSONObject;
+import com.diagbot.exception.CommonException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.SecurityMetadataSource;
+import org.springframework.security.access.intercept.AbstractSecurityInterceptor;
+import org.springframework.security.access.intercept.InterceptorStatusToken;
+import org.springframework.security.web.FilterInvocation;
+import org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import java.io.IOException;
+
+/**
+ * @Description: 自定义权限拦截
+ * @author: gaodm
+ * @time: 2018/8/23 13:47
+ */
+@Service
+public class UrlFilterSecurityInterceptor extends AbstractSecurityInterceptor implements Filter {
+
+
+    @Autowired
+    private FilterInvocationSecurityMetadataSource securityMetadataSource;
+
+    @Autowired
+    public void setUrlAccessDecisionManager(UrlAccessDecisionManager urlAccessDecisionManager) {
+        super.setAccessDecisionManager(urlAccessDecisionManager);
+    }
+
+
+    @Override
+    public void init(FilterConfig filterConfig) throws ServletException {
+
+    }
+
+    @Override
+    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
+
+        FilterInvocation fi = new FilterInvocation(request, response, chain);
+        try {
+            invoke(fi);
+        }catch (CommonException e)
+        {
+            JSONObject error = new JSONObject();
+            response.setContentType("text/html;charset=utf-8");
+            error.put("code",e.getCode());
+            error.put("msg", e.getMessage());
+            response.getWriter().println(error);
+            response.flushBuffer();
+        }
+    }
+
+
+    public void invoke(FilterInvocation fi) throws IOException, ServletException {
+        //fi里面有一个被拦截的url
+        //里面调用UrlMetadataSource的getAttributes(Object object)这个方法获取fi对应的所有权限
+        //再调用UrlAccessDecisionManager的decide方法来校验用户的权限是否足够
+        InterceptorStatusToken token = super.beforeInvocation(fi);
+        try {
+            //执行下一个拦截器
+            fi.getChain().doFilter(fi.getRequest(), fi.getResponse());
+        } finally {
+            super.afterInvocation(token, null);
+        }
+    }
+
+
+    @Override
+    public void destroy() {
+
+    }
+
+    @Override
+    public Class<?> getSecureObjectClass() {
+        return FilterInvocation.class;
+
+    }
+
+    @Override
+    public SecurityMetadataSource obtainSecurityMetadataSource() {
+        return this.securityMetadataSource;
+    }
+}

+ 40 - 0
src/main/java/com/diagbot/config/security/UrlMetadataSourceService.java

@@ -0,0 +1,40 @@
+package com.diagbot.config.security;
+
+import org.springframework.security.access.ConfigAttribute;
+import org.springframework.security.web.FilterInvocation;
+import org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @Description: 自定义权限拦截
+ * @author: gaodm
+ * @time: 2018/8/23 13:47
+ */
+@Service
+public class UrlMetadataSourceService implements
+        FilterInvocationSecurityMetadataSource {
+
+    @Override
+    public Collection<ConfigAttribute> getAttributes(Object object) throws IllegalArgumentException {
+        final HttpServletRequest request = ((FilterInvocation) object).getRequest();
+        Set<ConfigAttribute> allAttributes = new HashSet<>();
+        ConfigAttribute configAttribute = new UrlConfigAttribute(request);
+        allAttributes.add(configAttribute);
+        return allAttributes;
+    }
+
+    @Override
+    public Collection<ConfigAttribute> getAllConfigAttributes() {
+        return null;
+    }
+
+    @Override
+    public boolean supports(Class<?> clazz) {
+        return true;
+    }
+}

+ 25 - 0
src/main/java/com/diagbot/dto/AdmissionCountDTO.java

@@ -0,0 +1,25 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+
+/**
+ * @Description:
+ * @author: cy
+ * @time: 2024/12/24 13:07
+ */
+@Getter
+@Setter
+public class AdmissionCountDTO {
+    //医生id
+    private String doctorId;
+    //主管医生
+    private String doctorName;
+    //科室id
+    private String deptId;
+    //科室名称
+    private String deptName;
+    //总人数
+    private Integer num;
+}

+ 20 - 0
src/main/java/com/diagbot/dto/AlgorithmDTO.java

@@ -0,0 +1,20 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2024/4/14 13:07
+ */
+@Getter
+@Setter
+public class AlgorithmDTO {
+    //得分
+    private BigDecimal score;
+    //等级
+    private String level;
+}

+ 38 - 0
src/main/java/com/diagbot/dto/AnalyzeDTO.java

@@ -0,0 +1,38 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2024/4/15 12:24
+ */
+@Getter
+@Setter
+public class AnalyzeDTO {
+    // 病历id
+    private String behospitalCode;
+    //是否成功
+    private Boolean isSuccess;
+    //得分
+    private BigDecimal scoreRes;
+    //等级
+    private String level;
+    /**
+     * 评分类型(1:机器,2:人工)
+     */
+    private Integer gradeType;
+    /**
+     * 评分类型名称(1:机器,2:人工)
+     */
+    private String gradeTypeName;
+
+    /**
+     * 评分时间
+     */
+    private Date gradeTime;
+}

+ 28 - 0
src/main/java/com/diagbot/dto/AnalyzeRunDTO.java

@@ -0,0 +1,28 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: zhoutg
+ * @time: 2024/4/15 12:24
+ */
+@Getter
+@Setter
+public class AnalyzeRunDTO {
+    //得分
+    private BigDecimal scoreRes;
+    //等级
+    private String level;
+    //缺陷总数
+    private Long num;
+    //缺陷总扣分
+    private BigDecimal numScore;
+    // 缺陷条目
+    private List<MsgDTO> msgDTOList = new ArrayList<>();
+}

+ 31 - 0
src/main/java/com/diagbot/dto/AverageStatisticsDTO.java

@@ -0,0 +1,31 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2024/4/15 19:44
+ */
+@Getter
+@Setter
+public class AverageStatisticsDTO {
+    private String id;
+    @Excel(name = "科室", width = 30, orderNum = "1")
+    private String name;
+    private Integer num = 0;
+    private Integer sameNum = 0; //同期num
+    @Excel(name = "本年平均住院天数(天)", width = 15, orderNum = "2")
+    private Double averageValue = 0d;
+    private Double totleValue = 0d;
+    private Double sameTotleValue = 0d;
+    //环比平均值
+    @Excel(name = "去年平均住院天数(天)", width = 15, orderNum = "3")
+    private Double lastAverageValue = 0d;
+    //同比平均值
+    private Double lastYearAverageValue = 0d;
+    //科室分类
+    private String deptClass;
+}

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

@@ -0,0 +1,29 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2024/4/15 19:44
+ */
+@Getter
+@Setter
+public class AverageStatisticsFeeDTO {
+    private String id;
+    @Excel(name = "科室", width = 30, orderNum = "1")
+    private String name;
+    private Integer num;
+    @Excel(name = "本年平均住院花费(元)", width = 15, orderNum = "2")
+    private Double averageValue = 0d;
+    private Double totleValue = 0d;
+    //环比平均值
+    @Excel(name = "去年平均住院花费(元)", width = 15, orderNum = "3")
+    private Double lastAverageValue = 0d;
+    //同比平均值
+    private Double lastYearAverageValue = 0d;
+    //科室分类
+    private String deptClass;
+}

+ 30 - 0
src/main/java/com/diagbot/dto/AverageStatisticsFeeMonthDTO.java

@@ -0,0 +1,30 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2024/4/15 19:44
+ */
+@Getter
+@Setter
+public class AverageStatisticsFeeMonthDTO {
+    private String id;
+    @Excel(name = "科室", width = 30, orderNum = "1")
+    private String name;
+    private Integer num;
+    @Excel(name = "本月平均住院花费(元)", width = 15, orderNum = "2")
+    private Double averageValue = 0d;
+    private Double totleValue = 0d;
+    //环比平均值
+    @Excel(name = "上月平均住院花费(元)", width = 15, orderNum = "3")
+    private Double lastAverageValue = 0d;
+    //同比平均值
+    @Excel(name = "去年本月平均住院花费(元)", width = 15, orderNum = "4")
+    private Double lastYearAverageValue = 0d;
+    //科室分类
+    private String deptClass;
+}

+ 30 - 0
src/main/java/com/diagbot/dto/AverageStatisticsMonthDTO.java

@@ -0,0 +1,30 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2024/4/15 19:44
+ */
+@Getter
+@Setter
+public class AverageStatisticsMonthDTO {
+    private String id;
+    @Excel(name = "科室", width = 30, orderNum = "1")
+    private String name;
+    private Integer num;
+    @Excel(name = "本月平均住院天数(天)", width = 15, orderNum = "2")
+    private Double averageValue = 0d;
+    private Double totleValue = 0d;
+    //环比平均值
+    @Excel(name = "上月平均住院天数(天)", width = 15, orderNum = "3")
+    private Double lastAverageValue = 0d;
+    //同比平均值
+    @Excel(name = "去年本月平均住院天数(天)", width = 15, orderNum = "4")
+    private Double lastYearAverageValue = 0d;
+    //科室分类
+    private String deptClass;
+}

+ 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: 2024/4/27 18:56
+ */
+@Getter
+@Setter
+public class BasDeptInfoDTO {
+    /**
+     * 科室编码(HIS导入)
+     */
+    private String deptId;
+
+    /**
+     * 科室名称
+     */
+    private String deptName;
+}

+ 38 - 0
src/main/java/com/diagbot/dto/BasHospitalInfoDTO.java

@@ -0,0 +1,38 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2024/4/12 11:37
+ */
+@Getter
+@Setter
+public class BasHospitalInfoDTO {
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 医院名称
+     */
+    private String name;
+
+    /**
+     * 组织机构代码
+     */
+    private String code;
+
+    /**
+     * 医院名称拼音
+     */
+    private String spell;
+
+    /**
+     * 医院地址
+     */
+    private String address;
+}

+ 86 - 0
src/main/java/com/diagbot/dto/BehosDTO.java

@@ -0,0 +1,86 @@
+package com.diagbot.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 住院病历信息
+ * </p>
+ *
+ * @author zhoutg
+ * @time: 2024-04-13
+ */
+@Data
+public class BehosDTO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 病人住院ID
+     */
+    private String behospitalCode;
+
+    /**
+     * 姓名
+     */
+    private String name;
+
+    /**
+     * 性别
+     */
+    private String sex;
+
+    /**
+     * 出生日期
+     */
+    private Date birthday;
+
+    /**
+     * 档案号
+     */
+    private String fileCode;
+
+    /**
+     * 病区名称
+     */
+    private String wardName;
+
+    /**
+     * 住院科室名称
+     */
+    private String behDeptName;
+
+    /**
+     * 床位号
+     */
+    private String bedCode;
+
+    /**
+     * 入院时间
+     */
+    private Date behospitalDate;
+
+    /**
+     * 出院时间
+     */
+    private Date leaveHospitalDate;
+
+    /**
+     * 疾病名称
+     */
+    private String diagnose;
+
+    /**
+     * 医生姓名
+     */
+    private String doctorName;
+
+    /**
+     * 年龄
+     */
+    private String age;
+
+}

+ 28 - 0
src/main/java/com/diagbot/dto/BehospitalInfoAgeDTO.java

@@ -0,0 +1,28 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: wangsy
+ * @time: 2024/5/13 15:00
+ */
+@Getter
+@Setter
+public class BehospitalInfoAgeDTO {
+
+    /**
+     * 病人住院序号
+     */
+    private String behospitalCode;
+
+    /**
+     * 年龄
+     */
+    private String age;
+    private String ageYear;
+    private String ageMon;
+    private String ageDay;
+
+}

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

@@ -0,0 +1,134 @@
+package com.diagbot.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 住院病历信息
+ * </p>
+ *
+ * @author zhoutg
+ * @time: 2024-04-13
+ */
+@Data
+public class BehospitalInfoDTO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 病人住院ID
+     */
+    private String behospitalCode;
+
+    /**
+     * 姓名
+     */
+    private String name;
+
+    /**
+     * 性别
+     */
+    private String sex;
+
+    /**
+     * 出生日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date birthday;
+
+    /**
+     * 档案号
+     */
+    private String fileCode;
+
+    /**
+     * 病区名称
+     */
+    private String wardName;
+
+    /**
+     * 住院科室名称
+     */
+    private String behDeptName;
+
+    /**
+     * 床位号
+     */
+    private String bedCode;
+
+    /**
+     * 入院时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date behospitalDate;
+
+    /**
+     * 出院时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date leaveHospitalDate;
+
+    /**
+     * 疾病名称
+     */
+    private String diagnose;
+
+    /**
+     * 医生姓名
+     */
+    private String doctorName;
+
+    /**
+     * 年龄
+     */
+    private String age;
+
+    /**
+     * 病历等级
+     */
+    private String level;
+
+    /**
+     * 最后得分
+     */
+    private Double scoreRes;
+
+    /**
+     * 病案首页得分
+     */
+    private Double scoreBn;
+
+    /**
+     * 评分类型(1:机器,2:人工)
+     */
+    private String gradeType;
+
+    /**
+     * 评分时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date gradeTime;
+
+    private String directorDoctorName ;
+
+    private String behDoctorName;
+
+    /**
+     * 归档时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date placefileDate;
+
+    private Integer checkStatus;
+    private Integer mrStatus;
+    private String chName;
+    private String mrName;
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date chTime;
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date mrTime;
+}

+ 139 - 0
src/main/java/com/diagbot/dto/BehospitalInfoDeptDTO.java

@@ -0,0 +1,139 @@
+package com.diagbot.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 住院病历信息
+ * </p>
+ *
+ * @author zhoutg
+ * @time: 2024-04-13
+ */
+@Data
+public class BehospitalInfoDeptDTO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 病人住院ID
+     */
+    private String behospitalCode;
+
+    /**
+     * 姓名
+     */
+    private String name;
+
+    /**
+     * 性别
+     */
+    private String sex;
+
+    /**
+     * 出生日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date birthday;
+
+    /**
+     * 档案号
+     */
+    private String fileCode;
+
+    /**
+     * 病区名称
+     */
+    private String wardName;
+
+    /**
+     * 住院科室名称
+     */
+    private String behDeptName;
+
+    /**
+     * 医疗组
+     */
+    private String medoupName;
+
+    /**
+     * 床位号
+     */
+    private String bedCode;
+
+    /**
+     * 入院时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date behospitalDate;
+
+    /**
+     * 出院时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date leaveHospitalDate;
+
+    /**
+     * 疾病名称
+     */
+    private String diagnose;
+
+    /**
+     * 医生姓名
+     */
+    private String doctorName;
+
+    /**
+     * 年龄
+     */
+    private String age;
+
+    /**
+     * 病历等级
+     */
+    private String level;
+
+    /**
+     * 最后得分
+     */
+    private Double scoreRes;
+
+    /**
+     * 病案首页得分
+     */
+    private Double scoreBn;
+
+    /**
+     * 评分类型(1:机器,2:人工)
+     */
+    private String gradeType;
+
+    /**
+     * 评分时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date gradeTime;
+
+    private String directorDoctorName ;
+
+    private String behDoctorName;
+
+    /**
+     * 归档时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date placefileDate;
+
+    private Integer checkStatus;
+    private Integer mrStatus;
+    private String chName;
+    private String mrName;
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date chTime;
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date mrTime;
+}

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

@@ -0,0 +1,18 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2024/5/28 14:49
+ */
+@Getter
+@Setter
+public class CaseAndDeptNumDTO extends NumDTO {
+    private String deptId;
+    private String deptName;
+    private Long casesId;
+    private String casesName;
+}

+ 16 - 0
src/main/java/com/diagbot/dto/CaseNumDTO.java

@@ -0,0 +1,16 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2024/5/28 14:45
+ */
+@Getter
+@Setter
+public class CaseNumDTO extends NumDTO {
+    private Long casesId;
+    private String casesName;
+}

+ 40 - 0
src/main/java/com/diagbot/dto/CaseScoreDTO.java

@@ -0,0 +1,40 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: zhoutg
+ * @time: 2024/4/14 13:07
+ */
+@Getter
+@Setter
+public class CaseScoreDTO {
+
+    //得分
+    private Double score;
+    //提示信息
+    private String msg;
+    //提示信息
+    private String info;
+    //单项否决
+    private String isReject;
+    //模块名称
+    private String modelName;
+    //模块id
+    private String modelId;
+    private String behospitalCode;
+    //模块ID
+    private Long casesId;
+    //模块分数
+    private Double casesScore;
+    // 条目ID
+    private Long casesEntryId;
+
+}

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

@@ -0,0 +1,23 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Description: 核查科室输出类
+ * @Author:songxl
+ * @time: 2024/5/14 13:45
+ */
+@Getter
+@Setter
+public class CheckDeptDTO {
+    //科室id
+    private String deptId;
+    //科室名称
+    private String deptName;
+    //科室医疗组列表
+    private List<CheckMedoupDTO> checkMedoups = new ArrayList<>();
+}

+ 68 - 0
src/main/java/com/diagbot/dto/CheckInfoDTO.java

@@ -0,0 +1,68 @@
+package com.diagbot.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+import java.util.Date;
+
+/**
+ * @Description:
+ * @author: cy
+ * @time: 2024/9/03 15:00
+ */
+@Getter
+@Setter
+public class CheckInfoDTO {
+
+    /**
+     * 检查类型判别
+     */
+    private String checkItemType;
+
+    /**
+     * 检查项目名称
+     */
+    private String checkItemName;
+
+    /**
+     * 检查结果
+     */
+    private String checkResult;
+
+    /**
+     * 检查时间
+     */
+    private Date checkTime;
+
+    /**
+     * 报告时间
+     */
+    private Date reptTime;
+
+    /**
+     * 入院时间
+     */
+    @JsonIgnore
+    private Date behospitalDate;
+
+    /**
+     * 出院时间
+     */
+    @JsonIgnore
+    private Date leaveHospitalDate;
+
+    /**
+     * 开单医生
+     */
+    private String doctorName;
+
+    /**
+     * 质检提示信息
+     */
+    @JsonIgnore
+    private String info;
+}

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

@@ -0,0 +1,55 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description: 科室核查人员输出类
+ * @Author:songxl
+ * @time: 2024/5/14 13:45
+ */
+@Getter
+@Setter
+public class CheckJobDTO {
+    //核查任务id
+    private int id;
+    //病人住院序号
+    private String behospitalCode;
+    //病人姓名
+    private String name;
+    /**
+     * 病区code
+     */
+    private String wardCode;
+    /**
+     * 病区名称
+     */
+    private String wardName;
+    /**
+     * 医疗组Code
+     */
+    private String medoupCode;
+    /**
+     * 医疗组名称
+     */
+    private String medoupName;
+    //科室
+    private String behospitalDept;
+    //主管医生
+    private String attendingDoctor;
+    //出院日期
+    private String leaveHospitalDate;
+    //核查任务生成时间
+    private String jobCreateTime;
+    //任务分配人员id
+    private Long jobDistributor;
+    //任务分配人员名称
+    private String jobDistributorName;
+    //科室id
+    private String behospitalDeptId;
+
+    //筛选分值
+    private int value;
+    //取消分配标志
+    private Boolean delFlag;
+}

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

@@ -0,0 +1,23 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Description: 核查医疗组输出类
+ * @Author:songxl
+ * @time: 2024/5/14 13:45
+ */
+@Getter
+@Setter
+public class CheckMedoupDTO {
+    //医疗组code
+    private String medoupCode;
+    //医疗组名称
+    private String medoupName;
+    //科室质控人员列表
+    private List<DeptCheckUserDTO> deptcheckUsers = new ArrayList<>();
+}

+ 40 - 0
src/main/java/com/diagbot/dto/CheckUserDTO.java

@@ -0,0 +1,40 @@
+package com.diagbot.dto;
+
+import lombok.Data;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description: 核查人员用户科室、姓名、角色输出类
+ * @Author:songxl
+ * @time: 2024/5/14 13:45
+ */
+@Data
+public class CheckUserDTO {
+    /**
+     * 病区code
+     */
+    private String wardCode;
+    /**
+     * 病区名称
+     */
+    private String wardName;
+    //科室id
+    private String deptId;
+    //科室名称
+    private String deptName;
+    /**
+     * 医疗组Code
+     */
+    private String medoupCode;
+    /**
+     * 医疗组名称
+     */
+    private String medoupName;
+    //医生id
+    private String doctorId;
+    //医生名称
+    private String doctorName;
+    //角色id
+    private int roleId;
+}

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

@@ -0,0 +1,23 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Description: 核查病区输出类
+ * @Author:songxl
+ * @time: 2024/5/14 13:45
+ */
+@Getter
+@Setter
+public class CheckWardDTO {
+    //病区id
+    private String wardCode;
+    //病区名称
+    private String wardName;
+    //病区科室集合
+    private List<CheckDeptDTO> checkDepts = new ArrayList<>();
+}

+ 144 - 0
src/main/java/com/diagbot/dto/CheckWorkDTO.java

@@ -0,0 +1,144 @@
+package com.diagbot.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * @Description:
+ * @author: wangsy
+ * @time: 2024/5/13 15:00
+ */
+@Getter
+@Setter
+public class CheckWorkDTO {
+
+    /**
+     * 病人住院序号
+     */
+    private String behospitalCode;
+
+    /**
+     * 病人姓名
+     */
+    private String name;
+
+
+    /**
+     * 病案号
+     */
+    private String fileCode;
+
+    /**
+     * 性别
+     */
+    private String sex;
+
+    /**
+     * 年龄
+     */
+    private String age;
+    private String ageYear;
+    private String ageMon;
+    private String ageDay;
+
+    /**
+     * 病区code
+     */
+    private String wardCode;
+    /**
+     * 病区名称
+     */
+    private String wardName;
+
+    /**
+     * 科室id
+     */
+    private String deptId;
+    /**
+     * 科室
+     */
+    private String behDeptName;
+
+    /**
+     * 医疗组Code
+     */
+    private String medoupCode;
+    /**
+     * 医疗组名称
+     */
+    private String medoupName;
+
+    /**
+     * 出院日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date leaveHospitalDate;
+
+    /**
+     * 住院天数
+     */
+    private String behospitalDayNum;
+
+    /**
+     * 主管医生
+     */
+    private String doctorName;
+
+    /**
+     * 病历等级
+     */
+    private String level;
+
+    /**
+     * 病历得分
+     */
+    private String scoreRes;
+
+    /**
+     * 主诊断
+     */
+    private String diagnose;
+
+    /**
+     * 筛选分值
+     */
+    private String score;
+
+    /**
+     * 生成状态
+     */
+    private String creatStatus;
+
+    /**
+     * 生成日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date jobCreateTime;
+
+    /**
+     * 核查任务生成人编号
+     */
+    private Long jobCreator;
+    /**
+     * 核查任务生成人
+     */
+    private String jobCreatorName;
+
+    /**
+     * 核查日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date checkTime;
+
+    /**
+     * 分配日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date jobDistributionTime;
+
+    //取消分配标志
+    private Boolean delFlag = false;
+}

+ 158 - 0
src/main/java/com/diagbot/dto/CheckedRecordListDTO.java

@@ -0,0 +1,158 @@
+package com.diagbot.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2024/5/17 18:47
+ */
+@Getter
+@Setter
+@ApiModel("核查任务列表-获取核查任务列表-接口出参")
+public class CheckedRecordListDTO {
+
+    /**
+     * 病人住院序号
+     */
+    @ApiModelProperty("病人住院序号")
+    private String behospitalCode;
+
+    /**
+     * 病历核查状态
+     */
+    @ApiModelProperty("病历核查状态")
+    private String status;
+
+    /**
+     * 科室Id
+     */
+    @ApiModelProperty("科室Id")
+    private String behDeptId;
+    /**
+     * 任务来源
+     */
+    @ApiModelProperty("任务来源")
+    private String jobTypeName;
+    /**
+     * 医疗组Code
+     */
+    private String medoupCode;
+    /**
+     * 医疗组名称
+     */
+    private String medoupName;
+
+    /**
+     * 科室
+     */
+    @ApiModelProperty("科室")
+    private String behDeptName;
+
+    /**
+     * 病区code
+     */
+    private String wardCode;
+    /**
+     * 病区名称
+     */
+    private String wardName;
+
+
+    /**
+     * 病人姓名
+     */
+    @ApiModelProperty("病人姓名")
+    private String name;
+
+    /**
+     * 病案号
+     */
+    @ApiModelProperty("病案号")
+    private String fileCode;
+
+    /**
+     * 主管医生
+     */
+    @ApiModelProperty("主管医生")
+    private String doctorName;
+
+    /**
+     * 出院日期
+     */
+    @ApiModelProperty("出院日期")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date leaveHospitalDate;
+
+    /**
+     * 生成日期
+     */
+    @ApiModelProperty("生成日期")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date jobCreateTime;
+
+    /**
+     * 分配日期
+     */
+    @ApiModelProperty("分配日期")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date jobDistributionTime;
+
+    /**
+     * 任务月份
+     */
+    @ApiModelProperty("任务月份")
+    @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
+    private Date month;
+
+    /**
+     * 核查员id
+     */
+    @ApiModelProperty("核查员id")
+    private Long checkId;
+
+    /**
+     * 核查员
+     */
+    @ApiModelProperty("核查员")
+    private String checkName;
+
+    /**
+     * 核查日期
+     */
+    @ApiModelProperty("核查日期")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    private Date checkTime;
+
+    /**
+     * 缺陷数
+     */
+    @ApiModelProperty("缺陷数")
+    private int casesEntryNum;
+
+    /**
+     * 病历等级
+     */
+    @ApiModelProperty("病历等级")
+    private String level;
+
+    /**
+     * 病历得分
+     */
+    @ApiModelProperty("病历得分")
+    private BigDecimal scoreRes;
+
+    /**
+     * 年龄
+     */
+    @ApiModelProperty("年龄")
+    private String age;
+
+}

+ 0 - 0
src/main/java/com/diagbot/dto/ColumnDTO.java


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio