Ver Fonte

查询案卷

“zhifk” há 2 anos atrás
pai
commit
98b02ddabf

+ 11 - 0
blade-service/blade-archive/src/main/java/org/springblade/archive/mapper/ArchivesAutoMapper.xml

@@ -77,6 +77,17 @@
         <if test="vo.isAutoFile != null and vo.isAutoFile != ''">
             and is_auto_file = #{vo.isAutoFile}
         </if>
+        <choose>
+            <when test="vo.isArchive != null and vo.isArchive != ''">
+                and  is_auto_file = #{vo.isArchive}
+            </when>
+            <otherwise>
+                and (is_auto_file is null or is_auto_file != 1)
+            </otherwise>
+        </choose>
+        <if test="vo.isAutoFile != null and vo.isAutoFile != ''">
+            and is_auto_file = #{vo.isAutoFile}
+        </if>
         <if test="vo.nodeIds != null and vo.nodeIds != ''">
             and node_id in
             <foreach collection="vo.nodeIdArray" item="nodeId" open="(" separator="," close=")">

+ 12 - 2
blade-service/blade-business/src/main/java/org/springblade/business/mapper/ArchiveFileMapper.xml

@@ -66,7 +66,7 @@
     </update>
 
     <select id="selectArchiveFileCount" resultType="java.lang.Integer">
-        select count(id) from u_archive_file where is_deleted = 0  and (is_auto_file is null or is_auto_file != 1)
+        select count(id) from u_archive_file where is_deleted = 0
         <if test="vo.isApprovalValue != null and vo.isApprovalValue != ''">
             and status = #{vo.isApprovalValue}
         </if>
@@ -79,7 +79,17 @@
         <if test="vo.contractId != null and vo.contractId != ''">
             and contract_id = #{vo.contractId}
         </if>
-
+        <if test="vo.archiveId != null and vo.archiveId != ''">
+            and archive_id = #{vo.archiveId}
+        </if>
+        <choose>
+            <when test="vo.isArchive != null and vo.isArchive != ''">
+                and  is_auto_file = #{vo.isArchive}
+            </when>
+            <otherwise>
+                and (is_auto_file is null or is_auto_file != 1)
+            </otherwise>
+        </choose>
         <if test="vo.nodeIds != null and vo.nodeIds != ''">
             and node_id in
             <foreach collection="vo.nodeIdArray" item="nodeId" open="(" separator="," close=")">