package com.hzs.member.base.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.hzs.common.domain.member.detail.CuMemberAchieveLog;
import com.hzs.member.base.vo.CuMemberAchieveLogVO;
import com.hzs.system.sys.dto.ApprovalBusinessResultDTO;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 注水业绩记录表 服务类
 * </p>
 *
 * @author zhangjing
 * @since 2023-02-03
 */
public interface ICuMemberAchieveLogService extends IService<CuMemberAchieveLog> {

    /**
     * @description: 特殊业务-注水业绩记录查询
     * @author: zhang jing
     * @date: 2023/2/3 17:16
     * @param: [cuMemberAchieveLogVO]
     * @return: java.util.List<com.hzs.member.base.vo.CuMemberAchieveLogVO>
     **/
    List<CuMemberAchieveLogVO> queryMemberAchieveLogList(CuMemberAchieveLogVO cuMemberAchieveLogVO);

    /**
     * @description: 特殊业务-注水业绩-审核列表
     * @author: zhang jing
     * @date: 2023/3/28 16:28
     * @param: [cuMemberAchieveLogVO]
     * @return: java.util.List<com.hzs.member.base.vo.CuMemberAchieveLogVO>
     **/
    List<CuMemberAchieveLogVO> queryTryAchieveLogList(CuMemberAchieveLogVO cuMemberAchieveLogVO);

    /**
     * @description: 查询某一期历史业绩
     * @author: zhang jing
     * @date: 2023/9/11 9:20
     * @param: [calList]
     * @return: java.util.List<com.hzs.member.base.vo.CuMemberAchieveLogVO>
     **/
    List<CuMemberAchieveLogVO> queryMemberAchieveHistoryList(List<CuMemberAchieveLogVO> calList);

    /**
     * @description: 查询单个会员当期业绩
     * @author: zhang jing
     * @date: 2023/2/4 10:13
     * @param: [tableName, cuMemberAchieveLogVO]
     * @return: com.hzs.member.base.vo.CuMemberAchieveLogVO
     **/
    CuMemberAchieveLogVO searchOne(CuMemberAchieveLogVO cuMemberAchieveLogVO,Integer pkCountry);
    /**
     * @description: 查询最大审核次数
     * @author: zhang jing
     * @date: 2023/2/6 16:10
     * @param: [pkMember, approveStatus]
     * @return: java.lang.Integer
     **/
    Integer selectByMaxApproveNumber(Long pkMember,int approveStatus);

    /**
     * @description: 注水业绩
     * @author: zhang jing
     * @date: 2023/4/11 19:15
     * @param: [cuMemberAchieveLogVO]
     * @return: com.hzs.member.base.vo.CuMemberAchieveLogVO
     **/
    CuMemberAchieveLogVO infusingWater(CuMemberAchieveLogVO cuMemberAchieveLogVO);

    /**
     * @description: 发起签呈
     * @author: zhang jing
     * @date: 2023/4/11 19:18
     * @param: [cuMemberAchieveLogVO]
     * @return: com.hzs.member.base.vo.CuMemberAchieveLogVO
     **/
    CuMemberAchieveLogVO petition(CuMemberAchieveLogVO cuMemberAchieveLogVO);

    /**
     * @description: 审核注水业绩
     * @author: zhang jing
     * @date: 2023/2/9 17:45
     * @param: [cuMemberAchieveLogVO]
     * @return: boolean
     **/
    boolean toExamine(ApprovalBusinessResultDTO approvalBusinessResultDTO);

    /**
     * 根据期间查询特殊业务注水业务，用于更新业绩，奖金计算使用
     * @param period 期间
    * @return: List<CuMemberAchieveLog>
    * @Author: sui q
    * @Date: 2023/3/11 11:26
    */
    List<CuMemberAchieveLog> queryMemberAchieveLogByPeriod(Integer period);

    /**
     * @description: 校验是否存在未审核数据
     * @author: zhang jing
     * @date: 2023/3/28 14:36
     * @param: [memberAchieveLogVO]
     * @return: java.util.List<com.hzs.member.base.vo.CuMemberAchieveLogVO>
     **/
    List<CuMemberAchieveLogVO> checkAchieveList(CuMemberAchieveLogVO memberAchieveLogVO);
}
