瀏覽代碼

案卷查阅显示已经删除节点上的案卷的bug

laibulaizheli 2 月之前
父節點
當前提交
4a79c5205e

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

@@ -559,7 +559,7 @@
         select uaa.*
         from m_archive_tree_contract matc left join u_archives_auto uaa on matc.id = uaa.node_id left join
         u_archive_file uaf on uaa.id = uaf.archive_id
-        where uaa.is_deleted = 0 and uaa.is_archive = 1
+        where uaa.is_deleted = 0  and matc.is_deleted = 0 and uaa.is_archive = 1
             and matc.project_id = #{vo.projectId}
         <if test="vo.contractId != null and vo.contractId != ''">
             and uaa.contract_id = #{vo.contractId} and matc.contract_id = #{vo.contractId}
@@ -607,7 +607,7 @@
     <select id="pageByArchivesAuto11" resultMap="archivesAutoResultMap">
         select uaa.*
         from m_archive_tree_contract matc left join u_archives_auto uaa on matc.id = uaa.node_id
-        where uaa.is_deleted = 0 and uaa.is_archive = 1
+        where uaa.is_deleted = 0 and matc.is_deleted = 0 and uaa.is_archive = 1
         <if test="vo.queryValue != null and vo.queryValue != ''">
             and (uaa.name like concat('%',#{vo.queryValue},'%') or uaa.file_number like concat('%',#{vo.queryValue},'%'))
         </if>

+ 17 - 5
blade-service/blade-archive/src/main/java/org/springblade/archive/service/impl/ArchiveAutoPdfServiceImpl.java

@@ -73,10 +73,10 @@ public class ArchiveAutoPdfServiceImpl implements IArchiveAutoPdfService {
 //        URL_MAP.put("r_Archives_spare", "https://bladex-chongqing-info.oss-cn-hangzhou.aliyuncs.com//upload/20230414/3798f8c3db6f94c8fce63eec8c716d6c.xlsx");
 //        URL_MAP.put("r_Archives_back", "https://bladex-chongqing-info.oss-cn-hangzhou.aliyuncs.com//upload/20230413/31081917b41e12b9b0359f6a9c1755bd.xlsx");
 
-        URL_MAP.put("r_Archives_front", "https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20230413/306c87ffc640699aa92d53a5f4e6d632.xlsx");
-        URL_MAP.put("r_Archives_catalog", "https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20230413/f2a083fca685c646e4a47daaaa46f04b.xlsx");
-        URL_MAP.put("r_Archives_spare", "https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20230414/3798f8c3db6f94c8fce63eec8c716d6c.xlsx");
-        URL_MAP.put("r_Archives_back", "https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20230413/31081917b41e12b9b0359f6a9c1755bd.xlsx");
+        URL_MAP.put("r_Archives_front", "https://xinan1.zos.ctyun.cn/blade-oss-chongqing/upload/20230413/306c87ffc640699aa92d53a5f4e6d632.xlsx");
+        URL_MAP.put("r_Archives_catalog", "https://xinan1.zos.ctyun.cn/blade-oss-chongqing/upload/20230413/f2a083fca685c646e4a47daaaa46f04b.xlsx");
+        URL_MAP.put("r_Archives_spare", "https://xinan1.zos.ctyun.cn/blade-oss-chongqing/upload/20230414/3798f8c3db6f94c8fce63eec8c716d6c.xlsx");
+        URL_MAP.put("r_Archives_back", "https://xinan1.zos.ctyun.cn/blade-oss-chongqing/upload/20230413/31081917b41e12b9b0359f6a9c1755bd.xlsx");
 
         NAME_MAP.put("r_Archives_front", "封面");
         NAME_MAP.put("r_Archives_catalog", "卷内目录");
@@ -551,6 +551,18 @@ public class ArchiveAutoPdfServiceImpl implements IArchiveAutoPdfService {
             }
         }
 
+        if ("Archive['secretLevel']".equals(formula)){
+            if (object!= null ) {
+                String strObject = object.toString();
+                if (strObject.contains("null")) {
+                    strObject = strObject.replace("null", "");
+                    object =  strObject;
+                }
+            }else {
+                object = "";
+            }
+        }
+
         dataInfo.put(key, object);
     }
 
@@ -626,7 +638,7 @@ public class ArchiveAutoPdfServiceImpl implements IArchiveAutoPdfService {
                     String myData = DataInfo.get(val) + "";
 
 
-                    if (myData.indexOf("http") >= 0 && (myData.indexOf("aliyuncs") >= 0 ||myData.indexOf("183.247.216.148") >= 0)) {
+                    if (myData.indexOf("http") >= 0 && (myData.indexOf("ctyun") >= 0 ||myData.indexOf("183.247.216.148") >= 0)) {
 
                         InputStream imageIn = CommonUtil.getOSSInputStream(myData);
                         byte[] bytes = IOUtils.toByteArray(imageIn);

+ 3 - 3
blade-service/blade-archive/src/main/java/org/springblade/archive/utils/FileUtils.java

@@ -293,7 +293,7 @@ public class FileUtils {
 
             for (String urlStr : urlList) {
                 try {
-                    if (urlStr.indexOf("https") >= 0 && urlStr.indexOf("aliyuncs") >= 0) {
+                    if (urlStr.indexOf("https") >= 0 && urlStr.indexOf("ctyun") >= 0) {
                         int lastIndexOf = urlStr.lastIndexOf("/");
                         String prefix = urlStr.substring(0, lastIndexOf + 1);
                         String suffix = urlStr.substring(lastIndexOf + 1);
@@ -516,7 +516,7 @@ public class FileUtils {
 
                     String fileNameWithoutExtension = fileNameWithExtension.substring(0, fileNameWithExtension.lastIndexOf("."));
 
-                    if (url.indexOf("https") >= 0 && url.indexOf("aliyuncs") >= 0) {
+                    if (url.indexOf("https") >= 0 && url.indexOf("ctyun") >= 0) {
                         int lastIndexOf = url.lastIndexOf("/");
                         String prefix = url.substring(0, lastIndexOf + 1);
                         String suffix = url.substring(lastIndexOf + 1);
@@ -661,7 +661,7 @@ public class FileUtils {
 
                     String fileNameWithoutExtension = fileNameWithExtension.substring(0, fileNameWithExtension.lastIndexOf("."));
 
-                    if (url.indexOf("https") >= 0 && url.indexOf("aliyuncs") >= 0) {
+                    if (url.indexOf("https") >= 0 && url.indexOf("ctyun") >= 0) {
                         int lastIndexOf = url.lastIndexOf("/");
                         String prefix = url.substring(0, lastIndexOf + 1);
                         String suffix = url.substring(lastIndexOf + 1);