Przeglądaj źródła

Merge remote-tracking branch 'origin/dev/20200702_1.3.7' into dev/20200702_1.3.7

wangfeng 4 lat temu
rodzic
commit
5cc9a27965

+ 5 - 4
doc/013.20200706v1.3.7/qc_initv1.3.7.sql

@@ -104,8 +104,8 @@ INSERT INTO `sys_menu` VALUES ('15', 'N', '1970-01-01 12:00:00', '1970-01-01 12:
 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 ('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', '用户-质控科-各科室质控平均分_详情');
@@ -113,16 +113,17 @@ INSERT INTO `sys_menu` VALUES ('24', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:
 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 ('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', '10', '用户-质控科-关键条目缺陷占比');
+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
 -- ----------------------------

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

@@ -937,7 +937,7 @@ public class ConsoleFacade {
                 .divide(BigDecimal.valueOf(homePageMRNum), 4, RoundingMode.HALF_UP)
                 .doubleValue();
         String improveToPassPercentStr
-                = df.format(BigDecimal.valueOf(improvePercent).multiply(BigDecimal.valueOf(100))) + "%";
+                = df.format(BigDecimal.valueOf(improveToPassPercent).multiply(BigDecimal.valueOf(100))) + "%";
         //改善至满分病历数
         Integer improveToFullNum = records
                 .stream()

+ 10 - 32
src/main/java/com/diagbot/facade/FilterFacade.java

@@ -10,13 +10,10 @@ import com.diagbot.vo.FilterOrderVO;
 import com.diagbot.vo.FilterPageByAverageVO;
 import com.diagbot.vo.FilterPageByDeptVO;
 import com.diagbot.vo.FilterPageVO;
-import com.diagbot.vo.FilterQcCheckVO;
 import com.diagbot.vo.FilterVO;
 import com.diagbot.vo.QcResultShortPageVO;
 import org.springframework.stereotype.Component;
 
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
 import java.util.Date;
 
 /**
@@ -119,7 +116,6 @@ public class FilterFacade {
         if (filterVO.getLimitCount() == null || filterVO.getLimitCount().equals(0)) {
             filterVO.setLimitCount(10);
         }
-
         if (StringUtil.isBlank(filterVO.getStartDate())) {
             String startDate = getStartDateStr(filterVO.getType(), null);
             filterVO.setStartDate(startDate);
@@ -127,7 +123,7 @@ public class FilterFacade {
         if (StringUtil.isBlank(filterVO.getEndDate())) {
             String endDate = getEndDateStr(filterVO.getType(), null);
             filterVO.setEndDate(endDate);
-        } else {
+        } /*else {
             try {
                 SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                 Date date = dateFormat.parse(filterVO.getEndDate());
@@ -136,7 +132,7 @@ public class FilterFacade {
             } catch (ParseException e) {
 
             }
-        }
+        }*/
     }
 
     /**
@@ -149,16 +145,14 @@ public class FilterFacade {
         String userId = SysUserUtils.getCurrentPrincipleID();
         filterPageVO.setHospitalId(hospitalId);
         filterPageVO.setUserId(Long.valueOf(userId));
-        String startDate = "";
-        String endDate = "";
         if (StringUtil.isBlank(filterPageVO.getStartDate())) {
-            startDate = getStartDateStr(filterPageVO.getType(), null);
+            String startDate = getStartDateStr(filterPageVO.getType(), null);
             filterPageVO.setStartDate(startDate);
         }
         if (StringUtil.isBlank(filterPageVO.getEndDate())) {
-            endDate = getEndDateStr(filterPageVO.getType(), null);
+            String endDate = getEndDateStr(filterPageVO.getType(), null);
             filterPageVO.setEndDate(endDate);
-        } else {
+        }/* else {
             try {
                 SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                 Date date = dateFormat.parse(filterPageVO.getEndDate());
@@ -167,7 +161,7 @@ public class FilterFacade {
             } catch (ParseException e) {
 
             }
-        }
+        }*/
     }
 
 
@@ -254,8 +248,8 @@ public class FilterFacade {
         String userId = SysUserUtils.getCurrentPrincipleID();
         qcResultShortPageVO.setHospitalId(hospitalId);
         qcResultShortPageVO.setUserId(Long.valueOf(userId));
-        long interval = qcResultShortPageVO.getEndDate().getTime() + 1000;
-        qcResultShortPageVO.setEndDate(new Date(Long.valueOf(interval)));
+        /*long interval = qcResultShortPageVO.getEndDate().getTime() + 1000;
+        qcResultShortPageVO.setEndDate(new Date(Long.valueOf(interval)));*/
     }
 
     /**
@@ -268,23 +262,7 @@ public class FilterFacade {
         String userId = SysUserUtils.getCurrentPrincipleID();
         entryStatisticsVO.setHospitalId(hospitalId);
         entryStatisticsVO.setUserId(Long.valueOf(userId));
-        long interval = entryStatisticsVO.getEndDate().getTime() + 1000;
-        entryStatisticsVO.setEndDate(new Date(Long.valueOf(interval)));
-    }
-
-    /**
-     * 质控核查统计入参
-     *
-     * @param filterQcCheckVO
-     */
-    public void filterQcCheckVOSet(FilterQcCheckVO filterQcCheckVO) {
-        FilterVO filterVO = new FilterVO();
-        BeanUtil.copyProperties(filterQcCheckVO, filterVO);
-        filterVOSet(filterVO);
-        filterQcCheckVO.setHospitalId(filterVO.getHospitalId());
-        filterQcCheckVO.setUserId(filterVO.getUserId());
-        filterQcCheckVO.setStartDate(filterVO.getStartDate());
-        filterQcCheckVO.setEndDate(filterVO.getEndDate());
-        filterQcCheckVO.setLimitCount(filterVO.getLimitCount());
+        /*long interval = entryStatisticsVO.getEndDate().getTime() + 1000;
+        entryStatisticsVO.setEndDate(new Date(Long.valueOf(interval)));*/
     }
 }

+ 3 - 1
src/main/java/com/diagbot/vo/FilterPageVO.java

@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
 import lombok.Setter;
 
+import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.NotNull;
 
 /**
@@ -18,15 +19,16 @@ public class FilterPageVO extends Page {
     /**
      * 统计维度 1-本月,2-本年
      */
-    @NotNull(message = "请输入本年或本月")
     private Integer type;
     /**
      * 起始时间
      */
+    @NotBlank(message = "请输入起始时间")
     private String startDate;
     /**
      * 结束时间
      */
+    @NotBlank(message = "请输入结束时间")
     private String endDate;
     /**
      * 医院id

+ 0 - 17
src/main/java/com/diagbot/vo/FilterQcCheckVO.java

@@ -1,17 +0,0 @@
-package com.diagbot.vo;
-
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * @Description:
- * @Author:zhaops
- * @time: 2020/7/7 11:40
- */
-@Getter
-@Setter
-public class FilterQcCheckVO extends FilterVO {
-    private String deptName;
-    private String asc;
-    private String desc;
-}

+ 4 - 2
src/main/java/com/diagbot/vo/FilterVO.java

@@ -4,7 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
 import lombok.Setter;
 
-import javax.validation.constraints.NotNull;
+import javax.validation.constraints.NotBlank;
 
 /**
  * @Description:
@@ -17,15 +17,17 @@ public class FilterVO {
     /**
      * 统计维度 1-本月,2-本年
      */
-    @NotNull(message = "请输入本年或本月")
+    //@NotNull(message = "请输入本年或本月")
     private Integer type;
     /**
      * 起始时间
      */
+    @NotBlank(message = "请输入起始时间")
     private String startDate;
     /**
      * 结束时间
      */
+    @NotBlank(message = "请输入结束时间")
     private String endDate;
     /**
      * 医院id

+ 2 - 3
src/main/java/com/diagbot/web/ConsoleController.java

@@ -20,7 +20,6 @@ import com.diagbot.vo.EntryStatisticsVO;
 import com.diagbot.vo.FilterOrderVO;
 import com.diagbot.vo.FilterPageByAverageVO;
 import com.diagbot.vo.FilterPageVO;
-import com.diagbot.vo.FilterQcCheckVO;
 import com.diagbot.vo.FilterVO;
 import com.diagbot.vo.QcResultShortPageVO;
 import io.swagger.annotations.Api;
@@ -303,7 +302,7 @@ public class ConsoleController {
                     "dateType: 时间类型 1-本月/本年,2-上月/去年,3-去年本月/去年<br>")
     @PostMapping("/getAverageDayNumPage")
     @SysLogger("getAverageDayNumPage")
-    public RespDTO<IPage<AverageStatisticsDTO>> getAverageDayNumPage(@RequestBody @Valid FilterPageByAverageVO filterPageByAverageVO) {
+    public RespDTO<IPage<AverageStatisticsDTO>> getAverageDayNumPage(@RequestBody FilterPageByAverageVO filterPageByAverageVO) {
         return RespDTO.onSuc(consoleFacade.getAverageDayNumPage(filterPageByAverageVO));
     }
 
@@ -318,7 +317,7 @@ public class ConsoleController {
                     "dateType: 时间类型 1-本月/本年,2-上月/去年,3-去年本月/去年<br>")
     @PostMapping("/getAverageFeePage")
     @SysLogger("getAverageFeePage")
-    public RespDTO<IPage<AverageStatisticsFeeDTO>> getAverageFeePage(@RequestBody @Valid FilterPageByAverageVO filterPageByAverageVO) {
+    public RespDTO<IPage<AverageStatisticsFeeDTO>> getAverageFeePage(@RequestBody FilterPageByAverageVO filterPageByAverageVO) {
         return RespDTO.onSuc(consoleFacade.getAverageFeePage(filterPageByAverageVO));
     }
 

+ 2 - 2
src/main/java/com/diagbot/web/ConsoleExportController.java

@@ -112,7 +112,7 @@ public class ConsoleExportController {
                     "dateType: 时间类型 1-本月/本年,2-上月/去年,3-去年本月/去年<br>")
     @PostMapping("/getAverageDayNumExport")
     @SysLogger("getAverageDayNumExport")
-    public void getAverageDayNumExport(HttpServletResponse response, @RequestBody @Valid FilterPageByAverageVO filterPageByAverageVO) {
+    public void getAverageDayNumExport(HttpServletResponse response, @RequestBody FilterPageByAverageVO filterPageByAverageVO) {
         consoleExportFacade.getAverageDayNumExport(response, filterPageByAverageVO);
     }
 
@@ -127,7 +127,7 @@ public class ConsoleExportController {
                     "dateType: 时间类型 1-本月/本年,2-上月/去年,3-去年本月/去年<br>")
     @PostMapping("/getAverageFeeExport")
     @SysLogger("getAverageFeeExport")
-    public void getAverageFeeExport(HttpServletResponse response, @RequestBody @Valid FilterPageByAverageVO filterPageByAverageVO) {
+    public void getAverageFeeExport(HttpServletResponse response, @RequestBody FilterPageByAverageVO filterPageByAverageVO) {
         consoleExportFacade.getAverageFeeExport(response, filterPageByAverageVO);
     }
 

+ 141 - 141
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -166,10 +166,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -200,10 +200,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
     </select>
 
@@ -513,10 +513,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
     </select>
 
@@ -533,7 +533,6 @@
         AND a.hospital_id = b.hospital_id
         AND a.behospital_code = b.behospital_code
         AND a.is_placefile = '1'
-        -- AND ( b.age IS NULL OR b.age = '-' OR b.age = '' )
         AND (
         ( IFNULL( b.newborn_day, '' ) != '' AND b.newborn_day != '0' )
         OR ( IFNULL( b.newborn_month, '' )!= '' AND b.newborn_month != '0' )
@@ -543,10 +542,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
     </select>
 
@@ -569,10 +568,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
     </select>
 
@@ -598,10 +597,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
     </select>
 
@@ -628,10 +627,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -657,7 +656,6 @@
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = b.behospital_code
         AND a.beh_dept_id = c.dept_id
-        -- AND ( b.age IS NULL OR b.age = '-' OR b.age = '' )
         AND (
         ( IFNULL( b.newborn_day, '' ) != '' AND b.newborn_day != '0' )
         OR ( IFNULL( b.newborn_month, '' )!= '' AND b.newborn_month != '0' )
@@ -671,10 +669,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -710,10 +708,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -752,10 +750,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -796,10 +794,10 @@
             AND a.hospital_id = #{filterPageVO.hospitalId}
         </if>
         <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{filterPageVO.startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
         </if>
         <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{filterPageVO.endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
         </if>
         <if test="filterPageVO.name != null and filterPageVO.name != ''">
             AND a.beh_dept_name like CONCAT('%', #{filterPageVO.name},'%')
@@ -831,10 +829,10 @@
             AND a.hospital_id = #{filterPageVO.hospitalId}
         </if>
         <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{filterPageVO.startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
         </if>
         <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{filterPageVO.endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
         </if>
         <if test="filterPageVO.name != null and filterPageVO.name != ''">
             AND a.beh_dept_name like CONCAT('%', #{filterPageVO.name},'%')
@@ -884,10 +882,10 @@
             AND a.hospital_id = #{filterPageByDeptVO.hospitalId}
         </if>
         <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{filterPageByDeptVO.startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
         </if>
         <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{filterPageByDeptVO.endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
         </if>
         <if test="filterPageByDeptVO.name != null and filterPageByDeptVO.name != ''">
             AND d.msg like CONCAT('%', #{filterPageByDeptVO.name},'%')
@@ -930,10 +928,10 @@
             AND a.hospital_id = #{filterPageByDeptVO.hospitalId}
         </if>
         <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{filterPageByDeptVO.startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
         </if>
         <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{filterPageByDeptVO.endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
         </if>
         <if test="filterPageByDeptVO.name != null and filterPageByDeptVO.name != ''">
             AND d.msg like CONCAT('%', #{filterPageByDeptVO.name},'%')
@@ -998,10 +996,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="level != null and level != ''">
             and c.level = #{level}
@@ -1040,10 +1038,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="level != null and level != ''">
             and c.level = #{level}
@@ -1179,10 +1177,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="level != null and level != ''">
             and c.level = #{level}
@@ -1236,10 +1234,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="level != null and level != ''">
             and c.level = #{level}
@@ -1377,10 +1375,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="level != null and level != ''">
             and c.level = #{level}
@@ -1443,10 +1441,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="level != null and level != ''">
             and c.level = #{level}
@@ -1570,10 +1568,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="level != null and level != ''">
             and c.level = #{level}
@@ -1614,10 +1612,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="level != null and level != ''">
             and c.level = #{level}
@@ -1673,10 +1671,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="level != null and level != ''">
             and b.level = #{level}
@@ -1807,10 +1805,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="level != null and level != ''">
             and c.level = #{level}
@@ -1858,10 +1856,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="level != null and level != ''">
             and c.level = #{level}
@@ -1981,10 +1979,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="level != null and level != ''">
             and c.level = #{level}
@@ -2039,10 +2037,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="level != null and level != ''">
             and c.level = #{level}
@@ -2113,10 +2111,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="level != null and level != ''">
             and b.level = #{level}
@@ -2846,11 +2844,11 @@
         <if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
             AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
         </if>
-        <if test="qcResultShortPageVO.startDate != null">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{qcResultShortPageVO.startDate})]]>
+        <if test="qcResultShortPageVO.startDate != null ">
+            <![CDATA[ AND a.leave_hospital_date >= #{qcResultShortPageVO.startDate}]]>
         </if>
         <if test="qcResultShortPageVO.endDate != null ">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{qcResultShortPageVO.endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
         </if>
         <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
             AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
@@ -3018,11 +3016,11 @@
         <if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
             AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
         </if>
-        <if test="qcResultShortPageVO.startDate != null">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{qcResultShortPageVO.startDate})]]>
+        <if test="qcResultShortPageVO.startDate != null ">
+            <![CDATA[ AND a.leave_hospital_date >= #{qcResultShortPageVO.startDate}]]>
         </if>
         <if test="qcResultShortPageVO.endDate != null ">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{qcResultShortPageVO.endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
         </if>
         <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
             AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
@@ -3249,10 +3247,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="deptName != null and deptName != ''">
             AND a.beh_dept_name = #{deptName}
@@ -3304,10 +3302,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="deptName != null and deptName != ''">
             AND a.beh_dept_name = #{deptName}
@@ -3355,10 +3353,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="deptName != null and deptName != ''">
             AND a.beh_dept_name = #{deptName}
@@ -3406,10 +3404,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="deptName != null and deptName != ''">
             AND a.beh_dept_name = #{deptName}
@@ -3507,11 +3505,11 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
+        <if test="startDate != null and startDate != ''">
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
-        <if test="endDate != null">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+        <if test="endDate != null and endDate != ''">
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
     </select>
 
@@ -3563,11 +3561,11 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
+        <if test="startDate != null and startDate != ''">
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
-        <if test="endDate != null">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+        <if test="endDate != null and endDate != ''">
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         GROUP BY
         a.file_code,
@@ -3585,11 +3583,11 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND tt2.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null">
-            <![CDATA[ AND tt2.leave_hospital_date >= DATE(#{startDate})]]>
+        <if test="startDate != null and startDate != ''">
+            <![CDATA[ AND tt2.leave_hospital_date >= #{startDate}]]>
         </if>
-        <if test="endDate != null">
-            <![CDATA[AND tt2.leave_hospital_date < DATE(#{endDate})]]>
+        <if test="endDate != null and endDate != ''">
+            <![CDATA[ AND tt2.leave_hospital_date <= #{endDate}]]>
         </if>
         ORDER BY
         tt1.file_code,
@@ -3629,11 +3627,11 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
+        <if test="startDate != null and startDate != ''">
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
-        <if test="endDate != null">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+        <if test="endDate != null and endDate != ''">
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         GROUP BY
         a.file_code,
@@ -3651,11 +3649,11 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND tt2.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null">
-            <![CDATA[ AND tt2.leave_hospital_date >= DATE(#{startDate})]]>
+        <if test="startDate != null and startDate != ''">
+            <![CDATA[ AND tt2.leave_hospital_date >= #{startDate}]]>
         </if>
-        <if test="endDate != null">
-            <![CDATA[AND tt2.leave_hospital_date < DATE(#{endDate})]]>
+        <if test="endDate != null and endDate != ''">
+            <![CDATA[ AND tt2.leave_hospital_date <= #{endDate}]]>
         </if>
         ORDER BY
         tt1.file_code,
@@ -3700,11 +3698,11 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
+        <if test="startDate != null and startDate != ''">
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
-        <if test="endDate != null">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+        <if test="endDate != null and endDate != ''">
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
     </select>
 
@@ -3748,11 +3746,11 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
+        <if test="startDate != null and startDate != ''">
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
-        <if test="endDate != null">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+        <if test="endDate != null and endDate != ''">
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         ) h1,(
         SELECT
@@ -3796,7 +3794,7 @@
         t1.ward_name AS wardName,
         ifnull(t1.status,0) AS checkStatus,
         t2.age,
-        t2.file_code AS fileCode
+        t1.file_code AS fileCode
         FROM
         (
         SELECT be.*,mci.status
@@ -3808,7 +3806,7 @@
         (
         SELECT
         b.*,
-        c.LEVEL,
+        ifnull(c.LEVEL,'未评分') as LEVEL ,
         c.grade_type,
         c.score_res,
         c.gmt_create
@@ -3833,7 +3831,8 @@
         a.director_doctor_name,
         a.diagnose,
         a.placefile_date,
-        a.ward_name
+        a.ward_name,
+        a.file_code
         FROM
         med_behospital_info a
         WHERE
@@ -3844,10 +3843,10 @@
             AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
         </if>
         <if test="qcResultShortPageVO.startDate != null">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{qcResultShortPageVO.startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{qcResultShortPageVO.startDate}]]>
         </if>
         <if test="qcResultShortPageVO.endDate != null ">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{qcResultShortPageVO.endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
         </if>
         <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
             AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
@@ -3872,9 +3871,6 @@
         LEFT JOIN med_qcresult_info c ON c.is_deleted = 'N'
         AND b.hospital_id = c.hospital_id
         AND b.behospital_code = c.behospital_code
-        <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
-            AND c.`level` = #{qcResultShortPageVO.level}
-        </if>
         ) tt1
         <if test="qcResultShortPageVO.leaveHosType != null and qcResultShortPageVO.leaveHosType ==3">
             ,med_medical_record tt2,
@@ -3931,6 +3927,9 @@
         <if test="qcResultShortPageVO.checkStatus != null">
             and t.checkStatus = #{qcResultShortPageVO.checkStatus}
         </if>
+        <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
+            AND t.`level` = #{qcResultShortPageVO.level}
+        </if>
     </select>
 
     <!-- 病案首页改善率统计(首页)-->
@@ -3983,11 +3982,11 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND m1.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null">
-            <![CDATA[ AND m1.leave_hospital_date >= DATE(#{startDate})]]>
+        <if test="startDate != null and startDate != ''">
+            <![CDATA[ AND m1.leave_hospital_date >= #{startDate}]]>
         </if>
-        <if test="endDate != null">
-            <![CDATA[AND m1.leave_hospital_date < DATE(#{endDate})]]>
+        <if test="endDate != null and endDate != ''">
+            <![CDATA[ AND m1.leave_hospital_date <= #{endDate}]]>
         </if>
         GROUP BY
         m1.behospital_code
@@ -4015,11 +4014,11 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
+        <if test="startDate != null and startDate != ''">
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
-        <if test="endDate != null">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+        <if test="endDate != null and endDate != ''">
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         ) t1,
         (
@@ -4041,11 +4040,11 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
+        <if test="startDate != null and startDate != ''">
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
-        <if test="endDate != null">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+        <if test="endDate != null and endDate != ''">
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         ) t2
     </select>
@@ -4091,11 +4090,11 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
+        <if test="startDate != null and startDate != ''">
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
-        <if test="endDate != null">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+        <if test="endDate != null and endDate != ''">
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="name != null and name != ''">
             AND a.beh_dept_name like CONCAT('%', #{name}, '%')
@@ -4127,11 +4126,11 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
+        <if test="startDate != null and startDate != ''">
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
-        <if test="endDate != null">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+        <if test="endDate != null and endDate != ''">
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="name != null and name != ''">
             AND a.beh_dept_name like CONCAT('%', #{name}, '%')
@@ -4159,15 +4158,14 @@
         AND a.behospital_code = c.behospital_code
         AND a.qc_type_id != 0
         AND a.is_placefile = '1'
-        AND c.have_home_page = '1'
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
+        <if test="startDate != null and startDate != ''">
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
-        <if test="endDate != null">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+        <if test="endDate != null and endDate != ''">
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="name != null and name != ''">
             AND a.beh_dept_name like CONCAT('%', #{name}, '%')
@@ -4210,14 +4208,16 @@
         AND m1.behospital_code = m4.behospital_code
         AND m3.have_home_page = 1
         AND m4.cases_id = 243
+        AND m1.is_placefile = '1'
+        AND m1.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
             AND m1.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null">
-            <![CDATA[ AND m1.leave_hospital_date >= DATE(#{startDate})]]>
+        <if test="startDate != null and startDate != ''">
+            <![CDATA[ AND m1.leave_hospital_date >= #{startDate}]]>
         </if>
-        <if test="endDate != null">
-            <![CDATA[AND m1.leave_hospital_date < DATE(#{endDate})]]>
+        <if test="endDate != null and endDate != ''">
+            <![CDATA[ AND m1.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="name != null and name != ''">
             AND m1.beh_dept_name like CONCAT('%', #{name}, '%')
@@ -4246,11 +4246,11 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
+        <if test="startDate != null and startDate != ''">
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
-        <if test="endDate != null">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+        <if test="endDate != null and endDate != ''">
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="name != null and name != ''">
             AND a.beh_dept_name like CONCAT('%', #{name}, '%')

+ 60 - 60
src/main/resources/mapper/QcresultInfoMapper.xml

@@ -36,10 +36,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="gradeType != null and gradeType != ''">
             AND c.grade_type = #{gradeType}
@@ -67,10 +67,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="gradeType != null and gradeType != ''">
             AND c.grade_type = #{gradeType}
@@ -106,10 +106,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -141,10 +141,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -194,10 +194,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         GROUP BY
         d.cases_id
@@ -224,10 +224,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         ) t2,
         (
@@ -294,10 +294,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         GROUP BY
         d.cases_entry_id
@@ -324,10 +324,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         ) t2
         ORDER BY
@@ -387,10 +387,10 @@
             AND a.hospital_id = #{filterPageVO.hospitalId}
         </if>
         <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{filterPageVO.startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
         </if>
         <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{filterPageVO.endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
         </if>
         <if test="filterPageVO.isReject != null">
             AND d.is_reject = #{filterPageVO.isReject}
@@ -433,10 +433,10 @@
             AND a.hospital_id = #{filterPageVO.hospitalId}
         </if>
         <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{filterPageVO.startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
         </if>
         <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{filterPageVO.endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
         </if>
         ) t2
         ) t
@@ -492,10 +492,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         GROUP BY
         d.cases_entry_id,
@@ -528,10 +528,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         ) t2
         ORDER BY
@@ -560,10 +560,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -601,10 +601,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="deptClass != null and deptClass != ''">
             AND e.dept_name = #{deptClass}
@@ -641,10 +641,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         <if test="gradeType != null and gradeType != ''">
             AND c.grade_type = #{gradeType}
@@ -700,10 +700,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         GROUP BY
         d.cases_id,
@@ -766,10 +766,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         GROUP BY
         d.cases_entry_id,
@@ -807,10 +807,10 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
         </if>
         <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -890,10 +890,10 @@
             AND a.hospital_id = #{filterPageByDeptVO.hospitalId}
         </if>
         <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{filterPageByDeptVO.startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
         </if>
         <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{filterPageByDeptVO.endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
         </if>
         <if test="filterPageByDeptVO.deptName != null and filterPageByDeptVO.deptName != ''">
             AND a.beh_dept_name = #{filterPageByDeptVO.deptName}
@@ -950,10 +950,10 @@
             AND a.hospital_id = #{filterPageByDeptVO.hospitalId}
         </if>
         <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{filterPageByDeptVO.startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
         </if>
         <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{filterPageByDeptVO.endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
         </if>
         <if test="filterPageByDeptVO.deptName != null and filterPageByDeptVO.deptName != ''">
             AND a.beh_dept_name = #{filterPageByDeptVO.deptName}
@@ -1017,10 +1017,10 @@
             AND a.hospital_id = #{filterPageVO.hospitalId}
         </if>
         <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{filterPageVO.startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
         </if>
         <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{filterPageVO.endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
         </if>
         <if test="filterPageVO.deptName != null and filterPageVO.deptName != ''">
             AND a.beh_dept_name like CONCAT('%', #{filterPageVO.deptName},'%')
@@ -1053,10 +1053,10 @@
             AND a.hospital_id = #{filterPageVO.hospitalId}
         </if>
         <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{filterPageVO.startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
         </if>
         <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{filterPageVO.endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
         </if>
         <if test="filterPageVO.deptName != null and filterPageVO.deptName != ''">
             AND a.beh_dept_name like CONCAT('%', #{filterPageVO.deptName},'%')
@@ -1135,10 +1135,10 @@
             AND a.hospital_id = #{filterPageVO.hospitalId}
         </if>
         <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{filterPageVO.startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
         </if>
         <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{filterPageVO.endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
         </if>
         <if test="filterPageVO.deptName != null and filterPageVO.deptName != ''">
             AND a.beh_dept_name = #{filterPageVO.deptName}
@@ -1188,10 +1188,10 @@
             AND a.hospital_id = #{filterPageVO.hospitalId}
         </if>
         <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{filterPageVO.startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
         </if>
         <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{filterPageVO.endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
         </if>
         <if test="filterPageVO.deptName != null and filterPageVO.deptName != ''">
             AND a.beh_dept_name  =  #{filterPageVO.deptName}
@@ -1236,10 +1236,10 @@
             AND a.hospital_id = #{filterPageVO.hospitalId}
         </if>
         <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{filterPageVO.startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
         </if>
         <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{filterPageVO.endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
         </if>
         <if test="filterPageVO.name != null and filterPageVO.name != ''">
             AND a.beh_dept_name like CONCAT('%', #{filterPageVO.name},'%')
@@ -1278,10 +1278,10 @@
             AND a.hospital_id = #{filterPageVO.hospitalId}
         </if>
         <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{filterPageVO.startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
         </if>
         <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{filterPageVO.endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
         </if>
         <if test="filterPageVO.name != null and filterPageVO.name != ''">
             AND a.beh_dept_name like CONCAT('%', #{filterPageVO.name},'%')
@@ -1358,10 +1358,10 @@
             AND a.hospital_id = #{filterPageByDeptVO.hospitalId}
         </if>
         <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{filterPageByDeptVO.startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
         </if>
         <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{filterPageByDeptVO.endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
         </if>
         <if test="filterPageByDeptVO.deptName != null and filterPageByDeptVO.deptName != ''">
             AND a.beh_dept_name = #{filterPageByDeptVO.deptName}
@@ -1405,10 +1405,10 @@
             AND a.hospital_id = #{filterPageByDeptVO.hospitalId}
         </if>
         <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{filterPageByDeptVO.startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
         </if>
         <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{filterPageByDeptVO.endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
         </if>
         <if test="filterPageByDeptVO.deptName != null and filterPageByDeptVO.deptName != ''">
             AND a.beh_dept_name = #{filterPageByDeptVO.deptName}
@@ -1502,10 +1502,10 @@
             AND a.hospital_id = #{filterPageByDeptVO.hospitalId}
         </if>
         <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{filterPageByDeptVO.startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
         </if>
         <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date < DATE(#{filterPageByDeptVO.endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
         </if>
         <if test="filterPageByDeptVO.deptName != null and filterPageByDeptVO.deptName != ''">
             AND a.beh_dept_name =  #{filterPageByDeptVO.deptName}
@@ -1572,10 +1572,10 @@
             AND a.hospital_id = #{filterPageByDeptVO.hospitalId}
         </if>
         <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= DATE(#{filterPageByDeptVO.startDate})]]>
+            <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
         </if>
         <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date < DATE(#{filterPageByDeptVO.endDate})]]>
+            <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
         </if>
         <if test="filterPageByDeptVO.deptName != null and filterPageByDeptVO.deptName != ''">
             AND a.beh_dept_name =  #{filterPageByDeptVO.deptName}