数据导出

第一步:单点登入

一、创建SSO配置,请参考组织管理里中的SSO管理

二、通过下面代码获取token.

接口:http://127.0.0.1:20020/x_organization_assemble_authentication/jaxrs/sso
String token = ""; 
//单点登入
String path = "
http://127.0.0.1:20020/x_organization_assemble_authentication/jaxrs/sso
"; 
long time = new Date().getTime(); 
String login_uid = "test"; 
String sso_key = "12345678"; 
String xtoken = null;
 try { xtoken = Crypto.encrypt( login_uid + "#" + time, sso_key ); 
 System.out.println(xtoken); } 
 catch (Exception e1) { 
  e1.printStackTrace(); 
 }
String string = "{\"token\": "+xtoken+", \"client\": \"unicom\"}";
String  str =  HttpClientUtils.getInstance().sendPost(path,string);
try {
       JSONObject jsonObj = (JSONObject)(new JSONParser().parse(str));
      // System.out.println(jsonObj.toJSONString() + "\n" + jsonObj.getClass());
       JSONObject data = (JSONObject) jsonObj.get("data");
        System.out.println(data.get("token"));
        token = (String) data.get("token");
    } catch (ParseException e) {
        e.printStackTrace();
    }

第二步:获取待办列表

第三步:获取表单数据

四:下载附件

五:获取流程记录

Last updated

Was this helpful?