package cn.com.countrygarden.bi.main.service.extension;

import cn.com.countrygarden.bi.main.dto.extension.ExtensionPageData;
import cn.com.countrygarden.bi.main.dto.extension.ExtensionReportDTO;
import cn.com.countrygarden.bi.main.service.AccessTokenService;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * @ClassName ExtensionReportService
 * @Description   市场拓展 -> 外拓报表 -> 业务逻辑
 * @Author Sjiang
 * @Date 2019/1/18 15:53
 * @Version 1.0
 **/
public interface ExtensionReportService {

    /**
     * @Author Sjiang
     * @Description  获取外拓报表信息
     * @Date 15:07 2019/1/21
     * @Param []
     * @return java.lang.Object
     **/
    Object selectReportAll(ExtensionReportDTO reportDTO, AccessTokenService accessTokenService, HttpServletRequest request, ExtensionPageData pageData);

    /**
     * @Author Sjiang
     * @Description  ERP 、DUP 信息绑定
     * @Date 9:30 2019/1/22
     * @Param [reportDTO]
     * @return java.lang.Object
     **/
    Object dataBinding(ExtensionReportDTO reportDTO, String token);

    /**
     * @Author Sjiang
     * @Description  根据 ID 获取已绑定信息
     * @Date 22:51 2019/1/22
     * @Param [dupDTO]
     * @return java.lang.Object
     **/
    Object getBindingById(ExtensionReportDTO reportDTO);

    /**
     * @Author Sjiang
     * @Description  根据 id 修改信息
     * @Date 23:27 2019/1/22
     * @Param [reportDTO]
     * @return java.lang.Object
     **/
    Object updateBinding(ExtensionReportDTO reportDTO, String userCode);

    /**
     * @Author Sjiang
     * @Description  根据 ID 撤销已绑定信息
     * @Date 10:42 2019/1/23
     * @Param [reportDTO]
     * @return java.lang.Object
     **/
    Object removeBinding(ExtensionReportDTO reportDTO, String token);

    /**
     * @Author Sjiang
     * @Description  获取外拓项目所有信息的总条数
     * @Date 15:10 2019/1/23
     * @Param []
     * @return java.lang.Object
     *
     * @param accessTokenService
     * @param request*/
    Object getExtensionCount(AccessTokenService accessTokenService, HttpServletRequest request);

    /**
     * @Author Sjiang
     * @Description  用户删除已绑定数据的子数据信息
     * @Date 16:27 2019/2/12
     * @Param []
     * @return java.lang.Object
     **/
    Object deleteBindingChildInfo(Map<String, Long> param, String token);

    /**
     * @Author sjiang
     * @Description  重写查询所有接口
     * @Date 10:47 2019-03-16
     * @Param [reportDTO, request, pageData]
     * @return java.lang.Object
     **/

    Object selectAll(ExtensionReportDTO reportDTO, AccessTokenService accessTokenService, HttpServletRequest request, ExtensionPageData pageData);

    /**
     * @Author sjiang
     * @Description  获取 organCode ，如果为空则是总部权限
     * @Date 11:03 2019-03-16
     * @Param [userCode]
     * @return java.lang.String
     **/

    String isExtensionAdmin(String userCode );
    /**
     * @Author sjiang
     * @Description  更新已绑定的 erp 信息
     * @Date 16:57 2019/5/21
     * @Param [erpId, request]
     * @return java.lang.Object
     **/
    Object dataBindingUpdate(Long erpId, String userCode);
}
