//package test;
//
//
//import com.dgtly.ApiApplication;
//import com.dgtly.common.utils.bean.EnDecoderUtil;
//import com.dgtly.common.utils.bean.HexUtils;
//import com.dgtly.system.domain.SysUser;
//import com.dgtly.system.service.ISysUserService;
//import com.dgtly.system.service.impl.SysUserServiceImpl;
//import com.dgtly.wxportal.config.ESignConfig;
//import com.dgtly.wxportal.service.ESignService;
//import com.dgtly.wxportal.service.IEsignOrganRealVerifyService;
//import com.dgtly.wxportal.service.IEsignPersonRealnVerifyService;
//import com.dgtly.wxportal.service.IEsignSignService;
//import com.dgtly.wxportal.utils.ESign.ESignHttpUtil;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.test.context.junit4.SpringRunner;
//
//import java.net.URLDecoder;
//import java.net.URLEncoder;
//import java.nio.charset.StandardCharsets;
//import java.util.*;
//
//import static com.dgtly.common.utils.bean.EnDecoderUtil.DESdecode;
//import static com.dgtly.common.utils.bean.EnDecoderUtil.DESencode;
//
//@RunWith(SpringRunner.class)
//@SpringBootTest(classes=ApiApplication.class)
//public class MyTest {
//
//    @Autowired
//    private IEsignPersonRealnVerifyService personRealnVerifyService;
//    @Autowired
//    private IEsignOrganRealVerifyService organRealVerifyService;
//    @Autowired
//    private ESignHttpUtil eSignHttpUtil;
//    @Autowired
//    private ESignService eSignService;
//    @Autowired
//    private ESignConfig eSignConfig;
//    @Autowired
//    private IEsignSignService signService;
//    @Autowired
//    private ISysUserService userService;
//    @Autowired
//    private SysUserServiceImpl sysUserService;
//    @Autowired IEsignSignService esignSignService;
//
//    @Test
//    public void test() throws Exception {
//    /*   String certificateUrl="/profile/pdf/2023/04/13/0584202872.pdf";
//        String orders="6107665807";
//        esignSignService.tmsCertificate(orders, certificateUrl);*/
//        String name="http%3A%2F%2Fwww.baidu.com";
//       String i=URLDecoder.decode(name, "UTF-8");
//        System.out.println(i);
//        String filePath = URLEncoder.encode(name,"utf-8");  //java转码
//        //name= new String(name.getBytes("ISO8859-1"),"UTF-8");
//        System.out.println(filePath);
//        //加密
//        System.out.println(DESencode("niujinsheng.sm","SSB2023BMD"));
//        //解密
//        System.out.println(DESdecode("C0D8A1C91E39CE7BD9D07949AC4F08E7","SSB2023BMD"));
//        //base64进行加密解密,通常用作对二进制数据进行加密
//     /*   byte[] base64Encrypt = EnDecoderUtil.base64Encrypt(name);
//     *//*   String toHexString = HexUtils.toHexString(base64Encrypt);
//        System.out.println(toHexString);*//*
//        String toHexString="5a3356716157356e4c6e4e74";
//        byte[] to = HexUtils.toByteArray(toHexString);
//        byte[] base64Decrypt = EnDecoderUtil.base64Decrypt(to);
//        System.out.println(new String(base64Decrypt));*/
//    }
//
//}
//      /*  Set<String> s = new LinkedHashSet<>();
//        s.add("0110065150");
//        s.add("0110017419");
//        Map<String,Map<String,Object>> map =  sysUserService.selectLoginNamesByCostumerCode(s);
//        System.out.println("1111111111");*/
//      /*  Map<String,Map<String,Object>> map=new HashMap<>();
//        Map map1 = new HashMap();
//
//        map1.put("one", "一");
//
//        map1.put("two", "二");
//
//        map1.put("three", "三");
//
//        Map map2 = new HashMap();
//
//        map2.put("ten", "十");
//
//        map2.put("nine", "九");
//
//        map2.put("eight", "八");
//        map.putAll(map1);
//        for (Map.Entry entry : map.entrySet()) {
//
//            System.out.println("11111"+entry.getKey() + ":" + entry.getValue());
//
//        }
//        map.putAll(map2);
//        for (Map.Entry entry : map.entrySet()) {
//
//            System.out.println("22222"+entry.getKey() + ":" + entry.getValue());
//
//        }
//        Set<SysUser> orgCodeSet =new HashSet<>();
//        SysUser u=new SysUser();
//        u.setUserId(1L);
//        u.setIsSync("0");
//        u.setLoginName("张三");
//        orgCodeSet.add(u);
//        SysUser u2=new SysUser();
//        u2.setUserId(2L);
//        u2.setIsSync("1");
//        u2.setLoginName("李四");
//        orgCodeSet.add(u2);
//        Set<String> customerId=new HashSet<>();
//        //需要发送的组织凑的
//        for (SysUser user:orgCodeSet
//             ) {
//            customerId.add(user.getLoginName());
//        }
//
//
//        System.out.println("3333"+customerId);
//
//*/
//        //创建文件
//        /*SysUser user = new SysUser();
////        user.setUserName("乔小明");
//        user.setLoginName("qiaoxiaoming6");
//        SysUser account = eSignService.createPersonalAccount(user);*/
//
//
//        /*CustomersExt customersExt = new CustomersExt();
//        customersExt.setChainsCode("qiaoxiaominggongsi");
//        customersExt.setCreator("7303abf8d1e54308a889ee61db2639da");
////        customersExt.setCustomersName("乔小明企业");
////
//        CustomersExt s = eSignService.createThirdParty(customersExt);*/
//
//
//        //创建文件
////        String s = eSignService.upload("D:/SZSM/工作交接表.docx");
//        /*个人认证*/
////        String s = personRealnVerifyService.personRealnVerify("f39ab04d93174953a6fd22849512d4c9","http://baidu.com");
//        /*企业认证*/
////        String s = organRealVerifyService.organRealVerify("60b47892094143be9288bcfa6d5ab697","7303abf8d1e54308a889ee61db2639da","http://baidu.com");
////        String s = organRealVerifyService.organRealVerify("ca0d13a520bb415eaee16491776fe965","7303abf8d1e54308a889ee61db2639da","http://baidu.com");
//
//        /** 一步发起签署
//         *
//         * 最基本信息发起签署流程
//         *
//         * 1、流程基本信息（是否自动归档，默认false。--autoArchive，文件主题-businessScene）
//         * 2、待签文档信息（文档id-fileId、文件名称-fileName）
//         *
//         *
//         * copierAccountId 抄送人id
//         * fileId 文档id
//         * fileName 文件名称
//         * signerAccountId 签署操作人个人账号标识，即操作本次签署的个人注：平台用户自动签署时，该参数需要传入签署主体账号id*/
////        String s = signService.oneStepFlow("测试一部签署","f6ada0144a464d7bb90224104d1c4ca3","合同.pdf","7303abf8d1e54308a889ee61db2639da","7303abf8d1e54308a889ee61db2639da");
//        /*开启签署流程*/
////        String s = signService.processStart("456e7367066f406b8d62fcd25f65e793");
////        /*获取签署地址*/
////        String s = signService.processExecuteUrl("905cf2b712314666bab0c699dd6d17b7","7303abf8d1e54308a889ee61db2639da","81630c7a5c794f9ab1329d17b7004dcd");
//        /*设置静默签署*/
////        String s = signService.signAuth("3fe60580bd2f4501bf1a41efabc3c3aa");
//        /*查询流程签署列表人*/
////        String s = signService.processExecuteSigners("7ea59df3f2384bf882b0f37d9cb8c0b1");
////        /*流程归档*/
////        String s = signService.processArchiv("0cee5f3db6f8411b9cdefb1c7175cfaf");
//        /*签署文件下载*/
////        String s = signService.processDocumentDownload("801f7fb2831040b28a92a3d57f33ae05");
//       /* SysUser user = userService.selectUserById((long) 8036);
//        user.setUserName("屈星鹏");
//        eSignService.updatePersonalAccount(user);*/
////        getURLResource("E:\\测试.pdf","https://esignoss.esign.cn/1111563786/19a14aab-b5d7-405c-a58d-55c337310803/%E5%90%88%E5%90%8C.pdf?Expires=1603179315&OSSAccessKeyId=LTAIdvHfiVrzDKbE&Signature=dl3hGcJ3HQ5%2FDTTN5%2F0UPajobyw%3D");
//
////        System.out.println(s);
////        System.out.println("111111");
////}
//
//
