Ver código fonte

薪酬文件下载

zhouger 5 meses atrás
pai
commit
aec960e070

+ 4 - 2
src/main/java/fi/em/formPlugin/SalaryDownloadFilePlugin.java

@@ -63,9 +63,11 @@ public class SalaryDownloadFilePlugin extends AbstractFormPlugin {
             SftpClient sftpClient=new SftpClient(serverurl,user,password,port);
             //获取服务器链接
             sftpClient.connect();
-            sftpClient.downloadFile(filepath,fileLocalpath+"\\"+displayName+filename);
+            sftpClient.downloadFile(filepath,fileLocalpath+"/"+nckd_entrytype+".xls");
+            new File(fileLocalpath+"/"+nckd_entrytype+".xls")
+                    .renameTo(new File(fileLocalpath+"/"+displayName+filename));
             sftpClient.disconnect();
-            this.getView().showMessage("文件下载成功,文件位置:"+fileLocalpath+"\\"+displayName+filename);
+            this.getView().showMessage("文件下载成功,文件位置:"+fileLocalpath+"/"+displayName+filename);
         } catch (Exception e) {
             throw new RuntimeException(e);
         }