//package com.mcli;
//
//import com.alibaba.fastjson.JSON;
//import com.alibaba.fastjson.JSONArray;
//import com.alibaba.fastjson.JSONObject;
//import com.mcli.service.aliwork.YDConf;
//import com.mcli.service.aliwork.YDParam;
//import lombok.extern.slf4j.Slf4j;
//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.ActiveProfiles;
//import org.springframework.test.context.junit4.SpringRunner;
//
//@ActiveProfiles({"dev"})
//@Slf4j
//@RunWith(SpringRunner.class)
//@SpringBootTest(classes = Boot.class)
//public class YDTest {
//
//    @Autowired
//    private YDService ydService;
//
//    @Autowired
//    private YDClient ydClient;
//
//    @Test
//    public void test2() {
//        log.info("xxx, {}", Math.ceil(4981 * 1.0 / YDConf.PAGE_SIZE_LIMIT));
//    }
//
//    // 申城
//    @Test
//    public void scUpdate() {
//        YDParam ydParam = new YDParam();
//        ydParam.setAppType("APP_QJKNHO0SAR3DDBRF5PBZ");
//        ydParam.setSystemToken("9T566BD1GA2VGTBF4TJWZ5993SOX2AJ7X80WKZY1");
//        ydParam.setFormUuid("FORM-MFA66S91ZZCVETYZ030N79FUG8VQ2GK7X80WK31");
////        ydParam.setProcessInstanceId("f41a7516-6ec4-4deb-9968-eb3b842a017c");
////        JSONObject updateFormDataJson = new JSONObject();
////        updateFormDataJson.put("textareaField_krpv7d9t", "");
////        ydParam.setUpdateFormDataJson(updateFormDataJson.toJSONString());
//        log.info("2111, {}", ydClient.queryData(YDConf.API_FORM_QUERY_DATA, ydParam));
//    }
//
//    // 查询实例
//    @Test
//    public void queryFormInstId() {
//        YDParam ydParam = new YDParam();
//
//        // 远东
////        ydParam.setAppType("APP_GXUUGZJ1ZPPBIJKLE9BH");
////        ydParam.setSystemToken("KH766OB1OEFU141VX82MPV04ZS6R1M0WS8QUKD4");
////        ydParam.setProcessInstanceId("3022651a-80c9-456e-860e-7cdfbe60db89");
//
//        // 镁信
//        /**
//         * 补充协议：15dafce9-0bf7-495d-9af7-c995d2306e46
//         * 采购立项：a0ee6493-b657-4160-8f41-3c9ce744dd17
//         * 采购结果：a2c915c3-6591-416b-a3b5-4dca07bdd81a
//         * 采购合同：9a36abf7-2ced-424a-be76-4131cc268a0a
//         */
//        ydParam.setAppType("APP_X66J3HR5W8PGMOQ5S6N0");
//        ydParam.setSystemToken("BP866V81LYVVMVOL5OQXD8MUY45N2UMAVGUWKII");
//        ydParam.setProcessInstanceId("6a067967-fbaa-49df-a940-426a4f8f8bd7");
//
//        Object rsp = ydClient.operateData(YDConf.API_PROCESS_DETAIL, ydParam);
//
//        log.info("1111, {}", rsp);
//    }
//
//    // 修改流程数据
//    @Test
//    public void updateProcessData() {
//
//        YDParam ydParam = new YDParam();
//        ydParam.setAppType("APP_X66J3HR5W8PGMOQ5S6N0");
//        ydParam.setSystemToken("BP866V81LYVVMVOL5OQXD8MUY45N2UMAVGUWKII");
//        ydParam.setFormInstId("6a067967-fbaa-49df-a940-426a4f8f8bd7");
//
//        JSONObject object = new JSONObject();
//        JSONArray array = new JSONArray();
//        array.add("604392324");
//        array.add("16044153158358656");
//        object.put("employeeField_l60gz6kc", array);
//        object.put("selectField_ktawz21s", "代办服务");
//        ydParam.setUpdateFormDataJson(JSON.toJSONString(object));
//
//
//        Object rsp = ydClient.operateData(YDConf.API_FORM_UPDATE, ydParam);
//
//        log.info("修改流程数据, {}", rsp);
//
//    }
//
//}
