wangliang 4 سال پیش
والد
کامیت
53407b8af2
1فایلهای تغییر یافته به همراه14 افزوده شده و 12 حذف شده
  1. 14 12
      themis-business/src/main/resources/mapper/TOeExamRecordMapper.xml

+ 14 - 12
themis-business/src/main/resources/mapper/TOeExamRecordMapper.xml

@@ -201,18 +201,6 @@
 			<if test="minWarningCount != null and minWarningCount != '' or minWarningCount == 0">
 				and t.warning_count &gt;= #{minWarningCount}
 			</if>
-			<if test="minExceptionCount != null and minExceptionCount != '' or minExceptionCount == 0">
-				and t.exceptionCount &gt;= #{minExceptionCount}
-			</if>
-			<if test="maxExceptionCount != null and maxExceptionCount != '' or maxExceptionCount == 0">
-				and t.exceptionCount &lt;= #{maxExceptionCount}
-			</if>
-			<if test="minMultipleFaceCount != null and minMultipleFaceCount != '' or minMultipleFaceCount == 0">
-				and t.multipleFaceCount &gt;= #{minMultipleFaceCount}
-			</if>
-			<if test="maxMultipleFaceCount != null and maxMultipleFaceCount != '' or maxMultipleFaceCount == 0">
-				and t.multipleFaceCount &lt;= #{maxMultipleFaceCount}
-			</if>
 		</where>
 	</sql>
 
@@ -600,6 +588,20 @@
 		</if>
 		) t,
 		(SELECT @i := 0) as i
+		<where>
+			<if test="minMultipleFaceCount != null and minMultipleFaceCount != '' or minMultipleFaceCount == 0">
+				and t.multipleFaceCount &gt;= #{minMultipleFaceCount}
+			</if>
+			<if test="maxMultipleFaceCount != null and maxMultipleFaceCount != '' or maxMultipleFaceCount == 0">
+				and t.multipleFaceCount &lt;= #{maxMultipleFaceCount}
+			</if>
+			<if test="minExceptionCount != null and minExceptionCount != '' or minExceptionCount == 0">
+				and t.exceptionCount &gt;= #{minExceptionCount}
+			</if>
+			<if test="maxExceptionCount != null and maxExceptionCount != '' or maxExceptionCount == 0">
+				and t.exceptionCount &lt;= #{maxExceptionCount}
+			</if>
+		</where>
 		order by t.roomCode
 	</select>