package com.jwipc.spe.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jwipc.spe.entity.SupAppraisePlanSupplier;
import com.jwipc.spe.mapper.SupAppraisePlanSupplierMapper;
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 com.jwipc.spe.service.ISupAppraisePlanSupplierService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 供应商绩效考核计划与供应商关系表 服务实现类
 * </p>
 *
 * @author zhangjie
 * @since 2024-03-11
 */
@Service
public class SupAppraisePlanSupplierServiceImpl
        extends ServiceImpl<SupAppraisePlanSupplierMapper, SupAppraisePlanSupplier>
        implements ISupAppraisePlanSupplierService
{

    @Override
    public Integer findExtisFlag(Integer year, Integer quarter, Integer month, Long supplierId, String companyCode,
                                 Long id)
    {
        return this.baseMapper.findExtisFlag(year, quarter, month, supplierId, companyCode, id);
    }

    @Override
    public List<PlanSupplierCalPO> findForCalculate(Long id) {
        return this.baseMapper.findForCalculate(id);
    }

    @Override
    public PlanSupplierCalPO findForCalculate(Long planId, Long supplierId) {
        return this.baseMapper.findForCalculate1(planId,supplierId);

    }

    @Override
    public List<RectifiedSupplierPO> findRectifiedSupplier(Long planId) {
        return this.baseMapper.findRectifiedSupplier(planId);
    }

    @Override
    public List<SupAppraisePlanSupplier> findForQuery(AppraiseSupplierQuery query) {
        return this.baseMapper.findForQuery(query);
    }

    @Override
    public List<AppraiseSupplierInfoPO> getSupplierAppraisePlan(Page<Object> page, Long supplierId,int status) {
        return this.baseMapper.getSupplierAppraisePlan(page,supplierId,status);
    }
}
