瀏覽代碼

【三坐标检测】返回日期 + 文件名

lxb 2 年之前
父節點
當前提交
d105394ce1

+ 7 - 1
imcs-admin-boot/imcs-common/src/main/java/com/github/zuihou/common/util/SmbShareFileUtil.java

@@ -347,7 +347,13 @@ public class SmbShareFileUtil {
                         return 0;
                     })).findFirst().get();
 
-                    returnFileName =  smbFile.getName();
+                    //smb://192.168.11.240/report/2023-7-23/OP41__.pdf 适应存储路径格式发生变化,但一定是以日期存储
+                    String[] split = smbFile.getPath().split("/");
+
+                    int length = split.length;
+
+                    //2023-7-23/OP41__.pdf
+                    returnFileName = split[length-2] + "/" + split[length-1];
                 }
             }
         } catch (Exception e) {