Explorar o código

Merge remote-tracking branch 'origin/master'

18339543638 hai 5 meses
pai
achega
84f22f89d4

+ 3 - 0
tr-modules/tr-module-smartFollowUp/src/main/resources/mapper/smart/BizClinicRoomMapper.xml

@@ -98,6 +98,7 @@
         bcr.assess_count
         FROM biz_clinic_room bcr
         <where>
+            and bcr.deleted = 0
             <if test="source.clinicStatus != null and source.clinicStatus != ''">
                 and bcr.clinic_status = #{source.clinicStatus ,jdbcType=VARCHAR}
             </if>
@@ -189,6 +190,7 @@
         LEFT JOIN biz_clinic_room_wx_user bcrwu ON bcr.id = bcrwu.clinic_room_id
         LEFT JOIN biz_clinic_room_doctor_user bcrdu on bcr.id = bcrdu.clinic_room_id
         <where>
+            and bcr.deleted = 0
             <if test="queryDTO.deptId != null and queryDTO.deptId != ''">
                 and bcr.dept_id = #{queryDTO.deptId}
             </if>
@@ -221,6 +223,7 @@
             biz_clinic_room bcr
                 JOIN biz_clinic_room_doctor_user bcrdu ON bcr.ID = bcrdu.clinic_room_id
         <where>
+            and bcr.deleted = 0
             <if test="patientId != null and patientId != ''">
                 and bcr.patient_id = #{patientId}
             </if>

+ 6 - 1
tr-modules/tr-module-smartFollowUp/src/main/resources/mapper/smart/BizPatientMapper.xml

@@ -33,6 +33,7 @@
         FROM
         ( SELECT patient_id, COUNT ( 1 ) AS result_count FROM biz_clinic_room
         <where>
+            and deleted = 0
             <if test="query.queryTime != null and query.queryTime.size() > 0">
                 AND clinic_start_time &gt;= #{query.queryTime[0]}
             </if>
@@ -44,6 +45,8 @@
         JOIN biz_patient AS bp ON query_result.patient_id = bp.ID
         LEFT JOIN biz_clinic_room bcr ON bp.current_clinic_id = bcr.ID
         <where>
+            and bcr.deleted = 0
+            and bp.deleted = 0
             <if test="query.queryCondition != null and query.queryCondition != ''">
                 bp.patient_code LIKE concat('%',#{query.queryCondition,jdbcType=VARCHAR},'%')
                 or bp.name like concat('%',#{query.queryCondition,jdbcType=VARCHAR},'%')
@@ -80,7 +83,9 @@
             biz_patient bp
                 LEFT JOIN biz_clinic_room bcr ON bp.current_clinic_id = bcr.ID
         <where>
-            bp.current_clinic_id is not null
+            and bp.deleted = 0
+            and bcr.deleted = 0
+            and bp.current_clinic_id is not null
             <if test="query.condition != null and query.condition != ''">
                and bcr.patient_name like concat('%',#{query.condition,jdbcType=VARCHAR},'%')
             </if>