package com.jwipc.tender.logic;

import cn.hutool.core.lang.Pair;
import com.jwipc.page.PageView;
import com.jwipc.tender.dto.*;
import com.jwipc.tender.model.query.TenderQuery;
import org.jetbrains.annotations.NotNull;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.math.BigDecimal;
import java.util.List;

/**
 * <p> </p>
 *
 * @author BOGON
 * @version 1.0
 * @since JDK 1.8
 */
public interface BenchmarksLogic {
    PageView getList(TenderQuery query);

    void updateOpenBidStatus(String idStr);

    PageView getQuoteDetails(Long id);

    @NotNull
    List<TenderBidDetailAllDTO> getTenderBidDetailAllDTOS(Long id);

    PageView getBidFileList(Long tenderId);

    Pair<String, String> downloadZip(Long tenderId);

    List<BenchmarksScoreExportDTO> getExportScoreList(Long tenderId);

    void importScore(List<BenchmarksScoreExportDTO> scoreExportDTOS, Long tenderId);

    void submitBargaining(List<SubmitBargainingItemDTO> dto);

    void submitBenchmarks(SubmitBenchmarksDTO submitBenchmarksDTO);

    PageView getConfirmUserList(Long tenderId);

    BigDecimal calculation(
            BigDecimal avgPrice, BigDecimal offerPrice, BigDecimal baseScore, BigDecimal lowRate,
            BigDecimal lowScoreVal, BigDecimal higherRate, BigDecimal higherScoreVal,
            BigDecimal fullScore
    );

    void stopBargaining(List<Long> id);

    void calculateQuotas(SubmitBenchmarksDTO submitBenchmarksDTO);

    void bidedApproval(Long tenderId,Integer type,Integer agreeFlag,String remark);

    PageView getApprovelList(Long id);

    PageView getSupplierRankList(Long id);

    void releaseBenchmarks(Long id);

    List<TenderDetailAllDTO> exportMaterial(Long tenderId);

    void importMaterial(MultipartFile file) throws IOException;

    List<String> supplierUnquotedMaterials(Long id);
}