package com.qmth.sop.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qmth.sop.business.bean.dto.DataPermissionDto;
import com.qmth.sop.business.bean.result.TBQualityProblemApplyResult;
import com.qmth.sop.business.entity.TBQualityProblemApply;
import com.qmth.sop.business.entity.TBService;
import com.qmth.sop.common.enums.InfluenceDegreeEnum;
import com.qmth.sop.common.enums.QualityProblemReasonEnum;
import org.apache.ibatis.annotations.Param;

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

/**
 * <p>
 * </p>
 *
 * @author dhshu
 *
 */
public interface QualityAnalyseMapper extends BaseMapper<TBQualityProblemApply> {


    IPage<TBQualityProblemApplyResult> detail(Page<Object> objectPage, @Param("serviceUnitId") Long serviceUnitId, @Param("degree") String degree);

    List<Map<String, Object>> radar(@Param("serviceUnitId")Long serviceUnitId,@Param("supplierId") Long supplierId);

    List<TBService> list(@Param("startTime")Long startTime, @Param("endTime")Long endTime, @Param("dpr") DataPermissionDto dpr);

    Double progress( @Param("serviceUnitId")Long serviceUnitId);

    List<Map<String, Object>> influence( @Param("serviceUnitId")Long serviceUnitId);

    List<Map<String, Object>> pie(@Param("serviceUnitId")Long serviceUnitId,@Param("supplierId") Long supplierId);

    IPage<TBQualityProblemApplyResult> influenceDetail(Page<Object> tPage,@Param("serviceUnitId") Long serviceUnitId,@Param("supplierId") Long supplierId,@Param("region_id") Long region_id,@Param("influenceDegree") String influenceDegree,@Param("reason") String reason);
}
