package com.casic.missiles.service.customer;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.casic.missiles.dto.ReturnDTO;
import com.casic.missiles.dto.customer.sample.*;
import com.casic.missiles.dto.customer.MeasureRecordsResponse;
import com.casic.missiles.model.customer.CustomerSampleInfo;
import com.casic.missiles.model.meter.MeterTraceSupplier;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author cz
 */
public interface CustomerSampleService {

    Page<CustomerSampleListResponse> listPage(Page<CustomerSampleListResponse> page, CustomerSampleListRequest request) throws Exception;

    ReturnDTO addSample(CustomerSampleInfo customerSampleInfo) throws Exception;

    ReturnDTO addSampleList(List<CustomerSampleInfo> list) throws Exception;

    ReturnDTO updateSample(CustomerSampleInfo customerSampleInfo);

    CustomerSampleInfo sampleDetail(Long id);

    void sampleExport(CustomerSampleListRequest request, HttpServletResponse response);

    ReturnDTO deleteSample(Long id);

    Page<MeasureRecordsResponse> measureRecordsById(CustomerSampleIdRequest customerSampleIdRequest);

    Page<MultiItemSampleListResponse> listPageByOrder(Page<MultiItemSampleListResponse> page, OrderSampleListRequest request)  throws Exception;

    Page<MultiItemSampleListResponse> listPageByInterchange(Page<MultiItemSampleListResponse> page, InterchangeSampleListRequest request)  throws Exception;

    Page<MultiItemSampleListResponse> listPageBySubpackage(Page<MultiItemSampleListResponse> page, SubpackageSampleListRequest request)  throws Exception;

    Page<MultiItemSampleListResponse> listPageBySubpackageCertificate(Page<MultiItemSampleListResponse> page, InterchangeSampleListRequest request)  throws Exception;

    Page<CustomerSampleInfo> samplesByOderId(Page<CustomerSampleInfo> page, Long orderId, String sampleNo, String sampleName);
}
