package com.jwipc.spe.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jwipc.spe.entity.SupAppraisePlanSupplier;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jwipc.spe.model.po.AppraiseSupplierInfoPO;
import com.jwipc.spe.model.po.PlanSupplierCalPO;
import com.jwipc.spe.model.po.RectifiedSupplierPO;
import com.jwipc.spe.model.query.AppraiseSupplierQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 供应商绩效考核计划与供应商关系表 Mapper 接口
 * </p>
 *
 * @author zhangjie
 * @since 2024-03-11
 */
public interface SupAppraisePlanSupplierMapper extends BaseMapper<SupAppraisePlanSupplier> {

    Integer findExtisFlag(@Param("year") Integer year,
                          @Param("quarter") Integer quarter,
                          @Param("month") Integer month,
                          @Param("supplierId") Long supplierId,
                          @Param("companyCode") String companyCode,
                          @Param("planId") Long planId);

    List<PlanSupplierCalPO> findForCalculate(@Param("id") Long id);

    PlanSupplierCalPO findForCalculate1(@Param("id")Long planId, @Param("supplierId") Long supplierId);

    List<RectifiedSupplierPO> findRectifiedSupplier(@Param("planId")Long planId);

    List<SupAppraisePlanSupplier> findForQuery(@Param("q") AppraiseSupplierQuery query);

    List<AppraiseSupplierInfoPO> getSupplierAppraisePlan(Page<Object> page, @Param("supplierId") Long supplierId,@Param("status")int status);
}
