package io.renren.modules.business.service;

import com.baomidou.mybatisplus.extension.service.IService;
import io.renren.common.utils.PageUtils;
import io.renren.modules.business.entity.BusinessOutlayIncomeEntity;

import java.math.BigDecimal;
import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.Map;

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

    PageUtils queryPage(Map<String, Object> params);

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

    PageUtils pcListPage(Map<String, Object> params);

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

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

    /**
     * 填入到年度总结表
     * @param outinDate
     * @param toString
     * @param i
     */
    void ifSave(Date outinDate, String WriteUserId, int i) throws ParseException;

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

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

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

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

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

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

