2022-11-22 16:24:35 +08:00
|
|
|
package youhong.ai.pcn;
|
|
|
|
|
|
|
|
import aiyh.utils.fileUtil.sftp.SftpConnectUtil;
|
|
|
|
import baseTest.BaseTest;
|
2022-11-22 17:54:34 +08:00
|
|
|
import com.api.doc.detail.util.SFTPUtils;
|
2022-11-22 18:21:50 +08:00
|
|
|
import com.jcraft.jsch.ChannelSftp;
|
2022-11-22 16:24:35 +08:00
|
|
|
import org.junit.Test;
|
|
|
|
import weaver.general.GCONST;
|
|
|
|
import weaver.youhong.ai.pcn.hrorganization.sftp.FetchDataUtil;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* <h1>测试类</h1>
|
|
|
|
*
|
|
|
|
* <p>create: 2022-11-22 15:56</p>
|
|
|
|
*
|
|
|
|
* @author youHong.ai
|
|
|
|
*/
|
|
|
|
|
|
|
|
public class TestOrganization extends BaseTest {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
public void testSftp(){
|
|
|
|
SftpConnectUtil sftpConnectUtil = new SftpConnectUtil(
|
|
|
|
"HR Digital_PROD",
|
2022-11-22 16:54:42 +08:00
|
|
|
"/Users/aoey.oct.22/company/Fan_wei/ssl/pcn/HR_Digital_PROD.pem",null,"222.73.197.242",
|
2022-11-22 17:54:34 +08:00
|
|
|
null,1000 * 100
|
2022-11-22 16:24:35 +08:00
|
|
|
);
|
2022-11-22 18:21:50 +08:00
|
|
|
ChannelSftp login = sftpConnectUtil.login();
|
2022-11-22 16:24:35 +08:00
|
|
|
FetchDataUtil fetchDataUtil = new FetchDataUtil();
|
2022-11-22 18:21:50 +08:00
|
|
|
fetchDataUtil.downloadFile(login, sftpConnectUtil,
|
|
|
|
"HRIS_PositionExport20221120", GCONST.getSysFilePath() + "HRIS_PositionExport20221120.csv");
|
2022-11-22 16:24:35 +08:00
|
|
|
}
|
|
|
|
}
|