package com.qmth.sop.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qmth.sop.business.bean.report.QualityAnalyseReportBean;
import com.qmth.sop.business.bean.report.QualityAnalyseReportViewBean;
import com.qmth.sop.business.entity.TBService;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Description: 质量监控分析报表mapper
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2024/9/18
 */
public interface QualityAnalyseReportMapper extends BaseMapper<TBService> {

    /**
     * 大区质量问题统计
     *
     * @param serviceId
     * @return
     */
    List<QualityAnalyseReportBean> areaQualityReport(@Param("serviceId") Long serviceId);

    /**
     * 人力商质量问题统计
     *
     * @param serviceId
     * @return
     */
    List<QualityAnalyseReportBean> humanSupplierQualityReport(@Param("serviceId") Long serviceId);

    /**
     * 质量问题原因分类统计
     *
     * @param serviceId
     * @return
     */
    List<QualityAnalyseReportBean> reasonQualityReport(@Param("serviceId") Long serviceId);

    /**
     * 报表详情列表
     *
     * @param iPage
     * @param serviceId
     * @param areaManagerId
     * @param supplierId
     * @param reason
     * @param customName
     * @param influenceDegree
     * @return
     */
    IPage<QualityAnalyseReportViewBean> viewList(IPage<Map> iPage, @Param("serviceId") Long serviceId,
            @Param("areaManagerId") Long areaManagerId, @Param("supplierId") Long supplierId,
            @Param("reason") String reason, @Param("customName") String customName,
            @Param("influenceDegree") String influenceDegree);

    /**
     * 报表详情列表导出
     *
     * @param serviceId
     * @param areaManagerId
     * @param supplierId
     * @param reason
     * @param customName
     * @param influenceDegree
     * @return
     */
    List<QualityAnalyseReportViewBean> viewListExport(@Param("serviceId") Long serviceId,
            @Param("areaManagerId") Long areaManagerId, @Param("supplierId") Long supplierId,
            @Param("reason") String reason, @Param("customName") String customName,
            @Param("influenceDegree") String influenceDegree);
}
