Browse Source

案卷收集

“zhifk” 2 năm trước cách đây
mục cha
commit
618e6db3af

+ 17 - 0
blade-service/blade-archive/src/main/java/org/springblade/archive/controller/ArchiveFileAutoController.java

@@ -182,4 +182,21 @@ public class ArchiveFileAutoController extends BladeController {
         }
 
     }
+
+    /**
+     * 预览
+     */
+    @PostMapping("/mergePdf")
+    @ApiOperationSupport(order = 9)
+    @ApiOperation(value = "预览")
+    public R<Object> mergePdf(@RequestParam String ids){
+        List<ArchiveFile> result = this.archiveFileClient.getArchiveFileByArchivesId(ids,"");
+        List<String> pdfUrls = result.stream().map(archiveFile ->StringUtils.isNotEmpty(archiveFile.getPdfFileUrl())?archiveFile.getPdfFileUrl():archiveFile.getFileUrl()).distinct().collect(Collectors.toList());
+
+//        FileUtils.mergePdfPublicMethods(pdfUrls,"");
+        /**
+         * 案卷的只有一个文件,不合并先,需要的时候在把合并方法放出来
+         * **/
+        return R.data(pdfUrls);
+    }
 }

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

@@ -60,7 +60,7 @@
     </update>
 
     <select id="selectArchiveFileCount" resultType="java.lang.Integer">
-        select count(id) from u_archive_file where is_deleted = 0  and is_auto_file != 1
+        select count(id) from u_archive_file where is_deleted = 0  and (is_auto_file is null or is_auto_file != 1)
         <if test="vo.isApprovalValue != null and vo.isApprovalValue != ''">
             and status = #{vo.isApprovalValue}
         </if>
@@ -93,7 +93,7 @@
     </select>
 
     <select id="selectArchiveFilePage" resultMap="archiveFileResultMap">
-        select * from u_archive_file where is_deleted = 0 and is_auto_file != 1
+        select * from u_archive_file where is_deleted = 0 and (is_auto_file is null or is_auto_file != 1)
         <if test="vo.isApprovalValue != null and vo.isApprovalValue != ''">
             and status = #{vo.isApprovalValue}
         </if>
@@ -126,7 +126,7 @@
     </select>
 
     <select id="selectArchiveFilePageByBoxNameCount" resultType="java.lang.Integer">
-        select count(id) from u_archive_file where is_deleted = 0 and is_auto_file != 1
+        select count(id) from u_archive_file where is_deleted = 0 and (is_auto_file is null or is_auto_file != 1)
         <if test="vo.isApprovalValue != null and vo.isApprovalValue != ''">
             and status = #{vo.isApprovalValue}
         </if>
@@ -168,7 +168,7 @@
         order by box_number,sort,create_time DESC
     </select>
     <select id="selectArchiveFilePageByBoxName" resultMap="archiveFileResultMap">
-        select * from u_archive_file where is_deleted = 0 and is_auto_file != 1
+        select * from u_archive_file where is_deleted = 0 and (is_auto_file is null or is_auto_file != 1)
         <if test="vo.isApprovalValue != null and vo.isApprovalValue != ''">
             and status = #{vo.isApprovalValue}
         </if>