Browse Source

Merge branch 'dev/20200522temp' into debug

wangfeng 5 years ago
parent
commit
f5d8e2529c

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

@@ -0,0 +1,48 @@
+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', '用户-质控类型维护-获取医院全部模块');
+
+-- alter table qc_module_info MODIFY COLUMN `record_module_id` bigint(20) NOT NULL DEFAULT '0' COMMENT 'med_record_module的id';
+--
+-- DROP TABLE IF EXISTS `med_module_mapping`;
+-- CREATE TABLE `med_module_mapping` (
+--   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+--   `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+--   `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+--   `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+--   `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+--   `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+--   `module_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '模板id',
+--   `record_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '文书id(med_record_analyze中的id)',
+--   `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院ID',
+--   `remark` varchar(128) DEFAULT NULL COMMENT '备注',
+--   PRIMARY KEY (`id`),
+--   KEY `module_id` (`module_id`),
+--   KEY `record_id` (`record_id`)
+-- ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='模板与文书映射关系表';

+ 8 - 0
doc/005.20200528v1.2.x/qc_init.sql

@@ -0,0 +1,8 @@
+use `qc`;
+
+ALTER TABLE `med_behospital_info` ADD COLUMN `is_placefile` varchar(2) NOT NULL DEFAULT '0' COMMENT '是否归档(0:未归档,1:已归档)' AFTER `director_doctor_name`;
+
+ALTER TABLE `med_qcresult_detail` ADD COLUMN `grade_type` tinyint(4) DEFAULT '1' COMMENT '初始类型(1:机器,2:人工)' AFTER `is_reject`;
+ALTER TABLE `med_qcresult_detail` ADD COLUMN `opt_type` tinyint(4) DEFAULT '1' COMMENT '操作类型(1:新增,2:删除,3:修改)' AFTER `grade_type`;
+
+UPDATE `sys_permission` SET `is_deleted` = 'Y' WHERE `id` = '10';

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

@@ -60,6 +60,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/qc/behospitalInfo/page_dept").permitAll()
                 .antMatchers("/qc/behospitalInfo/page_person").permitAll()
                 .antMatchers("/consoleByDept/getDept").permitAll()
+                .antMatchers("/qc/casesEntryHospital/findQcCasesEntry").permitAll()
                 .antMatchers("/**").authenticated();
 //                .antMatchers("/**").permitAll();
     }

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

@@ -103,6 +103,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/qc/behospitalInfo/page_dept", request)
                 || matchers("/qc/behospitalInfo/page_person", request)
                 || matchers("/consoleByDept/getDept", request)
+                || matchers("/qc/casesEntryHospital/findQcCasesEntry", request)
                 || matchers("/", request)) {
             return true;
         }

+ 43 - 1
src/main/java/com/diagbot/entity/BehospitalInfo.java

@@ -25,7 +25,7 @@ public class BehospitalInfo implements Serializable {
     /**
      * 病人住院ID
      */
-    @TableId(value = "behospital_code",type = IdType.INPUT)
+    @TableId(value = "behospital_code", type = IdType.INPUT)
     private String behospitalCode;
 
     /**
@@ -148,6 +148,11 @@ public class BehospitalInfo implements Serializable {
      */
     private String directorDoctorName;
 
+    /**
+     * 是否归档(0:未归档,1:已归档)
+     */
+    private String isPlacefile;
+
     /**
      * 是否删除,N:未删除,Y:删除
      */
@@ -180,6 +185,7 @@ public class BehospitalInfo implements Serializable {
     public void setBehospitalCode(String behospitalCode) {
         this.behospitalCode = behospitalCode;
     }
+
     public Long getHospitalId() {
         return hospitalId;
     }
@@ -187,6 +193,7 @@ public class BehospitalInfo implements Serializable {
     public void setHospitalId(Long hospitalId) {
         this.hospitalId = hospitalId;
     }
+
     public String getName() {
         return name;
     }
@@ -194,6 +201,7 @@ public class BehospitalInfo implements Serializable {
     public void setName(String name) {
         this.name = name;
     }
+
     public String getSex() {
         return sex;
     }
@@ -201,6 +209,7 @@ public class BehospitalInfo implements Serializable {
     public void setSex(String sex) {
         this.sex = sex;
     }
+
     public Date getBirthday() {
         return birthday;
     }
@@ -208,6 +217,7 @@ public class BehospitalInfo implements Serializable {
     public void setBirthday(Date birthday) {
         this.birthday = birthday;
     }
+
     public String getFileCode() {
         return fileCode;
     }
@@ -215,6 +225,7 @@ public class BehospitalInfo implements Serializable {
     public void setFileCode(String fileCode) {
         this.fileCode = fileCode;
     }
+
     public Long getQcTypeId() {
         return qcTypeId;
     }
@@ -222,6 +233,7 @@ public class BehospitalInfo implements Serializable {
     public void setQcTypeId(Long qcTypeId) {
         this.qcTypeId = qcTypeId;
     }
+
     public String getWardCode() {
         return wardCode;
     }
@@ -229,6 +241,7 @@ public class BehospitalInfo implements Serializable {
     public void setWardCode(String wardCode) {
         this.wardCode = wardCode;
     }
+
     public String getWardName() {
         return wardName;
     }
@@ -236,6 +249,7 @@ public class BehospitalInfo implements Serializable {
     public void setWardName(String wardName) {
         this.wardName = wardName;
     }
+
     public String getBehDeptId() {
         return behDeptId;
     }
@@ -243,6 +257,7 @@ public class BehospitalInfo implements Serializable {
     public void setBehDeptId(String behDeptId) {
         this.behDeptId = behDeptId;
     }
+
     public String getBehDeptName() {
         return behDeptName;
     }
@@ -250,6 +265,7 @@ public class BehospitalInfo implements Serializable {
     public void setBehDeptName(String behDeptName) {
         this.behDeptName = behDeptName;
     }
+
     public String getBedCode() {
         return bedCode;
     }
@@ -257,6 +273,7 @@ public class BehospitalInfo implements Serializable {
     public void setBedCode(String bedCode) {
         this.bedCode = bedCode;
     }
+
     public String getBedName() {
         return bedName;
     }
@@ -264,6 +281,7 @@ public class BehospitalInfo implements Serializable {
     public void setBedName(String bedName) {
         this.bedName = bedName;
     }
+
     public String getInsuranceName() {
         return insuranceName;
     }
@@ -271,6 +289,7 @@ public class BehospitalInfo implements Serializable {
     public void setInsuranceName(String insuranceName) {
         this.insuranceName = insuranceName;
     }
+
     public String getJobType() {
         return jobType;
     }
@@ -278,6 +297,7 @@ public class BehospitalInfo implements Serializable {
     public void setJobType(String jobType) {
         this.jobType = jobType;
     }
+
     public Date getBehospitalDate() {
         return behospitalDate;
     }
@@ -285,6 +305,7 @@ public class BehospitalInfo implements Serializable {
     public void setBehospitalDate(Date behospitalDate) {
         this.behospitalDate = behospitalDate;
     }
+
     public Date getLeaveHospitalDate() {
         return leaveHospitalDate;
     }
@@ -292,6 +313,7 @@ public class BehospitalInfo implements Serializable {
     public void setLeaveHospitalDate(Date leaveHospitalDate) {
         this.leaveHospitalDate = leaveHospitalDate;
     }
+
     public String getDiagnoseIcd() {
         return diagnoseIcd;
     }
@@ -299,6 +321,7 @@ public class BehospitalInfo implements Serializable {
     public void setDiagnoseIcd(String diagnoseIcd) {
         this.diagnoseIcd = diagnoseIcd;
     }
+
     public String getDiagnose() {
         return diagnose;
     }
@@ -306,6 +329,7 @@ public class BehospitalInfo implements Serializable {
     public void setDiagnose(String diagnose) {
         this.diagnose = diagnose;
     }
+
     public String getBehDoctorId() {
         return behDoctorId;
     }
@@ -313,6 +337,7 @@ public class BehospitalInfo implements Serializable {
     public void setBehDoctorId(String behDoctorId) {
         this.behDoctorId = behDoctorId;
     }
+
     public String getBehDoctorName() {
         return behDoctorName;
     }
@@ -320,6 +345,7 @@ public class BehospitalInfo implements Serializable {
     public void setBehDoctorName(String behDoctorName) {
         this.behDoctorName = behDoctorName;
     }
+
     public String getDoctorId() {
         return doctorId;
     }
@@ -327,6 +353,7 @@ public class BehospitalInfo implements Serializable {
     public void setDoctorId(String doctorId) {
         this.doctorId = doctorId;
     }
+
     public String getDoctorName() {
         return doctorName;
     }
@@ -334,6 +361,7 @@ public class BehospitalInfo implements Serializable {
     public void setDoctorName(String doctorName) {
         this.doctorName = doctorName;
     }
+
     public String getDirectorDoctorId() {
         return directorDoctorId;
     }
@@ -341,6 +369,7 @@ public class BehospitalInfo implements Serializable {
     public void setDirectorDoctorId(String directorDoctorId) {
         this.directorDoctorId = directorDoctorId;
     }
+
     public String getDirectorDoctorName() {
         return directorDoctorName;
     }
@@ -348,6 +377,15 @@ public class BehospitalInfo implements Serializable {
     public void setDirectorDoctorName(String directorDoctorName) {
         this.directorDoctorName = directorDoctorName;
     }
+
+    public String getIsPlacefile() {
+        return isPlacefile;
+    }
+
+    public void setIsPlacefile(String isPlacefile) {
+        this.isPlacefile = isPlacefile;
+    }
+
     public String getIsDeleted() {
         return isDeleted;
     }
@@ -355,6 +393,7 @@ public class BehospitalInfo implements Serializable {
     public void setIsDeleted(String isDeleted) {
         this.isDeleted = isDeleted;
     }
+
     public Date getGmtCreate() {
         return gmtCreate;
     }
@@ -362,6 +401,7 @@ public class BehospitalInfo implements Serializable {
     public void setGmtCreate(Date gmtCreate) {
         this.gmtCreate = gmtCreate;
     }
+
     public Date getGmtModified() {
         return gmtModified;
     }
@@ -369,6 +409,7 @@ public class BehospitalInfo implements Serializable {
     public void setGmtModified(Date gmtModified) {
         this.gmtModified = gmtModified;
     }
+
     public String getCreator() {
         return creator;
     }
@@ -376,6 +417,7 @@ public class BehospitalInfo implements Serializable {
     public void setCreator(String creator) {
         this.creator = creator;
     }
+
     public String getModifier() {
         return modifier;
     }

+ 10 - 0
src/main/java/com/diagbot/entity/QcresultDetail.java

@@ -72,6 +72,16 @@ public class QcresultDetail implements Serializable {
      */
     private Integer isReject;
 
+    /**
+     * 初始类型(1:机器,2:人工)
+     */
+    private Integer gradeType;
+
+    /**
+     * 操作类型(1:新增,2:删除,3:修改)
+     */
+    private Integer optType;
+
     /**
      * 是否删除,N:未删除,Y:删除
      */

+ 69 - 106
src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

@@ -106,6 +106,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
     QcQuestionFacade qcQuestionFacade;
     @Autowired
     QcModelHospitalFacade qcModelHospitalFacade;
+    @Autowired
+    private FilterFacade filterFacade;
 
     /**
      * 分页
@@ -114,32 +116,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
      * @return
      */
     public IPage<BehospitalInfoDTO> pageFac(BehospitalPageVO behospitalPageVO) {
-        //入参验证
-        //入院时间
-        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateStart()) {
-            behospitalPageVO.setBehosDateStart(DateUtil.getFirstTimeOfDay(behospitalPageVO.getBehosDateStart()));
-        }
-        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateEnd()) {
-            behospitalPageVO.setBehosDateEnd(DateUtil.getLastTimeOfDay(behospitalPageVO.getBehosDateEnd()));
-        }
-        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateStart() && null != behospitalPageVO.getBehosDateEnd()) {
-            if (DateUtil.after(behospitalPageVO.getBehosDateStart(), behospitalPageVO.getBehosDateEnd())) {
-                throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "入院时间的开始时间必须小于结束时间!");
-            }
-        }
-        //出院时间
-        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateStart()) {
-            behospitalPageVO.setLeaveHosDateStart(DateUtil.getFirstTimeOfDay(behospitalPageVO.getLeaveHosDateStart()));
-        }
-        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateEnd()) {
-            behospitalPageVO.setLeaveHosDateEnd(DateUtil.getLastTimeOfDay(behospitalPageVO.getLeaveHosDateEnd()));
-        }
-        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateStart() && null != behospitalPageVO.getLeaveHosDateEnd()) {
-            if (DateUtil.after(behospitalPageVO.getLeaveHosDateStart(), behospitalPageVO.getLeaveHosDateEnd())) {
-                throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "出院时间的开始时间必须小于结束时间!");
-            }
-        }
-        behospitalPageVO.setHospitalId(Long.parseLong(SysUserUtils.getCurrentHospitalID()));
+        behospitalPageSet(behospitalPageVO);
         IPage<BehospitalInfoDTO> res = getPage(behospitalPageVO);
         return res;
     }
@@ -220,7 +197,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
     public QueryVo dealCommonData(Long hospitalId, AnalyzeVO analyzeVO) {
         // 获取质控条目
         List<QcCasesEntryDTO> qcCasesEntryDTOList = qcCasesEntryFacade.getQcCasesEntry(analyzeVO);
-        if(ListUtil.isEmpty(qcCasesEntryDTOList)){
+        if (ListUtil.isEmpty(qcCasesEntryDTOList)) {
             throw new CommonException(CommonErrorCode.NOT_EXISTS, "该病历无关联的质控条目!");
         }
 
@@ -346,7 +323,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         if (!analyzeVO.getIsTask()) {
             hospitalId = Long.parseLong(SysUserUtils.getCurrentHospitalID());
         }
-//        Long hospitalId = 1L; // 写死
+        //        Long hospitalId = 1L; // 写死
         analyzeVO.setHospitalId(hospitalId);
 
         // 处理公共数据
@@ -379,7 +356,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         }
 
         // 对info赋值
-        for(QcResultAlgVO bean : qcResultAlgVOList) {
+        for (QcResultAlgVO bean : qcResultAlgVOList) {
             String info = codeToInfoMap.get(bean.getCode());
             if (StringUtil.isNotBlank(info)) {
                 bean.setInfo(info);
@@ -403,8 +380,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         Date date = qcresultInfoFacade.saveQcResult(algorithmDTO, algorithmVO, analyzeVO, pageData, menuData, analyzeVO.getIsTask());
 
         // 返回提示信息
-//        List<MsgDTO> msgDTOList = getMsg(analyzeVO);
-//        Map<String, List<MsgDTO>> msgMap = EntityUtil.makeEntityListMap(msgDTOList, "modelName");
+        //        List<MsgDTO> msgDTOList = getMsg(analyzeVO);
+        //        Map<String, List<MsgDTO>> msgMap = EntityUtil.makeEntityListMap(msgDTOList, "modelName");
 
         //返回参数组装
         AnalyzeDTO analyzeDTO = new AnalyzeDTO();
@@ -509,8 +486,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
      * @param medrecVoList
      * @param map
      */
-    public void addDataWithKeyConvert(String key,  List<DoctorAdvice> list,
-                               List<MedrecVo> medrecVoList, Map<String, String> map, List<String> dateList) {
+    public void addDataWithKeyConvert(String key, List<DoctorAdvice> list,
+                                      List<MedrecVo> medrecVoList, Map<String, String> map, List<String> dateList) {
         MedrecVo medrecVo = new MedrecVo();
         medrecVo.setTitle(key);
         Map<String, Object> content = new HashMap<>();
@@ -523,7 +500,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
                 for (String objKey : objectMap.keySet()) {
                     if (map.get(objKey) != null) {
                         if (dateList.contains(objKey)) {
-                            Date date = (Date)objectMap.get(objKey);
+                            Date date = (Date) objectMap.get(objKey);
                             res.put(map.get(objKey), DateUtil.formatDateTime(date).replaceAll("null", ""));
                         } else {
                             res.put(map.get(objKey), String.valueOf(objectMap.get(objKey)).replaceAll("null", ""));
@@ -556,7 +533,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         for (String objKey : objectMap.keySet()) {
             if (dicMap.containsKey(objKey)) {
                 if (dateList.contains(objKey)) {
-                    Date date = (Date)objectMap.get(objKey);
+                    Date date = (Date) objectMap.get(objKey);
                     res.put(dicMap.get(objKey), DateUtil.formatDateTime(date).replaceAll("null", ""));
                 } else {
                     res.put(dicMap.get(objKey), String.valueOf(objectMap.get(objKey)).replaceAll("null", ""));
@@ -568,6 +545,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
 
     /**
      * 拼接数据(病案首页),从数据字典获取信息转换
+     *
      * @param key
      * @param homePage
      * @param medrecVoList
@@ -575,7 +553,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
      * @param homeDiagnoseInfoList
      * @param homeOperationInfoList
      */
-    public void addDataWithFirstPage(String key,  HomePage homePage, List<MedrecVo> medrecVoList, Map<String, Map<String, String>> dicMap,
+    public void addDataWithFirstPage(String key, HomePage homePage, List<MedrecVo> medrecVoList, Map<String, Map<String, String>> dicMap,
                                      List<HomeDiagnoseInfo> homeDiagnoseInfoList, List<HomeOperationInfo> homeOperationInfoList) {
         MedrecVo medrecVo = new MedrecVo();
         medrecVo.setTitle(key);
@@ -588,7 +566,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             for (String objKey : objectMap.keySet()) {
                 if (map.containsKey(objKey)) {
                     if (firstPageDate.contains(objKey)) {
-                        Date date = (Date)objectMap.get(objKey);
+                        Date date = (Date) objectMap.get(objKey);
                         content.put(map.get(objKey), DateUtil.formatDateTime(date).replaceAll("null", ""));
                     } else {
                         content.put(map.get(objKey), String.valueOf(objectMap.get(objKey)).replaceAll("null", ""));
@@ -668,21 +646,21 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             authServiceClient.analyze_rpc(analyzeVO);
         }
 
-//        List<BehospitalInfo> behospitalInfoList = this.list(new QueryWrapper<BehospitalInfo>()
-//                .eq("is_deleted", IsDeleteEnum.N.getKey())
-//        );
-//
-//        int i = 1;
-//        while(i < 100) {
-//            for (BehospitalInfo bean : behospitalInfoList) {
-//                AnalyzeVO analyzeVO = new AnalyzeVO();
-//                analyzeVO.setIsTask(true);
-//                analyzeVO.setHospitalId(bean.getHospitalId());
-//                analyzeVO.setBehospitalCode(bean.getBehospitalCode());
-//                authServiceClient.analyze_rpc(analyzeVO);
-//                System.out.println(i++);
-//            }
-//        }
+        //        List<BehospitalInfo> behospitalInfoList = this.list(new QueryWrapper<BehospitalInfo>()
+        //                .eq("is_deleted", IsDeleteEnum.N.getKey())
+        //        );
+        //
+        //        int i = 1;
+        //        while(i < 100) {
+        //            for (BehospitalInfo bean : behospitalInfoList) {
+        //                AnalyzeVO analyzeVO = new AnalyzeVO();
+        //                analyzeVO.setIsTask(true);
+        //                analyzeVO.setHospitalId(bean.getHospitalId());
+        //                analyzeVO.setBehospitalCode(bean.getBehospitalCode());
+        //                authServiceClient.analyze_rpc(analyzeVO);
+        //                System.out.println(i++);
+        //            }
+        //        }
     }
 
 
@@ -751,7 +729,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         if (qcResultDTO == null) {
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
                     "该病历未评分!【hospitalId=" + hospitalId + "】【behospitalCode="
-                    + getDetailVO.getBehospitalCode() + "】");
+                            + getDetailVO.getBehospitalCode() + "】");
         }
         QcResultApiDTO qcResultApiDTO = new QcResultApiDTO();
         BeanUtil.copyProperties(qcResultDTO, qcResultApiDTO);
@@ -769,69 +747,18 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
     }
 
     /**
-     *
      * @param behospitalPageVO
      * @return
      */
     public IPage<BehospitalInfoDTO> pagePerson(BehospitalPageVO behospitalPageVO) {
-        //入参验证
-        //入院时间
-        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateStart()) {
-            behospitalPageVO.setBehosDateStart(DateUtil.getFirstTimeOfDay(behospitalPageVO.getBehosDateStart()));
-        }
-        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateEnd()) {
-            behospitalPageVO.setBehosDateEnd(DateUtil.getLastTimeOfDay(behospitalPageVO.getBehosDateEnd()));
-        }
-        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateStart() && null != behospitalPageVO.getBehosDateEnd()) {
-            if (DateUtil.after(behospitalPageVO.getBehosDateStart(), behospitalPageVO.getBehosDateEnd())) {
-                throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "入院时间的开始时间必须小于结束时间!");
-            }
-        }
-        //出院时间
-        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateStart()) {
-            behospitalPageVO.setLeaveHosDateStart(DateUtil.getFirstTimeOfDay(behospitalPageVO.getLeaveHosDateStart()));
-        }
-        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateEnd()) {
-            behospitalPageVO.setLeaveHosDateEnd(DateUtil.getLastTimeOfDay(behospitalPageVO.getLeaveHosDateEnd()));
-        }
-        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateStart() && null != behospitalPageVO.getLeaveHosDateEnd()) {
-            if (DateUtil.after(behospitalPageVO.getLeaveHosDateStart(), behospitalPageVO.getLeaveHosDateEnd())) {
-                throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "出院时间的开始时间必须小于结束时间!");
-            }
-        }
-        behospitalPageVO.setHospitalId(Long.parseLong(SysUserUtils.getCurrentHospitalID()));
+        behospitalPageSet(behospitalPageVO);
         behospitalPageVO.setUserId(Long.parseLong(SysUserUtils.getCurrentPrincipleID()));
         IPage<BehospitalInfoDTO> res = getPageByPerson(behospitalPageVO);
         return res;
     }
 
     public IPage<BehospitalInfoDTO> pageDept(BehospitalPageVO behospitalPageVO) {
-        //入参验证
-        //入院时间
-        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateStart()) {
-            behospitalPageVO.setBehosDateStart(DateUtil.getFirstTimeOfDay(behospitalPageVO.getBehosDateStart()));
-        }
-        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateEnd()) {
-            behospitalPageVO.setBehosDateEnd(DateUtil.getLastTimeOfDay(behospitalPageVO.getBehosDateEnd()));
-        }
-        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateStart() && null != behospitalPageVO.getBehosDateEnd()) {
-            if (DateUtil.after(behospitalPageVO.getBehosDateStart(), behospitalPageVO.getBehosDateEnd())) {
-                throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "入院时间的开始时间必须小于结束时间!");
-            }
-        }
-        //出院时间
-        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateStart()) {
-            behospitalPageVO.setLeaveHosDateStart(DateUtil.getFirstTimeOfDay(behospitalPageVO.getLeaveHosDateStart()));
-        }
-        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateEnd()) {
-            behospitalPageVO.setLeaveHosDateEnd(DateUtil.getLastTimeOfDay(behospitalPageVO.getLeaveHosDateEnd()));
-        }
-        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateStart() && null != behospitalPageVO.getLeaveHosDateEnd()) {
-            if (DateUtil.after(behospitalPageVO.getLeaveHosDateStart(), behospitalPageVO.getLeaveHosDateEnd())) {
-                throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "出院时间的开始时间必须小于结束时间!");
-            }
-        }
-        behospitalPageVO.setHospitalId(Long.parseLong(SysUserUtils.getCurrentHospitalID()));
+        behospitalPageSet(behospitalPageVO);
         behospitalPageVO.setUserId(Long.parseLong(SysUserUtils.getCurrentPrincipleID()));
         IPage<BehospitalInfoDTO> res = getPageByDept(behospitalPageVO);
         return res;
@@ -921,4 +848,40 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         return analyzeRunDTO;
     }
 
+    private void behospitalPageSet(BehospitalPageVO behospitalPageVO) {
+        //入参验证
+        //入院时间
+        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateStart()) {
+            behospitalPageVO.setBehosDateStart(DateUtil.getFirstTimeOfDay(behospitalPageVO.getBehosDateStart()));
+        }
+        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateEnd()) {
+            behospitalPageVO.setBehosDateEnd(DateUtil.getFirstTimeOfDay(DateUtil.addDay(behospitalPageVO.getBehosDateEnd(), 1)));
+        }
+        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateStart() && null != behospitalPageVO.getBehosDateEnd()) {
+            if (DateUtil.after(behospitalPageVO.getBehosDateStart(), behospitalPageVO.getBehosDateEnd())) {
+                throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "入院时间的开始时间必须小于结束时间!");
+            }
+        }
+        //出院时间
+        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateStart()) {
+            behospitalPageVO.setLeaveHosDateStart(DateUtil.getFirstTimeOfDay(behospitalPageVO.getLeaveHosDateStart()));
+        }
+        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateEnd()) {
+            behospitalPageVO.setLeaveHosDateEnd(DateUtil.getFirstTimeOfDay(DateUtil.addDay(behospitalPageVO.getLeaveHosDateEnd(), 1)));
+        }
+        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateStart() && null != behospitalPageVO.getLeaveHosDateEnd()) {
+            if (DateUtil.after(behospitalPageVO.getLeaveHosDateStart(), behospitalPageVO.getLeaveHosDateEnd())) {
+                throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "出院时间的开始时间必须小于结束时间!");
+            }
+        }
+        behospitalPageVO.setHospitalId(Long.parseLong(SysUserUtils.getCurrentHospitalID()));
+        if (null != behospitalPageVO.getStatisticsType()
+                && null == behospitalPageVO.getLeaveHosDateStart()
+                && null == behospitalPageVO.getLeaveHosDateEnd()) {
+            String startDate = filterFacade.getStartDateStr(behospitalPageVO.getStatisticsType(), null);
+            String endDate = filterFacade.getEndDateStr(behospitalPageVO.getStatisticsType(), null);
+            behospitalPageVO.setLeaveHosDateStart(DateUtil.parseDate(startDate));
+            behospitalPageVO.setLeaveHosDateEnd(DateUtil.parseDate(endDate));
+        }
+    }
 }

+ 74 - 25
src/main/java/com/diagbot/facade/QcresultInfoFacade.java

@@ -185,32 +185,81 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
         qcresultInfo.setModifier(useId.toString());
         this.save(qcresultInfo);
         //更新质控评分明细信息
-        //逻辑删除记录
-        qcresultDetailServiceImpl.update(new UpdateWrapper<QcresultDetail>()
-                .eq("is_deleted", IsDeleteEnum.N.getKey())
-                .eq("hospital_id", analyzeVO.getHospitalId())
-                .eq("behospital_code", analyzeVO.getBehospitalCode())
-                .set("is_deleted", IsDeleteEnum.Y.getKey())
-                .set("modifier", useId)
-                .set("gmt_modified", now));
-        //批量插入新的数据
-        List<QcresultDetail> qcresultDetailList = new ArrayList<>();
-        List<QcResultAlgVO> qcResultAlgVORes = algorithmVO.getQcResultAlgVOList();
-        if (ListUtil.isNotEmpty(qcResultAlgVORes)) {
-            for (QcResultAlgVO qcResultAlgVO : qcResultAlgVORes) {
-                QcresultDetail qcresultDetail = new QcresultDetail();
-                BeanUtil.copyProperties(qcResultAlgVO, qcresultDetail);
-                qcresultDetail.setHospitalId(analyzeVO.getHospitalId());
-                qcresultDetail.setBehospitalCode(analyzeVO.getBehospitalCode());
-                qcresultDetail.setGmtCreate(now);
-                qcresultDetail.setCreator(useId.toString());
-                qcresultDetail.setGmtModified(now);
-                qcresultDetail.setModifier(useId.toString());
-                qcresultDetail.setInfo(StringUtil.isNotBlank(qcResultAlgVO.getInfo()) ? qcResultAlgVO.getInfo() : "");
-                qcresultDetailList.add(qcresultDetail);
-            }
-            qcresultDetailServiceImpl.saveBatch(qcresultDetailList);
+        switch (algorithmVO.getType()) {
+            //自动评分
+            case 0:
+                //删除记录
+                qcresultDetailServiceImpl.remove(new QueryWrapper<QcresultDetail>()
+                        .eq("hospital_id", analyzeVO.getHospitalId())
+                        .eq("behospital_code", analyzeVO.getBehospitalCode()));
+                //批量插入新的数据
+                List<QcresultDetail> qcresultDetailList = new ArrayList<>();
+                List<QcResultAlgVO> qcResultAlgVORes = algorithmVO.getQcResultAlgVOList();
+                if (ListUtil.isNotEmpty(qcResultAlgVORes)) {
+                    for (QcResultAlgVO qcResultAlgVO : qcResultAlgVORes) {
+                        QcresultDetail qcresultDetail = new QcresultDetail();
+                        BeanUtil.copyProperties(qcResultAlgVO, qcresultDetail);
+                        qcresultDetail.setHospitalId(analyzeVO.getHospitalId());
+                        qcresultDetail.setBehospitalCode(analyzeVO.getBehospitalCode());
+                        qcresultDetail.setGradeType(1);
+                        qcresultDetail.setOptType(1);
+                        qcresultDetail.setGmtCreate(now);
+                        qcresultDetail.setCreator(useId.toString());
+                        qcresultDetail.setGmtModified(now);
+                        qcresultDetail.setModifier(useId.toString());
+                        qcresultDetail.setInfo(StringUtil.isNotBlank(qcResultAlgVO.getInfo()) ? qcResultAlgVO.getInfo() : "");
+                        qcresultDetailList.add(qcresultDetail);
+                    }
+                    qcresultDetailServiceImpl.saveBatch(qcresultDetailList);
+                }
+                break;
+            case 1:
+                //新增条目
+                QcresultDetail qcresultDetailAdd = new QcresultDetail();
+                BeanUtil.copyProperties(algorithmVO.getOptResultAlgVO(), qcresultDetailAdd);
+                qcresultDetailAdd.setGradeType(2);
+                qcresultDetailAdd.setOptType(1);
+                qcresultDetailAdd.setHospitalId(analyzeVO.getHospitalId());
+                qcresultDetailAdd.setBehospitalCode(analyzeVO.getBehospitalCode());
+                qcresultDetailAdd.setGmtCreate(now);
+                qcresultDetailAdd.setCreator(useId.toString());
+                qcresultDetailAdd.setGmtModified(now);
+                qcresultDetailAdd.setModifier(useId.toString());
+                qcresultDetailServiceImpl.save(qcresultDetailAdd);
+                break;
+            case 2:
+                //删除条目
+                qcresultDetailServiceImpl.remove(new QueryWrapper<QcresultDetail>()
+                        .eq("id", algorithmVO.getOptResultAlgVO().getId())
+                        .eq("hospital_id", analyzeVO.getHospitalId())
+                        .eq("behospital_code", analyzeVO.getBehospitalCode())
+                );
+                break;
+            case 3:
+                //修改条目
+                qcresultDetailServiceImpl.update(new UpdateWrapper<QcresultDetail>()
+                        .eq("id", algorithmVO.getOptResultAlgVO().getId())
+                        .eq("is_deleted", IsDeleteEnum.N.getKey())
+                        .eq("hospital_id", analyzeVO.getHospitalId())
+                        .eq("behospital_code", analyzeVO.getBehospitalCode())
+                        .set("msg", algorithmVO.getOptResultAlgVO().getMsg())
+                        .set("score", algorithmVO.getOptResultAlgVO().getScore())
+                        .set("opt_type", 3)
+                        .set("modifier", useId)
+                        .set("gmt_modified", now)
+                );
+                break;
+            default:
+                /* DO NOTHING */
+                break;
+        }
+        //自动评分
+        if (algorithmVO.getType().equals(0)) {
+
+        } else if (algorithmVO.getType().equals(1)) {
+
         }
+
         //长兴的数据
         if (algorithmVO.getHospitalId().equals(1L)) {
             //质控模块评分数据

+ 5 - 0
src/main/java/com/diagbot/vo/BehospitalPageVO.java

@@ -80,4 +80,9 @@ public class BehospitalPageVO extends Page implements Serializable {
     private Long userId;
 
     private Long doctorCode;
+
+    /**
+     * 统计维度 1-本月,2-本年
+     */
+    private Integer statisticsType;
 }

+ 3 - 0
src/main/java/com/diagbot/web/BehospitalInfoController.java

@@ -48,6 +48,7 @@ public class BehospitalInfoController {
     @ApiOperation(value = "病历分页列表[by:zhoutg]",
             notes = "name:姓名<br>" +
                     "fileCode:档案号<br>" +
+                    "statisticsType: 统计维度 1-本月,2-本年<br>" +
                     "behosDateStart:入院时间开始时间<br>" +
                     "behosDateEnd:入院时间结束时间<br>" +
                     "leaveHosDateStart:出院时间开始时间<br>" +
@@ -156,6 +157,7 @@ public class BehospitalInfoController {
     @ApiOperation(value = "病历分页列表(科室)[by:zhoutg]",
             notes = "name:姓名<br>" +
                     "fileCode:档案号<br>" +
+                    "statisticsType: 统计维度 1-本月,2-本年<br>" +
                     "behosDateStart:入院时间开始时间<br>" +
                     "behosDateEnd:入院时间结束时间<br>" +
                     "leaveHosDateStart:出院时间开始时间<br>" +
@@ -170,6 +172,7 @@ public class BehospitalInfoController {
     @ApiOperation(value = "病历分页列表(个人)[by:zhoutg]",
             notes = "name:姓名<br>" +
                     "fileCode:档案号<br>" +
+                    "statisticsType: 统计维度 1-本月,2-本年<br>" +
                     "behosDateStart:入院时间开始时间<br>" +
                     "behosDateEnd:入院时间结束时间<br>" +
                     "leaveHosDateStart:出院时间开始时间<br>" +

+ 7 - 6
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -29,6 +29,7 @@
         <result column="doctor_name" property="doctorName" />
         <result column="director_doctor_id" property="directorDoctorId" />
         <result column="director_doctor_name" property="directorDoctorName" />
+        <result column="is_placefile" property="isPlacefile" />
         <result column="is_deleted" property="isDeleted" />
         <result column="gmt_create" property="gmtCreate" />
         <result column="gmt_modified" property="gmtModified" />
@@ -72,13 +73,13 @@
             <![CDATA[ and t.behospital_date >= #{behosDateStart}]]>
         </if>
         <if test="behosDateEnd != null">
-            <![CDATA[ and t.behospital_date <= #{behosDateEnd}]]>
+            <![CDATA[ and t.behospital_date < #{behosDateEnd}]]>
         </if>
         <if test="leaveHosDateStart != null">
             <![CDATA[ and t.leave_hospital_date >= #{leaveHosDateStart}]]>
         </if>
         <if test="leaveHosDateEnd != null">
-            <![CDATA[ and t.leave_hospital_date <= #{leaveHosDateEnd}]]>
+            <![CDATA[ and t.leave_hospital_date < #{leaveHosDateEnd}]]>
         </if>
         <if test="level != null and level != ''">
             and t.level = #{level}
@@ -464,13 +465,13 @@
             <![CDATA[ and t.behospital_date >= #{behosDateStart}]]>
         </if>
         <if test="behosDateEnd != null">
-            <![CDATA[ and t.behospital_date <= #{behosDateEnd}]]>
+            <![CDATA[ and t.behospital_date < #{behosDateEnd}]]>
         </if>
         <if test="leaveHosDateStart != null">
             <![CDATA[ and t.leave_hospital_date >= #{leaveHosDateStart}]]>
         </if>
         <if test="leaveHosDateEnd != null">
-            <![CDATA[ and t.leave_hospital_date <= #{leaveHosDateEnd}]]>
+            <![CDATA[ and t.leave_hospital_date < #{leaveHosDateEnd}]]>
         </if>
         <if test="level != null and level != ''">
             and t.level = #{level}
@@ -531,13 +532,13 @@
             <![CDATA[ and t.behospital_date >= #{behosDateStart}]]>
         </if>
         <if test="behosDateEnd != null">
-            <![CDATA[ and t.behospital_date <= #{behosDateEnd}]]>
+            <![CDATA[ and t.behospital_date < #{behosDateEnd}]]>
         </if>
         <if test="leaveHosDateStart != null">
             <![CDATA[ and t.leave_hospital_date >= #{leaveHosDateStart}]]>
         </if>
         <if test="leaveHosDateEnd != null">
-            <![CDATA[ and t.leave_hospital_date <= #{leaveHosDateEnd}]]>
+            <![CDATA[ and t.leave_hospital_date < #{leaveHosDateEnd}]]>
         </if>
         <if test="level != null and level != ''">
             and t.level = #{level}

+ 8 - 1
src/main/resources/mapper/QcresultDetailMapper.xml

@@ -6,9 +6,16 @@
     <resultMap id="BaseResultMap" type="com.diagbot.entity.QcresultDetail">
         <id column="id" property="id" />
         <result column="hospital_id" property="hospitalId" />
-        <result column="cases_entry_id" property="casesEntryId" />
         <result column="behospital_code" property="behospitalCode" />
+        <result column="cases_id" property="casesId" />
+        <result column="cases_score" property="casesScore" />
+        <result column="cases_entry_id" property="casesEntryId" />
         <result column="score" property="score" />
+        <result column="msg" property="msg" />
+        <result column="info" property="info" />
+        <result column="is_reject" property="isReject" />
+        <result column="grade_type" property="gradeType" />
+        <result column="opt_type" property="optType" />
         <result column="is_deleted" property="isDeleted" />
         <result column="gmt_create" property="gmtCreate" />
         <result column="gmt_modified" property="gmtModified" />

+ 1 - 1
src/test/java/com/diagbot/CodeGeneration.java

@@ -56,7 +56,7 @@ public class CodeGeneration {
         StrategyConfig strategy = new StrategyConfig();
 //        strategy.setTablePrefix(new String[] { "med_" });// 此处可以修改为您的表前缀
         strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
-        strategy.setInclude(new String[] { "qc_type"}); // 需要生成的表
+        strategy.setInclude(new String[] { "med_qcresult_detail","med_behospital_info"}); // 需要生成的表
 
         strategy.setSuperServiceClass(null);
         strategy.setSuperServiceImplClass(null);