Browse Source

平均分bug处理

zhanghang 3 năm trước cách đây
mục cha
commit
e2c787b427

+ 24 - 0
src/main/java/com/diagbot/facade/ConsoleByDoctorFacade.java

@@ -128,6 +128,18 @@ public class ConsoleByDoctorFacade {
      * @return
      */
     public IPage<GetDoctorDetailPageDTO> getDoctorDetailPage(GetDoctorDetailPageVO getDoctorDetailPageVO) {
+        if("-".equals(getDoctorDetailPageVO.getDeptId())){
+            getDoctorDetailPageVO.setDeptId("-0");
+        }
+        if("-".equals(getDoctorDetailPageVO.getDeptName())){
+            getDoctorDetailPageVO.setDeptName("-0");
+        }
+        if("-".equals(getDoctorDetailPageVO.getDoctorId())){
+            getDoctorDetailPageVO.setDoctorId("-0");
+        }
+        if("-".equals(getDoctorDetailPageVO.getDoctorName())){
+            getDoctorDetailPageVO.setDoctorName("-0");
+        }
         getDoctorDetailPageVO.setHospitalId(SysUserUtils.getCurrentHospitalID());
         IPage<GetDoctorDetailPageDTO> detailPageList = behospitalInfoFacade.getBaseMapper().getDoctorDetailPage(getDoctorDetailPageVO);
         return detailPageList;
@@ -140,6 +152,18 @@ public class ConsoleByDoctorFacade {
      * @return
      */
     public IPage<GetDetailRecordListPageDTO> getDetailRecordListPage(GetDetailRecordListPageVO getDetailRecordListPageVO) {
+        if("-".equals(getDetailRecordListPageVO.getDeptId())){
+            getDetailRecordListPageVO.setDeptId("-0");
+        }
+        if("-".equals(getDetailRecordListPageVO.getDeptName())){
+            getDetailRecordListPageVO.setDeptName("-0");
+        }
+        if("-".equals(getDetailRecordListPageVO.getDoctorId())){
+            getDetailRecordListPageVO.setDoctorId("-0");
+        }
+        if("-".equals(getDetailRecordListPageVO.getDoctorName())){
+            getDetailRecordListPageVO.setDoctorName("-0");
+        }
         getDetailRecordListPageVO.setHospitalId(SysUserUtils.getCurrentHospitalID());
         IPage<GetDetailRecordListPageDTO> detailPageList = behospitalInfoFacade.getBaseMapper().getDetailRecordListPage(getDetailRecordListPageVO);
         return detailPageList;

+ 36 - 16
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -20425,18 +20425,30 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{getDoctorDetailPageVO.endDate}]]>
             </if>
         </if>
-        <if test="getDoctorDetailPageVO.deptName != null and getDoctorDetailPageVO.deptName != ''">
+        <if test="getDoctorDetailPageVO.deptName != null and getDoctorDetailPageVO.deptName != '' and getDoctorDetailPageVO.deptName != '-0'">
             AND a.beh_dept_name = #{getDoctorDetailPageVO.deptName}
         </if>
-        <if test="getDoctorDetailPageVO.deptId != null and getDoctorDetailPageVO.deptId != ''">
+        <if test="getDoctorDetailPageVO.deptName == '-0'">
+            AND a.beh_dept_name = '-'
+        </if>
+        <if test="getDoctorDetailPageVO.deptId != null and getDoctorDetailPageVO.deptId != '' and getDoctorDetailPageVO.deptId != '-0'">
             AND a.beh_dept_id = #{getDoctorDetailPageVO.deptId}
         </if>
-        <if test="getDoctorDetailPageVO.doctorId != null and getDoctorDetailPageVO.doctorId != ''">
+        <if test="getDoctorDetailPageVO.deptId == '-0'">
+            AND a.beh_dept_id = '-'
+        </if>
+        <if test="getDoctorDetailPageVO.doctorId != null and getDoctorDetailPageVO.doctorId != '' and getDoctorDetailPageVO.doctorId != '-0'">
             AND a.doctor_id = #{getDoctorDetailPageVO.doctorId}
         </if>
-        <if test="getDoctorDetailPageVO.doctorName != null and getDoctorDetailPageVO.doctorName != ''">
+        <if test="getDoctorDetailPageVO.doctorId == '-0'">
+            AND a.doctor_id = '-'
+        </if>
+        <if test="getDoctorDetailPageVO.doctorName != null and getDoctorDetailPageVO.doctorName != '' and getDoctorDetailPageVO.doctorName != '-0' ">
             AND a.doctor_name =  #{getDoctorDetailPageVO.doctorName}
         </if>
+        <if test="getDoctorDetailPageVO.doctorName == '-0'">
+            AND a.doctor_name = '-'
+        </if>
         <if test="getDoctorDetailPageVO.casesId != null and getDoctorDetailPageVO.casesId != 0">
             AND d.cases_id = #{getDoctorDetailPageVO.casesId}
         </if>
@@ -20645,12 +20657,30 @@
         <if test="getDetailRecordListPageVO.diagnose != null and getDetailRecordListPageVO.diagnose != ''">
             AND a.diagnose LIKE CONCAT( '%', #{getDetailRecordListPageVO.diagnose}, '%' )
         </if>
-        <if test="getDetailRecordListPageVO.deptName != null and getDetailRecordListPageVO.deptName != ''">
+        <if test="getDetailRecordListPageVO.deptName != null and getDetailRecordListPageVO.deptName != '' and getDetailRecordListPageVO.deptName != '-0'">
             AND a.beh_dept_name = #{getDetailRecordListPageVO.deptName}
         </if>
-        <if test="getDetailRecordListPageVO.deptId != null and getDetailRecordListPageVO.deptId != ''">
+        <if test="getDetailRecordListPageVO.deptName == '-0'">
+            AND a.beh_dept_name = '-'
+        </if>
+        <if test="getDetailRecordListPageVO.deptId != null and getDetailRecordListPageVO.deptId != '' and getDetailRecordListPageVO.deptId != '-0'">
             AND a.beh_dept_id = #{getDetailRecordListPageVO.deptId}
         </if>
+        <if test="getDetailRecordListPageVO.deptId == '-0'">
+            AND a.beh_dept_id = '-'
+        </if>
+        <if test="getDetailRecordListPageVO.doctorId != null and getDetailRecordListPageVO.doctorId != '' and getDetailRecordListPageVO.doctorId != '-0'">
+            AND a.doctor_id = #{getDetailRecordListPageVO.doctorId}
+        </if>
+        <if test="getDetailRecordListPageVO.doctorId == '-0'">
+            AND a.doctor_id = '-'
+        </if>
+        <if test="getDetailRecordListPageVO.doctorName != null and getDetailRecordListPageVO.doctorName != '' and getDetailRecordListPageVO.doctorName != '-0' ">
+            AND a.doctor_name =  #{getDetailRecordListPageVO.doctorName}
+        </if>
+        <if test="getDetailRecordListPageVO.doctorName == '-0'">
+            AND a.doctor_name = '-'
+        </if>
         <if test="getDetailRecordListPageVO.level != null and getDetailRecordListPageVO.level != ''">
             AND b.`level` = #{getDetailRecordListPageVO.level}
         </if>
@@ -20672,16 +20702,6 @@
         <if test="getDetailRecordListPageVO.casesId != null">
             AND d.cases_id = #{getDetailRecordListPageVO.casesId}
         </if>
-        <if test="getDetailRecordListPageVO.doctorId != null and getDetailRecordListPageVO.doctorId != ''">
-            AND (a.doctor_id LIKE CONCAT( '%', #{getDetailRecordListPageVO.doctorId}, '%' )
-            OR a.beh_doctor_id LIKE CONCAT( '%', #{getDetailRecordListPageVO.doctorId}, '%' )
-            OR a.director_doctor_id LIKE CONCAT( '%', #{getDetailRecordListPageVO.doctorId}, '%' ))
-        </if>
-        <if test="getDetailRecordListPageVO.doctorName != null and getDetailRecordListPageVO.doctorName != ''">
-            AND (a.doctor_name LIKE CONCAT( '%', #{getDetailRecordListPageVO.doctorName}, '%' )
-            OR a.beh_doctor_name LIKE CONCAT( '%', #{getDetailRecordListPageVO.doctorName}, '%' )
-            OR a.director_doctor_name LIKE CONCAT( '%', #{getDetailRecordListPageVO.doctorName}, '%' ))
-        </if>
         <if test="getDetailRecordListPageVO.isReject != null">
             AND c.is_reject = #{getDetailRecordListPageVO.isReject}
         </if>