Browse Source

选择临检月份和检验类型排序时,只显示改检验类型在临检月份内的数据补充

liyuhui_ex 1 week ago
parent
commit
03c8148313

+ 6 - 6
tz-module-pressure2/tz-module-pressure2-biz/src/main/resources/mapper/equippipescheduling/EquipPipeSchedulingMapper.xml

@@ -385,16 +385,16 @@
                     #{listItem}
                 </foreach>
             </if>
-            <if test="nextDate != null and nextDate.size() >= 2 and (order == null or order == '')">
+            <if test="nextDate != null and nextDate.size() >= 2 and ((sort != 'nextLegalCheckDate' and sort != 'nextYearCheckDate') or order == null or order == '')">
                 AND (
                 (eb.NEXT_LEGAL_CHECK_DATE BETWEEN #{nextDate[0]} AND #{nextDate[1]})
                 OR (eb.NEXT_YEAR_CHECK_DATE BETWEEN #{nextDate[0]} AND #{nextDate[1]})
                 )
             </if>
-            <if test="nextDate != null and nextDate.size() >=2 and sort != null and sort == 'nextLegalCheckDate' and order != null and order != ''">
+            <if test="nextDate != null and nextDate.size() >=2 and sort == 'nextLegalCheckDate' and order != null and order != ''">
                 AND eb.NEXT_LEGAL_CHECK_DATE BETWEEN #{nextDate[0]} AND #{nextDate[1]}
             </if>
-            <if test="nextDate != null and nextDate.size() >=2 and sort != null and sort == 'nextYearCheckDate' and order != null and order != ''">
+            <if test="nextDate != null and nextDate.size() >=2 and sort == 'nextYearCheckDate' and order != null and order != ''">
                 AND eb.NEXT_YEAR_CHECK_DATE BETWEEN #{nextDate[0]} AND #{nextDate[1]}
             </if>
             <if test="typeList != null and typeList.size() > 0">
@@ -490,16 +490,16 @@
                     #{listItem}
                 </foreach>
             </if>
-            <if test="nextDate != null and nextDate.size() >= 2 and (order == null or order == '')">
+            <if test="nextDate != null and nextDate.size() >= 2 and ((sort != 'nextLegalCheckDate' and sort != 'nextYearCheckDate') or order == null or order == '')">
                 AND (
                 (eb.NEXT_LEGAL_CHECK_DATE BETWEEN #{nextDate[0]} AND #{nextDate[1]})
                 OR (eb.NEXT_YEAR_CHECK_DATE BETWEEN #{nextDate[0]} AND #{nextDate[1]})
                 )
             </if>
-            <if test="nextDate != null and nextDate.size() >=2 and sort != null and sort == 'nextLegalCheckDate' and order != null and order != ''">
+            <if test="nextDate != null and nextDate.size() >=2 and sort == 'nextLegalCheckDate' and order != null and order != ''">
                 AND eb.NEXT_LEGAL_CHECK_DATE BETWEEN #{nextDate[0]} AND #{nextDate[1]}
             </if>
-            <if test="nextDate != null and nextDate.size() >=2 and sort != null and sort == 'nextYearCheckDate' and order != null and order != ''">
+            <if test="nextDate != null and nextDate.size() >=2 and sort == 'nextYearCheckDate' and order != null and order != ''">
                 AND eb.NEXT_YEAR_CHECK_DATE BETWEEN #{nextDate[0]} AND #{nextDate[1]}
             </if>
             <if test="typeList != null and typeList.size() > 0">