zhouger 5 月之前
父节点
当前提交
0553269ff3

+ 0 - 41
src/main/java/fi/em/formPlugin/SalaryDownloadFilePlugin.java

@@ -34,7 +34,6 @@ public class SalaryDownloadFilePlugin extends AbstractFormPlugin {
         String operateKey = arg.getOperateKey();
         //获取下拉列表字段
         ComboProp comboProp = (ComboProp) getModel().getProperty("nckd_entrytype");
-
         //审核操作代码
         String downloadBut="download";
         DynamicObject dynamicObject=this.getModel().getDataEntity(true);
@@ -42,13 +41,11 @@ public class SalaryDownloadFilePlugin extends AbstractFormPlugin {
         //通过下拉值获取下拉标题
         String displayName = comboProp.getItemByName(nckd_entrytype);
         if (downloadBut.equals(operateKey)) {
-//            downFileToLocal(nckd_entrytype);
             QFilter qFilter=new QFilter("number", QCP.equals,"salaryfile");
             //下载模板表单
             DynamicObject nckd_file= BusinessDataServiceHelper.loadSingle("nckd_file",new QFilter[]{qFilter});
             List<Map<String, Object>> list = AttachmentServiceHelper
                     .getAttachments("nckd_file", nckd_file.getPkValue(), "nckd_attachmentpanelap");
-            String myurl = "";
             //获取下载链接并打开
             for(int i = 0; i < list.size(); i++) {
                 String filename=list.get(i).get("name").toString();
@@ -61,43 +58,5 @@ public class SalaryDownloadFilePlugin extends AbstractFormPlugin {
         }
     }
 
-    //根据分录类型,下载对应的分录模板
-    public void downFileToLocal(String nckd_entrytype) {
-        //获取下拉列表字段
-        ComboProp comboProp = (ComboProp) getModel().getProperty("nckd_entrytype");
-        try {
-            //获取文件上传接口配置信息
-            InterFaceImgUtils interFaceImgUtils=new InterFaceImgUtils("downloadurl");
-            //端口号
-            int port= interFaceImgUtils.getPort();
-            //服务器地址
-            String serverurl= interFaceImgUtils.getServerName();
-            //用户
-            String user= interFaceImgUtils.getServerUser();
-            //密码
-            String password= interFaceImgUtils.getServerPassword();
-            //文件名
-            String filename= interFaceImgUtils.getFileName();
-            //获取文件路径
-            String fileurl= interFaceImgUtils.getServerUrl();
-            //文件保存路径
-            String fileLocalpath= interFaceImgUtils.getFileLocalPath();
-            //通过下拉值获取下拉标题
-            String displayName = comboProp.getItemByName(nckd_entrytype);
-            //文件服务器路径
-            String filepath=fileurl+"/"+nckd_entrytype+".xls";
-            //获取sftp链接对象
-            SftpClient sftpClient=new SftpClient(serverurl,user,password,port);
-            //获取服务器链接
-            sftpClient.connect();
-            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);
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
 
 }

+ 0 - 16
src/main/java/sys/sc/formplugin/CreatDatPlugin.java

@@ -56,22 +56,6 @@ public class CreatDatPlugin extends AbstractListPlugin {
             //服务器路径
 //            String nckd_url=jkdataDy.getString("nckd_url");
             String nckd_url=dynamicObject.getString("nckd_filepath");
-//            //生成文件的路径
-////            String filePath=nckd_url+filename;
-////            File dir=new File(filePath);
-////            //不存在则创建文件夹
-////            if (!dir.exists()) {
-////                File parentDir = dir.getParentFile();
-////                if (parentDir != null && !parentDir.exists()) {
-////                    parentDir.mkdirs();
-////                }
-////                try {
-////                    dir.createNewFile();
-////                } catch (IOException e) {
-////                    throw new RuntimeException(e);
-////                }
-////                this.getView().showMessage("创建成功"+filePath);
-////            }
             //分割符号
             String spiltsign=jkdataDy.getString("nckd_split");
             //结束符号

+ 0 - 3
src/main/java/sys/sc/formplugin/TestPlugin.java

@@ -459,12 +459,9 @@ public class TestPlugin  extends AbstractListPlugin {
                     }else {
                         bumeninfo.set("post", positionnumber);
                     }
-
                     // 保存新用户信息
                     SaveServiceHelper.save(new DynamicObject[]{userinfo});
                     msg+="工号为 " + gonghao + " 的用户已创建!";
-
-
                     //刷新员工的类型字段
                     DBRoute dbRoute=new DBRoute("sys");
                     //生成id