瀏覽代碼

自定义流程接口-流程审批列表查询条件修复

wangliang 3 年之前
父節點
當前提交
e907da0ee9
共有 1 個文件被更改,包括 15 次插入4 次删除
  1. 15 4
      distributed-print-business/src/main/resources/mapper/TFFlowApproveMapper.xml

+ 15 - 4
distributed-print-business/src/main/resources/mapper/TFFlowApproveMapper.xml

@@ -71,10 +71,21 @@
             <if test="teachingRoomId != null and teachingRoomId != ''">
                 and et.teaching_room_id = #{teachingRoomId}
             </if>
-             and (tffa.status <![CDATA[ <> ]]> 'START'
-            <if test="status != null and status != ''">
-                 or tffa.status = #{status}
-            </if>)
+            <choose>
+                <when test="status != null and status != ''">
+                    <choose>
+                        <when test="status == 'START'">
+                            and tffa.status = #{status}
+                        </when>
+                        <otherwise>
+                            and (tffa.status <![CDATA[ <> ]]> 'START' and tffa.status = #{status})
+                        </otherwise>
+                    </choose>
+                </when>
+                <otherwise>
+                    and tffa.status <![CDATA[ <> ]]> 'START'
+                </otherwise>
+            </choose>
             <if test="startTime != null and startTime != ''">
                 and tffa.create_time <![CDATA[ >= ]]> #{startTime}
             </if>