package ink.wgink.login.oauth2.client.remote.department;

import ink.wgink.annotation.rpc.rest.RemoteService;
import ink.wgink.annotation.rpc.rest.method.RemoteGetMethod;
import ink.wgink.annotation.rpc.rest.method.RemotePostMethod;
import ink.wgink.annotation.rpc.rest.params.*;
import ink.wgink.pojo.dtos.ZTreeDTO;
import ink.wgink.pojo.dtos.department.DepartmentDTO;
import ink.wgink.pojo.pos.DepartmentPO;
import ink.wgink.pojo.result.SuccessResultData;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.pojo.vos.IdsVO;

import java.util.List;
import java.util.Map;

/**
 * @ClassName: IDepartmentRemoteService
 * @Description: 组织部门调动
 * @Author: wanggeng
 * @Date: 2021/9/22 10:41 下午
 * @Version: 1.0
 */
@RemoteService("/resource/department")
public interface IDepartmentRemoteService {

    @RemoteGetMethod("/list")
    List<DepartmentDTO> list(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteQueryParamsMap Map<String, Object> params);

    @RemotePostMethod("/list/ids")
    List<DepartmentDTO> listByIds(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteJsonBodyParams IdsVO idsVO);

    @RemoteGetMethod("/get/{departmentId}")
    DepartmentDTO get(@RemoteServerParams String userCenter, @RemotePathParams("departmentId") String departmentId, @RemoteQueryParams("access_token") String accessToken);

    @RemoteGetMethod("/listpage")
    SuccessResultList<List<DepartmentDTO>> listPage(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteQueryParams("page") int page, @RemoteQueryParams("rows") int rows, @RemoteQueryParamsMap Map<String, Object> params);

    @RemoteGetMethod("/list-all")
    List<DepartmentDTO> listAll(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteQueryParamsMap Map<String, Object> params);

    @RemoteGetMethod("/list-ztree")
    List<ZTreeDTO> listZtree(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteQueryParamsMap Map<String, Object> params);

    @RemoteGetMethod("/list-id")
    List<String> listId(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteQueryParamsMap Map<String, Object> params);

    @RemoteGetMethod("/list-ztree/area-code/{departmentAreaCode}/parent-id/{departmentParentId}/type/{departmentType}")
    List<ZTreeDTO> listZTreeByAreaCodeAndParentIdAndType(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemotePathParams("departmentAreaCode") String departmentAreaCode, @RemotePathParams("departmentParentId") String departmentParentId, @RemotePathParams("departmentType") Integer departmentType);

    @RemoteGetMethod("/count")
    SuccessResultData<Integer> count(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteQueryParamsMap Map<String, Object> params);

    @RemoteGetMethod("/get-po/{departmentId}")
    DepartmentPO getPO(@RemoteServerParams String userCenter, @RemotePathParams("departmentId") String departmentId, @RemoteQueryParams("access_token") String accessToken);

    @RemoteGetMethod("/list-po")
    List<DepartmentPO> listPO(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteQueryParamsMap Map<String, Object> params);

    @RemotePostMethod("/list-po/ids")
    List<DepartmentPO> listPOByIds(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteJsonBodyParams IdsVO idsVO);

    @RemoteGetMethod("/list-po/parentid/{departmentId}")
    List<DepartmentPO> listPOByParentId(@RemoteServerParams String userCenter, @RemotePathParams("departmentParentId") String departmentParentId, @RemoteQueryParams("access_token") String accessToken);

    @RemoteGetMethod("/list-po/parentid/{departmentParentId}/add-date/{addDate}")
    List<DepartmentPO> listPOByParentIdAndAddDate(@RemoteServerParams String userCenter, @RemotePathParams("departmentParentId") String departmentParentId, @RemotePathParams("addDate") String addDate, @RemoteQueryParams("access_token") String accessToken);

    @RemoteGetMethod("/list-po/parentid/{departmentParentId}/update-date/{updateDate}")
    List<DepartmentPO> listPOByParentIdAndUpdateDate(@RemoteServerParams String userCenter, @RemotePathParams("departmentParentId") String departmentParentId, @RemotePathParams("updateDate") String updateDate, @RemoteQueryParams("access_token") String accessToken);

    @RemoteGetMethod("/list-po/area-code/{areaCode}")
    List<DepartmentPO> listPOByAreaCode(@RemoteServerParams String userCenter, @RemotePathParams("areaCode") String areaCode, @RemoteQueryParams("access_token") String accessToken);

    @RemoteGetMethod("/list-po/area-code/{areaCode}/type/{departmentType}")
    List<DepartmentPO> listPOByAreaCodeAndType(@RemoteServerParams String userCenter, @RemotePathParams("areaCode") String departmentAreaCode, @RemotePathParams("departmentType") Integer departmentType, @RemoteQueryParams("access_token") String accessToken);
}
