package com.ningdatech.pmapi.organization;

import com.ningdatech.basic.model.GenericResult;
import com.ningdatech.pmapi.AppTests;
import com.ningdatech.pmapi.ding.task.EmployeeBatchGetTask;
import com.ningdatech.pmapi.ding.task.GovBusinessStripsTask;
import com.ningdatech.pmapi.ding.task.OrganizationBatchGetTask;
import com.ningdatech.zwdd.client.ZwddClient;
import com.ningdatech.zwdd.model.dto.DingInfoByMobileDTO;
import com.ningdatech.zwdd.model.dto.EmployeeInfoDTO;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author liuxinxin
 * @date 2023/2/9 下午3:54
 */

class OrganizationTest extends AppTests {

    @Autowired
    private OrganizationBatchGetTask organizationBatchGetTask;

    @Autowired
    private EmployeeBatchGetTask employeeBatchGetTask;

    @Autowired
    private GovBusinessStripsTask govBusinessStripsTask;

    @Autowired
    private ZwddClient zwddClient;

    @Test
    public void testBatchGetOrganization() {
        organizationBatchGetTask.batchGetOrganizationTask();
    }

    @Test
    public void testEmployeeBatchGetTask() {
        employeeBatchGetTask.batchGetEmployeeTask();
    }

    @Test
    public void testGovBusinessStripsTask() {
        govBusinessStripsTask.batchGetGovBusinessStripsTask();
    }

    @Test
    public void getEmployeeInfo() {
        GenericResult<DingInfoByMobileDTO> dingInfoByMobile = zwddClient.getDingInfoByMobile("13164388876");
//        GenericResult<EmployeeInfoDTO> ge_809a061236b941d281446df6f14dc8f0 = zwddClient.getEmployeeByCode("GE_809a061236b941d281446df6f14dc8f0");
        GenericResult<EmployeeInfoDTO> ge_809a061236b941d281446df6f14dc8f0 = zwddClient.getEmployeeByCode("GE_e68c7af513474eaa959b7ce7141a4d9f");

        System.out.println("---");
    }

}
