package io.renren.modules.business.dao;

import io.renren.modules.business.entity.BusinessOutlayIncomeEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 收支总结表
 * 
 * @author jiaqiao
 * @email jiaqiao@163.com
 * @date 2022-10-13 10:00:10
 */
@Mapper
public interface BusinessOutlayIncomeDao extends BaseMapper<BusinessOutlayIncomeEntity> {

    /**
     * 获取未删除的列表不含有翻页
     */
    List<BusinessOutlayIncomeEntity> listNoPage(Map<String, Object> params);

    List<BusinessOutlayIncomeEntity> pcListNoPage(Map<String, Object> params);

    /**
     * 获取内部转账统计信息
     * @param params
     * @return
     */
    List<Map<String, Object>> zclbList(Map<String, Object> params);

    /**
     * 审批不通过
     * @param approvalId
     */
    void updateNoPassByIds(String approvalId);

    void updateND(@Param("startTime") String startTime, @Param("endTime") String endTime,@Param("annualHsId") String annualHsId);

    /**
     * 获取当前年度数据
     * @return
     */
    List<BusinessOutlayIncomeEntity> listNowTime(Map<String, Object> params);

    /**
     * 获取昨日余额
     * @param params
     * @return
     */
    BigDecimal getZrye(Map<String, Object> params);

    /**
     * 获取所选日期是否已经阶段提交
     * @param params
     * @return
     */
    int getLockedCnt(Map<String, Object> params);

    /**
     * 锁住
     */
    void updateLocked(String userId);

    /**
     * 根据时间和执行人获取收支数据
     * @param params
     * @return
     */
    BusinessOutlayIncomeEntity getOutInByDate(Map<String, Object> params);

    /**
     * 根据时间和执行人获取下一日期收支数据
     * @param params
     * @return
     */
    BusinessOutlayIncomeEntity getNextOutInByDate(Map<String, Object> params);
}
