package com.casic.missiles.mapper.customer;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.casic.missiles.dto.business.dispatch.ReadSampleDTO;
import com.casic.missiles.dto.customer.MeasureRecordsResponse;
import com.casic.missiles.dto.customer.sample.*;
import com.casic.missiles.model.customer.CustomerSampleInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

public interface CustomerSampleMapper extends BaseMapper<CustomerSampleInfo> {

    Long selectMaxSampleNo();


    Page<MeasureRecordsResponse> measureRecordsById(Page<MeasureRecordsResponse> page, @Param("request") CustomerSampleIdRequest customerSampleIdRequest);


    Page<CustomerSampleInfo> samplesByOderId(Page<CustomerSampleInfo> page,
                                             @Param("orderId") Long orderId,
                                             @Param("sampleNo") String sampleNo,
                                             @Param("sampleName") String sampleName);

    List<MultiItemSampleListResponse> listPageByOrder(@Param("page") Page<MultiItemSampleListResponse> page, @Param("request") OrderSampleListRequest request);


    List<MultiItemSampleListResponse> listPageByInterchange(@Param("page") Page<MultiItemSampleListResponse> page, @Param("request") InterchangeSampleListRequest request);


    List<MultiItemSampleListResponse> listPageBySubpackage(@Param("page") Page<MultiItemSampleListResponse> page, @Param("request") SubpackageSampleListRequest request);

    List<MultiItemSampleListResponse> listPageBySubpackageCertificate(@Param("page") Page<MultiItemSampleListResponse> page, @Param("request") InterchangeSampleListRequest request);

    List<ReadSampleDTO> selectListForReadWriter(@Param("gunSet") Set<String> gunSet, @Param("tIds") Set<String> tIds);
}
