xda 3 سال پیش
والد
کامیت
706dbf466c

+ 3 - 3
src/main/resources/mapper/RepalBillMapper.xml

@@ -223,7 +223,7 @@
         <if test="userId != null">
             LEFT JOIN REPAL_RESPONSIBLE_PERSON AS rPerson ON bill.ID = rPerson.REPAL_BILL_ID
         </if>
-        WHERE bill.REPAL_BOOK_ID = #{repalBookId}
+        WHERE bill.REPAL_BOOK_ID = #{repalBookId} AND bill.DELETED = 0
         <if test="userId != null">
             AND rPerson.USER_ID = #{userId}
         </if>
@@ -234,7 +234,7 @@
         <if test="userId != null">
             LEFT JOIN REPAL_RESPONSIBLE_PERSON AS rPerson ON bill.ID = rPerson.REPAL_BILL_ID
         </if>
-        WHERE bill.REPAL_BOOK_ID = #{repalBookId} AND bill.REPAL_BILL_TYPE = 1
+        WHERE bill.REPAL_BOOK_ID = #{repalBookId} AND bill.REPAL_BILL_TYPE = 1 AND bill.DELETED = 0
         <if test="start != null">
             AND  bill.DIAGNOSIS_DATETIME >= #{start}
         </if>
@@ -262,7 +262,7 @@
         <if test="userId != null">
             LEFT JOIN REPAL_RESPONSIBLE_PERSON AS rPerson ON bill.ID = rPerson.REPAL_BILL_ID
         </if>
-        WHERE bill.REPAL_BOOK_ID = #{repalBookId}
+        WHERE bill.REPAL_BOOK_ID = #{repalBookId} AND bill.DELETED = 0
         <if test="repalBillStatus == 2">
             AND bill.REPAL_BILL_STATUS = 2
         </if>

+ 1 - 1
src/main/resources/mapper/RepalChangeRecordMapper.xml

@@ -9,7 +9,7 @@
         <if test="userId != null">
             LEFT JOIN REPAL_RESPONSIBLE_PERSON AS rPerson ON record.REPAL_BILL_ID = rPerson.REPAL_BILL_ID
         </if>
-        WHERE record.REPAL_BOOK_ID = #{repalBookId}
+        WHERE record.REPAL_BOOK_ID = #{repalBookId} AND bill.DELETED = 0
         <if test="start != null">
             AND  record.RECORD_DATE >= #{start}
         </if>

+ 2 - 1
src/main/resources/mapper/RepalRemindHistoryMapper.xml

@@ -95,8 +95,9 @@
         <if test="userId != null">
         LEFT JOIN REPAL_RESPONSIBLE_PERSON AS rPerson ON rPerson.REPAL_BOOK_ID = #{repalBookId}
         </if>
+        LEFT JOIN REPAL_BILL AS bill ON bill.ID = tt.REPAL_BILL_ID
         WHERE
-        tt.REPAL_BOOK_ID = #{repalBookId}
+        tt.REPAL_BOOK_ID = #{repalBookId} AND bill.DELETED = 0
         <if test="startDateTime != null">
             AND tt.REMIND_TIME >= #{startDateTime}
         </if>