package cn.com.countrygarden.bi.main.dao.businessCenterSubmission;

import cn.com.countrygarden.bi.main.dao.businessCenterSubmission.sqlprovider.BusinessCenterSubmissionSqlProvider;
import cn.com.countrygarden.bi.main.dto.businessCenterSubmission.SumSheetDTO;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;

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

/**
 * <pre>
 *
 * </pre>
 *
 * @author wxy
 * @version 1.00.00
 * <p>
 * <p>
 * <pre>
 * 修改记录
 *    修改后版本:     修改人：  修改日期:     修改内容:
 * </pre>
 */
@Mapper
public interface BusinessCenterSubmissionMapper {



    /**
     * 获取未完成征询原因类型
     * @return
     */
    @SelectProvider(type = BusinessCenterSubmissionSqlProvider.class,method = "getUnfinishedCause")
    List<Map<String,String>> getUnfinishedCause();

    /**
     * 查询汇总数据列表
     * @param organCode
     * @param commId
     * @param branchName
     * @param isPrd
     * @param isDouble
     * @param unfinishedCause
     * @param isDoubleSixMonth
     * @param startTime
     * @param endTime
     * @return
     */
    @SelectProvider(type = BusinessCenterSubmissionSqlProvider.class,method = "getSumSheetList")
    List<SumSheetDTO> getSumSheetList(String organCode, String commId, String id,String branchName,
                                      String isPrd, String isDouble, String unfinishedCause, String isDoubleSixMonth,
                                      String startTime, String endTime);

    /**
     * 新增汇总数据
     * @param dto
     */
    @InsertProvider(type = BusinessCenterSubmissionSqlProvider.class,method = "addSumSheet")
    void addSumSheet(SumSheetDTO dto, String userCode);

    /**
     * 修改汇总数据
     * @param dto
     */
    @UpdateProvider(type = BusinessCenterSubmissionSqlProvider.class,method = "updateSumSheet")
    void updateSumSheet(SumSheetDTO dto, String userCode);

    /**
     * 删除汇总数据
     * @param id
     */
    @UpdateProvider(type = BusinessCenterSubmissionSqlProvider.class,method = "deleteSumSheet")
    void deleteSumSheet(String id, String userCode);

    @SelectProvider(type = BusinessCenterSubmissionSqlProvider.class,method = "getUserRoleList")
    List<String> getUserRoleList(String userCode);
}
