|
@@ -9,6 +9,7 @@ import kd.bos.orm.query.QCP;
|
|
|
import kd.bos.orm.query.QFilter;
|
|
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
|
|
import sys.sc.opplugin.utils.DatFileCreatUtils;
|
|
|
+import sys.sc.opplugin.utils.SftpClient;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
@@ -51,7 +52,7 @@ public class CreatDatPlugin extends AbstractListPlugin {
|
|
|
|
|
|
String filename=tablenumber+".dat";
|
|
|
|
|
|
- String filePath="D:\\"+filename;
|
|
|
+ String filePath="C:\\"+filename;
|
|
|
|
|
|
String spiltsign=jkdataDy.getString("nckd_split");
|
|
|
|
|
@@ -71,10 +72,17 @@ public class CreatDatPlugin extends AbstractListPlugin {
|
|
|
String nckd_url=jkdataDy.getString("nckd_url");
|
|
|
|
|
|
int port=jkdataDy.getInt("nckd_port");
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ SftpClient sftpClient=new SftpClient(host,username,password,port);
|
|
|
+
|
|
|
+ try {
|
|
|
+ sftpClient.connect();
|
|
|
+
|
|
|
+ sftpClient.fileCreat(filePath,nckd_url+filename);
|
|
|
+
|
|
|
+ sftpClient.disconnect();
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|