package com.tofly.qualitycontrol.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tofly.qualitycontrol.dto.*;
import com.tofly.qualitycontrol.entity.CertificationOrder;
import com.tofly.qualitycontrol.vo.*;
import org.apache.ibatis.annotations.Param;

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

/**
 * @author B
 */
public interface CertificationOrderMapper extends BaseMapper<CertificationOrder> {

	LinkedHashMap<String,Object> getProcessCount(@Param("userId") Long userId);

    List<OrderSummaryVo> orderSummaryList(@Param("dto") OrderDto dto, @Param("userId") Long userId,@Param("departmentId") Long departmentId);

    List<ReportSummaryVo> orderReportSummary(@Param("dto") OrderDto dto,@Param("userId") Long userId,@Param("departmentId") Long departmentId);

    Page<CertificationOrder> loadOrderList(@Param("dto") ReportOrderDto dto,@Param("userId") Long userId, Page<CertificationOrder> page,@Param("departmentId") Long departmentId);

    List<ReportSummaryVo> orderInspectSummary(@Param("dto")OrderDto dto,@Param("userId") Long userId,@Param("ratio") Integer ratio,@Param("departmentId") Long departmentId);

    Page<BusinessMonitorVO_L> getCertificationList(@Param("dto")ReportOrderDto orderDto, @Param("userId") Long userId, @Param("ratio") int ratio, Page<CertificationOrder> page, @Param("departmentId") Long departmentId);

    List<ReportOrderInfoVo> loadOrderInfos(@Param("id")Long id,@Param("type") Long type);

    List<OrderListInfoVo> loadWorkOrderList(@Param("dto")OrderListDto dto);

    Page<OrderListInfoVo> loadWorkOrderList(@Param("dto")OrderListDto dto, Page page);

    List<OrderFinishVo> loadOrderFinish(@Param("dto")OrderReportDto dto);

    List<OrderFinishInfoVo> loadDefectType(@Param("dto") OrderReportDto dto);

    List<Map<String, Object>> loadDefectTrend(@Param("dto") OrderReportDto dto,@Param("column")String column);

    List<ClientAttestationVo> loadClientAttestation(@Param("dto")ClientAttestationDto dto);

    List<RectifyQualifiedVo> loadQualified(@Param("dto")OrderReportDto dto);

    List<Map<String, Object>> loadNotQualified(@Param("dto")OrderReportDto dto,@Param("column")String column);

    Integer updateReadmeterhis(@Param("clientNumber")String clientNumber, @Param("yearMonth")String yearMonth);

    List<String> getFilePath(@Param("fileids") List<String> fileids);
}
