huangtf il y a 2 ans
Parent
commit
37f6792f4a

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

@@ -67,14 +67,14 @@
 
 
     <select id="selectArchivesAutoFileCount" resultType="java.lang.Integer">
-        select count(id) from u_archives_auto where is_deleted = 0
+        select count(id) from u_archives_auto where is_deleted = 0 and is_archive = 1
         <if test="vo.projectId != null and vo.projectId != ''">
             and project_id = #{vo.projectId}
         </if>
         <if test="vo.contractId != null and vo.contractId != ''">
             and contract_id = #{vo.contractId}
         </if>
-        <if test="vo.contractId != null and vo.contractId != ''">
+        <if test="vo.isAutoFile != null and vo.isAutoFile != ''">
             and is_auto_file = #{vo.isAutoFile}
         </if>
         <if test="vo.nodeIds != null and vo.nodeIds != ''">
@@ -86,7 +86,7 @@
     </select>
 
     <select id="selectArchivesAutoFilePage" resultMap="archivesAutoResultMap">
-        select * from u_archives_auto where is_deleted = 0
+        select * from u_archives_auto where is_deleted = 0  and is_archive = 1
         <if test="vo.projectId != null and vo.projectId != ''">
             and project_id = #{vo.projectId}
         </if>
@@ -102,7 +102,7 @@
                 #{nodeId}
             </foreach>
         </if>
-        order by tree_sort DESC,auto_file_sort asc
+        order by tree_sort,auto_file_sort,file_number asc
     </select>
 
     <update id="updateArchivesAutoFileByNodeId" >

+ 2 - 1
blade-service/blade-archive/src/main/java/org/springblade/archive/service/impl/ArchivesAutoServiceImpl.java

@@ -956,7 +956,8 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
 				.eq("is_deleted",0)
 				.eq("is_archive",1)
 				.orderByAsc("tree_sort")
-				.orderByAsc("auto_file_sort");
+				.orderByAsc("auto_file_sort")
+				.orderByAsc("file_number");
 
 		return this.list(queryWrapper);
 	}