package com.bonus.material.push.mapper;

import com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo;
import com.bonus.material.clz.domain.vo.lease.LeaseTotalInfo;
import com.bonus.material.push.domain.IwsCostPushBean;
import com.bonus.material.settlement.domain.vo.PeriodCostResultVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author : 阮世耀
 * @version : 1.0
 * @PackagePath: com.bonus.material.push.mapper
 * @CreateTime: 2025-01-23  14:40
 * @Description: i皖送费用推送mapper
 */
@Mapper
public interface IwsCostPushMapper {

    /**
     * 查询协议推送匹配列表
     */
    List<IwsCostPushBean> findAgreement(IwsCostPushBean o);

    /**
     * 更新协议信息表的push状态
     */
    int updateAgreementIsPush(IwsCostPushBean o);

    /**
     * 查询费用推送审核数据列表
     */
    List<IwsCostPushBean> getCostPushCheckList(IwsCostPushBean o);

    /**
     * 插入Calc表当前月份
     */
    int insertCalcMonthRecord(IwsCostPushBean record);

    /**
     * 插入项目月费用info数据 -- 批量
     */
    int insertProjectMonthCosts(List<IwsCostPushBean> list);

    /**
     * 插入项目月费用details数据 -- 批量
     */
    int insertProjectMonthCostsDetails(@Param("list") List<PeriodCostResultVo> list);

    /**
     * 根据协议ID查询领用物资数据
     * @param record 协议信息及条件
     */
    List<IwsCostPushBean> getPaidSltBaseInfo(IwsCostPushBean record);

    /**
     * 根据协议ID及月份查询当月已生成的区间租赁费用明细
     */
    List<IwsCostPushBean> getLeaseCostsByAgreementIdAndMonth(IwsCostPushBean record);

    /**
     * @author jsk
     *根据工程查询领用信息
     */
    List<IwsCostPushBean> getProLeaseInfo(IwsCostPushBean record);
    /**
     * 工器具领料记录总数
     * @param leaseTotalInfo
     * @return
     */
    IwsCostPushBean getTotalInfo(IwsCostPushBean leaseTotalInfo);

    /**
     * 工器具领料记录总数
     * @param leaseTotalInfo
     * @return
     */
    List<MaterialRetainedEquipmentInfo> getEquipmentListByType(IwsCostPushBean leaseTotalInfo);

    /**
     * 工器具领料记录总数
     * @param leaseTotalInfo
     * @return
     */
    List<MaterialRetainedEquipmentInfo> getEquipmentListByAgreementCode(IwsCostPushBean leaseTotalInfo);
}
