zhangyuewww 4 年之前
父節點
當前提交
339717e001
共有 1 個文件被更改,包括 22 次插入2 次删除
  1. 22 2
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/TranProcessInfoMapper.xml

+ 22 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/TranProcessInfoMapper.xml

@@ -10,7 +10,6 @@
         left join tran_process_info p on t.id=p.info_id
         WHERE
         t.comp_id = #{compId}
-        and p.tran_type_key=#{tranTypeKey}
         and p.delete_flag = '0'
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 1">
@@ -20,6 +19,17 @@
                 AND p.status_flag = '3'
             </if>
         </if>
+        <if test="tranTypeKey != null and tranTypeKey != ''">
+            <if test="tranTypeKey == 1">
+                AND p.tran_type_key = '1'
+            </if>
+            <if test="tranTypeKey == 2">
+                AND p.tran_type_key = '2'
+            </if>
+            <if test="tranTypeKey == 3">
+                AND p.tran_type_key = '3'
+            </if>
+        </if>
         <if test="startDate != null">
             AND (DATE_FORMAT(p.receiving_date,"%Y%m%d") &gt;=
             DATE_FORMAT(#{startDate},"%Y%m%d"))
@@ -55,7 +65,6 @@
         LEFT JOIN tran_process_info p ON t.id=p.info_id
         WHERE
         t.comp_id = #{compId}
-        and p.tran_type_key=#{tranTypeKey}
         and p.delete_flag = '0'
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 1">
@@ -65,6 +74,17 @@
                 AND p.status_flag = '3'
             </if>
         </if>
+        <if test="tranTypeKey != null and tranTypeKey != ''">
+            <if test="tranTypeKey == 1">
+                AND p.tran_type_key = '1'
+            </if>
+            <if test="tranTypeKey == 2">
+                AND p.tran_type_key = '2'
+            </if>
+            <if test="tranTypeKey == 3">
+                AND p.tran_type_key = '3'
+            </if>
+        </if>
         <if test="startDate != null">
             AND (DATE_FORMAT(p.receiving_date,"%Y%m%d") &gt;=
             DATE_FORMAT(#{startDate},"%Y%m%d"))